<% @ 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 response buffer to true Response.Buffer = True 'Dimension variables Dim intForum 'Holds the number of fourms Dim lngTopic 'Holds the number of topics Dim dtmTopic 'Holds the date of the last topic Dim lngPost 'Holds the number of posts Dim dtmPost 'Holds the date of the last post Dim lngPm 'Holds the number of private messages Dim dtmPm 'Holds the date of the last private message Dim lngPoll 'Holds the number of polls Dim intActiveUsers 'Holds the number of active users Dim intGroups 'Holds the number of groups Dim lngMember 'Holds the number of members Dim dtmMember 'Holds the date of the last members signup Dim lngUserID 'Holds the active users ID Dim strActUser 'Holds the active users username Dim strForumName 'Holds the forum name Dim intGuestNumber 'Holds the Guest Number Dim intActiveGuests 'Holds the number of active guests Dim intActiveMembers 'Holds the nunber of active members Dim strBrowserUserType 'Holds the users browser type Dim strOS 'Holds the users OS Dim dtmLastActive 'Holds the last active date Dim dtmLoggedIn 'Holds the date the user logged in 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 strUsername 'Holds the username 'Initilise variables intActiveMembers = 0 intActiveGuests = 0 intActiveUsers = 0 intGuestNumber = 0 intForum = 0 lngTopic = 0 lngPost = 0 lngPm = 0 intActiveUsers = 0 intGroups = 0 lngMember = 0 'Initialise the SQL variable with an SQL statement to get the configuration details from the database strSQL = "SELECT " & strDbTable & "Configuration.* From " & strDbTable & "Configuration WHERE " & strDbTable & "Configuration.ID = 1;" 'Query the database rsCommon.Open strSQL, adoCon 'Read in ifg active users is anbaled If NOT rsCommon.EOF Then blnActiveUsers = CBool(rsCommon("Active_users")) 'Clean up rsCommon.Close '****************************************** '*** Read in the Counts *** '****************************************** 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Forum.No_of_topics, " & strDbTable & "Forum.No_of_posts FROM " & strDbTable & "Forum;" 'Query the database rsCommon.Open strSQL, adoCon 'Get the number of topics posts and forums Do While NOT rsCommon.EOF 'Count the number of forums intForum = intForum + 1 'Count the number of topics lngTopic = lngTopic + CLng(rsCommon("No_of_topics")) 'Count the number of posts lngPost = lngPost + CLng(rsCommon("No_of_posts")) 'Move to the next record rsCommon.MoveNext Loop 'Clean up rsCommon.Close 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT Count(" & strDbTable & "Author.Author_ID) AS CountAuthor FROM " & strDbTable & "Author;" 'Query the database rsCommon.Open strSQL, adoCon 'Read in the count If NOT rsCommon.EOF Then lngMember = CLng(rsCommon("CountAuthor")) 'Clean up rsCommon.Close 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT Count(" & strDbTable & "PMMessage.PM_ID) AS CountPm FROM " & strDbTable & "PMMessage;" 'Query the database rsCommon.Open strSQL, adoCon 'Read in the count If NOT rsCommon.EOF Then lngPm = CLng(rsCommon("CountPm")) 'Clean up rsCommon.Close 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT Count(" & strDbTable & "Poll.Poll_ID) AS CountPoll FROM " & strDbTable & "Poll;" 'Query the database rsCommon.Open strSQL, adoCon 'Read in the count If NOT rsCommon.EOF Then lngPoll = CLng(rsCommon("CountPoll")) 'Clean up rsCommon.Close 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT Count(" & strDbTable & "Group.Group_ID) AS CountGroup FROM " & strDbTable & "Group;" 'Query the database rsCommon.Open strSQL, adoCon 'Read in the count If NOT rsCommon.EOF Then intGroups = CLng(rsCommon("CountGroup")) 'Clean up rsCommon.Close '****************************************** '*** Read in Dates *** '****************************************** 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT" & strDBTop1 & " " & strDbTable & "Thread.Message_date " & _ "FROM " & strDbTable & "Thread, " & strDbTable & "Topic " & _ "WHERE " & strDbTable & "Thread.Thread_ID = " & strDbTable & "Topic.Start_Thread_ID " & _ "ORDER BY " & strDbTable & "Thread.Message_date DESC" & strDBLimit1 & ";" 'Query the database rsCommon.Open strSQL, adoCon 'Read in the count If NOT rsCommon.EOF Then dtmTopic = CDate(rsCommon("Message_date")) 'Clean up rsCommon.Close 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT" & strDBTop1 & " " & strDbTable & "Thread.Message_date FROM " & strDbTable & "Thread ORDER BY " & strDbTable & "Thread.Message_date DESC" & strDBLimit1 & ";" 'Query the database rsCommon.Open strSQL, adoCon 'Read in the count If NOT rsCommon.EOF Then dtmPost = CDate(rsCommon("Message_date")) 'Clean up rsCommon.Close 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT" & strDBTop1 & " " & strDbTable & "Author.Join_date FROM " & strDbTable & "Author ORDER BY " & strDbTable & "Author.Join_date DESC" & strDBLimit1 & ";" 'Query the database rsCommon.Open strSQL, adoCon 'Read in the count If NOT rsCommon.EOF Then dtmMember = CDate(rsCommon("Join_date")) 'Clean up rsCommon.Close 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT" & strDBTop1 & " " & strDbTable & "PMMessage.PM_Message_date FROM " & strDbTable & "PMMessage ORDER BY " & strDbTable & "PMMessage.PM_Message_date DESC" & strDBLimit1 & ";" 'Query the database rsCommon.Open strSQL, adoCon 'Read in the count If NOT rsCommon.EOF Then dtmPm = CDate(rsCommon("PM_Message_date")) 'Clean up rsCommon.Close %> Forum Statistics <% '***** 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 ****** %>

