<% @ Language=VBScript codepage=1255 %> <% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Guide - Web Wiz Forums '** '** Copyright 2001-2003 Bruce Corkhill All Rights Reserved. '** '** This program is free software; you can modify (at your own risk) any part of it '** under the terms of the License that accompanies this software and use it both '** privately and commercially. '** '** All copyright notices must remain in tacked in the scripts and the '** outputted HTML. '** '** You may use parts of this program in your own private work, but you may NOT '** redistribute, repackage, or sell the whole or any part of this program even '** if it is modified or reverse engineered in whole or in part without express '** permission from the author. '** '** You may not pass the whole or any part of this application off as your own work. '** '** All links to Web Wiz Guide and powered by logo's must remain unchanged and in place '** and must remain visible when the pages are viewed unless permission is first granted '** by the copyright holder. '** '** This program is distributed in the hope that it will be useful, '** but WITHOUT ANY WARRANTY; without even the implied warranty of '** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER '** WARRANTIES WHETHER EXPRESSED OR IMPLIED. '** '** You should have received a copy of the License along with this program; '** if not, write to:- Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom. '** '** '** No official support is available for this program but you may post support questions at: - '** http://www.webwizguide.info/forum '** '** Support questions are NOT answered by email ever! '** '** For correspondence or non support questions contact: - '** info@webwizguide.info '** '** or at: - '** '** Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom '** '**************************************************************************************** '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 blnActiveUsers 'Set to true if active users is enabled 'Initiliase vraibles 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 If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "SelectConfiguration" Else strSQL = "SELECT " & strDbTable & "Configuration.* From " & strDbTable & "Configuration;" End If '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 TOP 1 " & strDbTable & "Topic.Start_date FROM " & strDbTable & "Topic ORDER BY " & strDbTable & "Topic.Start_date DESC;" 'Query the database rsCommon.Open strSQL, adoCon 'Read in the count If NOT rsCommon.EOF Then dtmTopic = CDate(rsCommon("Start_date")) 'Clean up rsCommon.Close 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT TOP 1 " & strDbTable & "Thread.Message_date FROM " & strDbTable & "Thread ORDER BY " & strDbTable & "Thread.Message_date DESC;" '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 TOP 1 " & strDbTable & "Author.Join_date FROM " & strDbTable & "Author ORDER BY " & strDbTable & "Author.Join_date DESC;" '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 TOP 1 " & strDbTable & "PMMessage.PM_Message_Date FROM " & strDbTable & "PMMessage ORDER BY " & strDbTable & "PMMessage.PM_Message_Date DESC;" '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 %> סטטיסטיקות הפורום

סטטיסטיקות הפורום
חזרה לתפריט הניהול

להלן רשימה של סטטיסטיקות הפורום.

סטטיסטיקות הפורום
מספר הפורומים <% = intForum %>    
מספר נושאים <% = lngTopic %> נושא חדש אחרון <% = FormatDateTime(dtmTopic, vbLongDate) & ", " & FormatDateTime(dtmTopic, vbShortTime) %>
מספר הודעות <% = lngPost %> הודעה חדשה אחרונה <% = FormatDateTime(dtmPost, vbLongDate) & ", " & FormatDateTime(dtmPost, vbShortTime) %>
מספר משתמשים <% = lngMember %> משתמש חדש אחרון <% = FormatDateTime(dtmMember, vbLongDate) & ", " & FormatDateTime(dtmMember, vbShortTime) %>
מספר הודעות פרטיות <% = lngPm %> הודעה פרטית אחרונה <% = FormatDateTime(dtmPm, vbLongDate) & ", " & FormatDateTime(dtmPm, vbShortTime) %>
מספר סקרים <% = lngPoll %>    
מספר קבוצות משתמשים <% = intGroups %>    


<% '****************************************** '*** Active users list *** '****************************************** 'If active sers is ebaled show the table If blnActiveUsers Then 'Get the number of active users 'Initialise the SQL variable with an SQL statement count the number of active users If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "CountOfActiveUsers" Else strSQL = "SELECT Count(" & strDbTable & "ActiveUser.Author_ID) AS ActiveUser From " & strDbTable & "ActiveUser;" End If 'Query the database rsCommon.Open strSQL, adoCon 'Read in the active users from the recordset intActiveUsers = CInt(rsCommon("ActiveUser")) 'Close the recordset rsCommon.Close 'Get the number of active guests 'Initialise the SQL variable with an SQL statement count the number of active guests If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "CountOfActiveGuests" Else strSQL = "SELECT Count(" & strDbTable & "ActiveUser.Author_ID) AS ActiveUser From " & strDbTable & "ActiveUser WHERE " & strDbTable & "ActiveUser.Author_ID=2;" End If 'Query the database rsCommon.Open strSQL, adoCon 'Read in the active guests from the recordset intActiveGuests = CInt(rsCommon("ActiveUser")) 'To save another database hit we can get the number of members online by taking the number of guest away from the total active users intActiveMembers = intActiveUsers - intActiveGuests 'Close the recordset rsCommon.Close Response.Write(" ישנם כרגע " & intActiveUsers & " משתמשים פעילים אונליין, " & intActiveGuests & " אורח(ים) ו- " & intActiveMembers & " משתמש(ים)
") %>
<% 'Initialise the SQL variable with an SQL statement to get the active users strSQL = "SELECT " & strDbTable & "ActiveUser.*, " & strDbTable & "Author.Username FROM " & strDbTable & "Author INNER JOIN " & strDbTable & "ActiveUser ON " & strDbTable & "Author.Author_ID = " & strDbTable & "ActiveUser.Author_ID ORDER BY " & strDbTable & "ActiveUser.Active DESC;" 'Query the database rsCommon.Open strSQL, adoCon 'display the active users Do While NOT rsCommon.EOF 'Read in the details from the rs lngUserID = CLng(rsCommon("Author_ID")) strActUser = rsCommon("Username") strBrowserUserType = rsCommon("Browser") strOS = rsCommon("OS") dtmLastActive = CDate(rsCommon("Active")) dtmLoggedIn = CDate(rsCommon("Login")) 'Write the HTML of the Topic descriptions as hyperlinks to the Topic details and message %> <% 'Move to the next record in the database rsCommon.MoveNext Loop 'Clean up rsCommon.Close %>
שם משתמש זמן התחברות פעילות אחרונה זמן פעילות דפדפן מערכת הפעלה
<% '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("אורח "& intGuestNumber) 'Else display the users name Else Response.Write(strActUser) End If %> <% Response.Write(FormatDateTime(dtmLoggedIn, vbLongDate) & " at " & FormatDateTime(dtmLoggedIn, vbShortTime)) %> <% Response.Write(FormatDateTime(dtmLastActive, vbLongDate) & " at " & FormatDateTime(dtmLastActive, vbShortTime)) %> <% = DateDiff("n", dtmLoggedIn, dtmLastActive) %>  Minutes <% = strBrowserUserType %> <% = strOS %>

המידע הזה מבוסס על המשתמשים שהיו פעילים בעשר הדקות האחרונות


<% End If 'Clean up Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing %>