% @ Language=VBScript %>
<% Option Explicit %>
<%
'****************************************************************************************
'** Copyright Notice
'**
'** Web Wiz Forums(TM)
'** http://www.webwizforums.com
'**
'** Copyright (C)2001-2008 Web Wiz(TM). All Rights Reserved.
'**
'** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS UNDER LICENSE FROM 'WEB WIZ'.
'**
'** IF YOU DO NOT AGREE TO THE LICENSE AGREEMENT THEN 'WEB WIZ' IS UNWILLING TO LICENSE
'** THE SOFTWARE TO YOU, AND YOU SHOULD DESTROY ALL COPIES YOU HOLD OF 'WEB WIZ' SOFTWARE
'** AND DERIVATIVE WORKS IMMEDIATELY.
'**
'** If you have not received a copy of the license with this work then a copy of the latest
'** license contract can be found at:-
'**
'** http://www.webwizguide.com/license
'**
'** For more information about this software and for licensing information please contact
'** 'Web Wiz' at the address and website below:-
'**
'** Web Wiz, Unit 10E, Dawkins Road Industrial Estate, Poole, Dorset, BH15 4JD, England
'** http://www.webwizguide.com
'**
'** Removal or modification of this copyright notice will violate the license contract.
'**
'****************************************************************************************
'*************************** SOFTWARE AND CODE MODIFICATIONS ****************************
'**
'** MODIFICATION OF THE FREE EDITIONS OF THIS SOFTWARE IS A VIOLATION OF THE LICENSE
'** AGREEMENT AND IS STRICTLY PROHIBITED
'**
'** If you wish to modify any part of this software a license must be purchased
'**
'****************************************************************************************
'Set the buffer to true
Response.Buffer = True
'Declare variables
Dim intRowColourNumber 'Holds the number to calculate the table row colour
Dim blnIsUserOnline 'Set to true if the user is online
Dim intPageSize 'Holds the number of memebrs shown per page
Dim intStartPosition 'Holds the start poition for records to be shown
Dim intEndPosition 'Holds the end poition for records to be shown
Dim intCurrentRecord 'Holds the current record position
Dim intTotalRecords 'Holds the total number of therads in this topic
Dim intTotalRecordsPages 'Holds the total number of pages
Dim sarryPmBuddy 'Holds the buddy list array
Dim intArrayPass 'Loop variable for online users
'Initialise variable
intRowColourNumber = 0
intCurrentRecord = 0
'If the user is user is using a banned IP redirect to an error page
If bannedIP() Then
'Clean up
Call closeDatabase()
'Redirect
Response.Redirect("insufficient_permission.asp?M=IP" & strQsSID3)
End If
'If Priavte messages are not on then send them away
If blnPrivateMessages = False Then
'Clean up
Call closeDatabase()
'Redirect
Response.Redirect("default.asp" & strQsSID1)
End If
'If the user is not allowed then send them away
If intGroupID = 2 OR blnActiveMember = False OR blnBanned Then
'Clean up
Call closeDatabase()
'Redirect
Response.Redirect("insufficient_permission.asp" & strQsSID1)
End If
'Get the users buddy detals from the db
'Initlise the sql statement
strSQL = "SELECT " & strDbTable & "BuddyList.Buddy_ID, " & strDbTable & "BuddyList.Address_ID, " & strDbTable & "BuddyList.Description, " & strDbTable & "BuddyList.Block, " & strDbTable & "Author.Username, " & strDbTable & "Author.Author_ID " & _
"FROM " & strDbTable & "Author" & strDBNoLock & ", " & strDbTable & "BuddyList" & strDBNoLock & " "& _
"WHERE " & strDbTable & "Author.Author_ID=" & strDbTable & "BuddyList.Buddy_ID " & _
"AND " & strDbTable & "BuddyList.Author_ID=" & lngLoggedInUserID & " " & _
"AND " & strDbTable & "BuddyList.Buddy_ID <> 2 " & _
"ORDER BY " & strDbTable & "BuddyList.Block ASC, " & strDbTable & "Author.Username ASC;"
'Query the database
rsCommon.Open strSQL, adoCon
'If not eof then get some details
If NOT rsCommon.EOF Then
'Read in the row from the db using getrows for better performance
sarryPmBuddy = rsCommon.GetRows()
End If
'Close rs
rsCommon.Close
'If active users is enabled update the active users application array
If blnActiveUsers Then
'Call active users function
saryActiveUsers = activeUsers(strTxtPrivateMessenger & " " & strTxtBuddyList, "", "", 0)
End If
'Set bread crumb trail
strBreadCrumbTrail = strBreadCrumbTrail & strNavSpacer & strTxtBuddyList
%>
<% = strTxtBuddyList %>
<%
'***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
Response.Write("" & vbCrLf & vbCrLf)
'***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
%>
<%
'Check there are PM messages to display
If isArray(sarryPmBuddy) = false Then
'If there are no pm messages to display then display the appropriate error message
Response.Write(vbCrLf & "
" & strTxtNoBuddysInList & "
")
'Else there the are topic's so write the HTML to display the topic names and a discription
Else
'Loop round to read in all the Topics in the database
Do while intCurrentRecord =< UBound(sarryPmBuddy, 2)
'SQL Query Array Look Up table
'0 = Buddy_ID
'1 = Address_ID
'2 = Description
'3 = Block
'4 = Username
'5 = Author_ID
'Get the row number
intRowColourNumber = intRowColourNumber + 1
%>
<%
'Get the contact status
If CBool(sarryPmBuddy(3,intCurrentRecord)) = True Then
Response.Write(strTxtThisPersonCanNotMessageYou)
Else
Response.Write(strTxtThisPersonCanMessageYou)
End If
%>
<%
'If active users is enabled see if any buddies are online
If blnActiveUsers Then
'Initilase variable
blnIsUserOnline = False
'Get the users online status
For intArrayPass = 1 To UBound(saryActiveUsers, 2)
If saryActiveUsers(1, intArrayPass) = CLng(sarryPmBuddy(0,intCurrentRecord)) Then blnIsUserOnline = True
Next
%>
<% If blnIsUserOnline Then Response.Write("") Else Response.Write("") %>
<%
End If
%>
<%
'Move to the next record
intCurrentRecord = intCurrentRecord + 1
Loop
End If
%>
<%
'Display a msg letting the user know any add or delete details to the buddy list
Select Case Request.QueryString("ER")
Case "1"
Response.Write("")
Case "2"
Response.Write("")
End Select
%>