<% @ Language=VBScript %> <% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Forums '** http://www.webwizforums.com '** '** Copyright ©2001-2006 Web Wiz. 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. '** '**************************************************************************************** 'Set the response buffer to true as we maybe redirecting Response.Buffer = True 'If active users is off redirect back to the homepage If blnActiveUsers = False Then 'Clean up Call closeDatabase() 'Redirect Response.Redirect("default.asp" & strQsSID1) End If 'Make sure this page is not cached Response.Expires = -1 Response.ExpiresAbsolute = Now() - 2 Response.AddHeader "pragma","no-cache" Response.AddHeader "cache-control","private" Response.CacheControl = "No-Store" 'Dimension variables Dim lngUserID 'Holds the active users ID Dim strUsername 'Holds the active users username Dim strForumName 'Holds the forum name Dim intGuestNumber 'Holds the Guest Number Dim dtmLoggedIn 'Holds the date/time the user logged in Dim dtmLastActive 'Holds the date/time the user was last active Dim intActiveUsers 'Holds the number of active users Dim intActiveGuests 'Holds the number of active guests Dim intActiveMembers 'Holds the number of logged in active members Dim intForumColourNumber 'Holds the number to calculate the table row colour Dim intForumID 'Holds the forum ID number if there is one Dim intArrayPass 'Loop counter Dim strOSbrowser 'Holds the OS and browser of the user Dim strLocation 'Holds the users location Dim strURL 'Holds the URL to the users location Dim blnHideActiveUser 'Holds if the user wants to be hidden Dim intAnonymousMembers 'Holds the number of intAnonymous members online 'Initilise variables intActiveMembers = 0 intActiveGuests = 0 intActiveUsers = 0 intGuestNumber = 0 intForumColourNumber = 0 intAnonymousMembers = 0 'Call active users function saryActiveUsers = activeUsers(strTxtActiveUsers, "", "", 0) 'Sort the active users array Call SortActiveUsersList(saryActiveUsers) %> Active Users <% '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** Response.Write("") '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** %>
<% = strTxtActiveForumUsers %>
 <% = strMainForumName %><% = strNavSpacer %><% = strTxtActiveForumUsers %>

<% 'Get the number of active users 'Get the active users online For intArrayPass = 1 To UBound(saryActiveUsers, 2) 'If this is a guest user then increment the number of active guests veriable If saryActiveUsers(1, intArrayPass) = 2 Then intActiveGuests = intActiveGuests + 1 'Else if the user is Anonymous increment the Anonymous count ElseIf CBool(saryActiveUsers(8, intArrayPass)) Then intAnonymousMembers = intAnonymousMembers + 1 End If Next 'Calculate the number of members online and total people online intActiveUsers = UBound(saryActiveUsers, 2) intActiveMembers = intActiveUsers - intActiveGuests %>
<% = (strTxtInTotalThereAre & " " & intActiveUsers & " " & strTxtActiveUsers & " " & strTxtOnLine & ", " & intActiveGuests & " " & strTxtGuests & ", " & intActiveMembers & " " & strTxtMembers & ", " & intAnonymousMembers & " " & strTxtAnonymousMembers) %>
<% 'display the active users For intArrayPass = 1 To UBound(saryActiveUsers, 2) intForumColourNumber = intForumColourNumber + 1 'Array dimension lookup table ' 0 = IP ' 1 = Author ID ' 2 = Username ' 3 = Login Time ' 4 = Last Active Time ' 5 = OS/Browser ' 6 = Location Page Name ' 7 = URL ' 8 = Hids user details 'Read in the details from the rs lngUserID = saryActiveUsers(1, intArrayPass) strUsername = saryActiveUsers(2, intArrayPass) dtmLoggedIn = saryActiveUsers(3, intArrayPass) dtmLastActive = saryActiveUsers(4, intArrayPass) strOSbrowser = saryActiveUsers(5, intArrayPass) strLocation = saryActiveUsers(6, intArrayPass) strURL = saryActiveUsers(7, intArrayPass) blnHideActiveUser = CBool(saryActiveUsers(8, intArrayPass)) intForumID = CInt(saryActiveUsers(9, intArrayPass)) 'Check the permissions to see if the user has permission to see the topic subject If intForumID > 0 Then 'Check permissions Call forumPermissions(intForumID, intGroupID) 'If the user doesn't have read permissions then remove the Location URL If blnRead = False Then strURL = "" End If 'Write the HTML of the Topic descriptions as hyperlinks to the Topic details and message %> "> <% Next 'Clean up Call closeDatabase() %>
<% = strTxtUsername %> <% = strTxtLastActive %> <% = strTxtActive %> <% = strTxtOS & "/" & strTxtBrowser %> <% = strTxtLocation %>
<% 'If the user is a Guest then display them as a Guest If lngUserID = 2 Then 'Add 1 to the Guest number intGuestNumber = intGuestNumber + 1 'Display the User as Guest Response.Write(strTxtGuest & " "& intGuestNumber) 'If the user wants to hide there ID then do so (unless this is an admin or moderator) ElseIf blnHideActiveUser AND blnAdmin = False AND blnModerator = False Then 'Display the user as an annoy Response.Write(strTxtAnnoymous) 'Else display the users name Else %><% = strUsername %><% End If %> <% Response.Write(DateFormat(dtmLastActive) & " " & strTxtAt & " " & TimeFormat(dtmLastActive)) %> <% = DateDiff("n", dtmLoggedIn, dtmLastActive) %> <% = strTxtMinutes %> <% = strOSbrowser %> <% = strLocation %><% If strLocation <> "" AND strURL <> "" Then Response.Write("
") %><% = strURL %>

<% = strTxtDataBasedOnActiveUsersInTheLastXMinutes %>

<% '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** If blnLCode = True Then If blnTextLinks = True Then Response.Write("Bulletin Board Software by Web Wiz Forums version " & strVersion & "") Else Response.Write("") End If Response.Write("
Copyright ©2001-2006 Web Wiz Guide") End If '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** 'Display the process time If blnShowProcessTime Then Response.Write "

" & strTxtThisPageWasGeneratedIn & " " & FormatNumber(Timer() - dblStartTime, 3) & " " & strTxtSeconds & "
" %>