Forum Statistics


Control Panel Menu

Below is a list of statistics for the board.



Forum Statistics
Number of Forums <% = intForum %>    
Number of Topics <% = lngTopic %> Last New Topic <% = FormatDateTime(dtmTopic, vbLongDate) & ", " & FormatDateTime(dtmTopic, vbShortTime) %>
Number of Posts <% = lngPost %> Last New Post <% = FormatDateTime(dtmPost, vbLongDate) & ", " & FormatDateTime(dtmPost, vbShortTime) %>
Number of Members <% = lngMember %> Last New Member <% = FormatDateTime(dtmMember, vbLongDate) & ", " & FormatDateTime(dtmMember, vbShortTime) %>
Number of Private Messages <% = lngPm %> Last Private Message <% = FormatDateTime(dtmPm, vbLongDate) & ", " & FormatDateTime(dtmPm, vbShortTime) %>
Number of Polls <% = lngPoll %>    
Number of User Groups <% = intGroups %>    



<% If blnActiveUsers Then 'Initialise the array from the application veriable If IsArray(Application(strAppPrefix & "saryAppActiveUsersTable")) Then 'Place the application level active users array into a temporary dynaimic array saryActiveUsers = Application(strAppPrefix & "saryAppActiveUsersTable") 'Else Initialise the an empty array Else ReDim saryActiveUsers(8,0) End If 'Sort the active users array Call SortActiveUsersList(saryActiveUsers) '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 End If Next 'Calculate the number of members online and total people online intActiveUsers = UBound(saryActiveUsers, 2) intActiveMembers = intActiveUsers - intActiveGuests %>
<% = strTxtThereAreCurrently & " " & intActiveUsers & " " & strTxtActiveUsers & " " & strTxtOnLine & ", " & intActiveGuests & " " & strTxtGuests & " and " & intActiveMembers & " " & strTxtMembers %>
<% = strTxtRefreshPage %> 
<% 'display the active users For intArrayPass = 1 To UBound(saryActiveUsers, 2) '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)) 'Write the HTML of the Topic descriptions as hyperlinks to the Topic details and message %> <% Next %>
<% = strTxtUsername %> IP <% = 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) 'Else display the users name Else %><% = strUsername %><% End If %> <% Response.Write(saryActiveUsers(0, intArrayPass)) %> <% Response.Write(DateFormat(dtmLoggedIn) & " " & strTxtAt & " " & TimeFormat(dtmLoggedIn)) %> <% = DateDiff("n", dtmLoggedIn, dtmLastActive) %> <% = strTxtMinutes %> <% = strOSbrowser %> <% = strLocation %><% If strLocation <> "" AND strURL <> "" Then Response.Write("
") %><% = strURL %>

This data is based on users active over the past twenty minutes


<% End If 'Clean up Call closeDatabase() %>