<% @ Language=VBScript %> <% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Guide - Web Wiz Forums '** http://www.webwizforums.com '** '** Copyright 2001-2006 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 e-mail ever! '** '** For correspondence or non support questions contact: - '** '** Web Wiz Guide, Unit 10E, Dawkins Road Industrial Estate, Poole, Dorset, UK, BH15 4JD '** '**************************************************************************************** 'Set the response buffer to true as we maybe redirecting and setting a cookie Response.Buffer = true '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 sarryForums 'Holds the recordset array for all the categories and forums Dim saryMemebrStats 'Holds the member stats Dim intForumID 'Holds the forum ID number Dim strCategory 'Holds the category name Dim intCatID 'Holds the id for the category Dim strForumName 'Holds the forum name Dim strForumDiscription 'Holds the forum description Dim strForumPassword 'Holds the forum password if there is one Dim lngNumberOfTopics 'Holds the number of topics in a forum Dim lngNumberOfPosts 'Holds the number of Posts in the forum Dim lngTotalNumberOfTopics 'Holds the total number of topics in a forum Dim lngTotalNumberOfPosts 'Holds the total number of Posts in the forum Dim intNumberofForums 'Holds the number of forums Dim lngLastEntryMeassgeID 'Holds the message ID of the last entry Dim dtmLastEntryDate 'Holds the date of the last entry to the forum Dim strLastEntryUser 'Holds the the username of the user who made the last entry Dim lngLastEntryUserID 'Holds the ID number of the last user to make and entry Dim dtmLastEntryDateAllForums 'Holds the date of the last entry to all fourms Dim strLastEntryUserAllForums 'Holds the the username of the user who made the last entry to all forums Dim lngLastEntryUserIDAllForums 'Holds the ID number of the last user to make and entry to all forums Dim blnForumLocked 'Set to true if the forum is locked Dim intForumColourNumber 'Holds the number to calculate the table row colour Dim blnHideForum 'Set to true if this is a hidden forum Dim intCatShow 'Holds the ID number of the category to show if only showing one category 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 strMembersOnline 'Holds the names of the members online Dim intSubForumID 'Holds the sub forum ID number Dim strSubForumName 'Holds the sub forum name Dim strSubForums 'Holds if there are sub forums Dim dtmLastSubEntryDate 'Holds the date of the last entry to the forum Dim strLastSubEntryUser 'Holds the the username of the user who made the last entry Dim lngLastSubEntryUserID 'Holds the ID number of the last user to make and entry Dim lngSubForumNumberOfPosts 'Holds the number of posts in the subforum Dim lngSubForumNumberOfTopics 'Holds the number of topics in the subforum Dim intTotalRecords 'Holds the number of records Dim intCurrentRecord 'Holds the current record position Dim intTempRecord 'Holds a temporary record position for looping through records for any checks Dim blnSubRead 'Holds if the user has entry to the sub forum Dim lngNoOfMembers 'Holds the number of forum members Dim intArrayPass 'Active users array counter Dim strBirthdays 'String containing all those with birtdays today Dim dtmNow 'Now date with off-set Dim intBirtdayLoopCounter 'Holds the bitrhday loop counter 'Initialise variables lngTotalNumberOfTopics = 0 lngTotalNumberOfPosts = 0 intNumberofForums = 0 intForumColourNumber = 0 intActiveMembers = 0 intActiveGuests = 0 intActiveUsers = 0 intTotalRecords = 0 lngNoOfMembers = 0 intBirtdayLoopCounter = 0 'Read in the category to show If Request.QueryString("C") Then intCatShow = CInt(Request.QueryString("C")) Else intCatShow = 0 End If 'Read the various categories, forums, and permissions from the database in one hit for extra performance 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "" & _ "SELECT " & strDbTable & "Category.Cat_ID, " & strDbTable & "Category.Cat_name, " & strDbTable & "Forum.Forum_ID, " & strDbTable & "Forum.Sub_ID, " & strDbTable & "Forum.Forum_name, " & strDbTable & "Forum.Forum_description, " & strDbTable & "Forum.No_of_topics, " & strDbTable & "Forum.No_of_posts, " & strDbTable & "Author.Username, " & strDbTable & "Forum.Last_post_author_ID, " & strDbTable & "Forum.Last_post_date, " & strDbTable & "Forum.Password, " & strDbTable & "Forum.Locked, " & strDbTable & "Forum.Hide, " & strDbTable & "Permissions.View_Forum " & _ "FROM " & strDbTable & "Category" & strDBNoLock & ", " & strDbTable & "Forum" & strDBNoLock & ", " & strDbTable & "Permissions" & strDBNoLock & ", " & strDbTable & "Author" & strDBNoLock & " " & _ "WHERE " & strDbTable & "Category.Cat_ID = " & strDbTable & "Forum.Cat_ID " & _ "AND " & strDbTable & "Forum.Forum_ID = " & strDbTable & "Permissions.Forum_ID " & _ "AND " & strDbTable & "Forum.Last_post_author_ID = " & strDbTable & "Author.Author_ID " & _ "AND (" & strDbTable & "Permissions.Author_ID = " & lngLoggedInUserID & " OR " & strDbTable & "Permissions.Group_ID = " & intGroupID & ") " & _ "ORDER BY " & strDbTable & "Category.Cat_order, " & strDbTable & "Forum.Forum_Order;" 'Set error trapping On Error Resume Next 'Query the database rsCommon.Open strSQL, adoCon 'If an error has occured write an error to the page If Err.Number <> 0 Then Call errorMsg("An error has occured while executing SQL query on database.", "get_forum_data", "default.asp") 'Disable error trapping On Error goto 0 'Place the recordset into an array If NOT rsCommon.EOF Then sarryForums = rsCommon.GetRows() intTotalRecords = Ubound(sarryForums,2) + 1 End If 'Close the recordset rsCommon.Close 'SQL Query Array Look Up table '0 = Cat_ID '1 = Cat_name '2 = Forum_ID '3 = Sub_ID '4 = Forum_name '5 = Forum_description '6 = No_of_topics '7 = No_of_posts '8 = Last_post_author '9 = Last_post_author_ID '10 = Last_post_date '11 = Password '12 = Locked '13 = Hide '14 = Read 'Get the last signed up user and member stats and birthdays for use at bottom of page If blnDisplayBirthdays Then 'Get the now date with time off-set dtmNow = getNowDate() 'Initalise the strSQL variable with an SQL statement to query the database strSQL = "SELECT " & strDbTable & "Author.Username, " & strDbTable & "Author.Author_ID, " & strDbTable & "Author.DOB " & _ "FROM " & strDbTable & "Author" & strDBNoLock & " " & _ "WHERE MONTH(" & strDbTable & "Author.DOB) = " & Month(dtmNow) & " " & _ "AND DAY(" & strDbTable & "Author.DOB) = " & Day(dtmNow) & " " & _ "ORDER BY " & strDbTable & "Author.Author_ID DESC;" 'Set error trapping On Error Resume Next 'Query the database rsCommon.Open strSQL, adoCon 'If an error has occured write an error to the page If Err.Number <> 0 AND strDatabaseType = "mySQL" Then Call errorMsg("An error has occured while executing SQL query on database.
Please check that the MySQL Server version is 4.1 or above.", "get_birthdays", "default.asp") ElseIf Err.Number <> 0 Then Call errorMsg("An error has occured while executing SQL query on database.", "get_birthdays", "default.asp") End If 'Disable error trapping On Error goto 0 'Place the recordset into an array If NOT rsCommon.EOF Then 'Read the recordset into an array saryMemebrStats = rsCommon.GetRows() 'Loop through to get all members with birthdays today Do While intBirtdayLoopCounter <= Ubound(saryMemebrStats, 2) 'If bitrhday is found for this date then add it to string If Month(dtmNow) = Month(saryMemebrStats(2, intBirtdayLoopCounter)) AND Day(dtmNow) = Day(saryMemebrStats(2, intBirtdayLoopCounter)) Then 'If there is already one birthday then place a comma before the next If strBirthdays <> "" Then strBirthdays = strBirthdays & ", " 'Place the birthday into the Birthday array strBirthdays = strBirthdays & "" & saryMemebrStats(0, intBirtdayLoopCounter) & " (" & Fix(DateDiff("m", saryMemebrStats(2, intBirtdayLoopCounter), Year(dtmNow) & "-" & Month(dtmNow) & "-" & Day(dtmNow))/12) & ")" End If 'Increment loop counter by 1 intBirtdayLoopCounter = intBirtdayLoopCounter + 1 Loop End If 'Close recordset rsCommon.close End If 'Read in some stats about the last members strSQL = "SELECT " & strDBTop1 & " " & strDbTable & "Author.Username, " & strDbTable & "Author.Author_ID " If NOT strDatabaseType = "mySQL" Then strSQL = strSQL & ", (SELECT COUNT (*) FROM " & strDbTable & "Author WHERE 1=1) AS memberCount " strSQL = strSQL & _ "FROM " & strDbTable & "Author" & strDBNoLock & " " & _ "ORDER BY " & strDbTable & "Author.Author_ID DESC " & strDBLimit1 & ";" 'Set error trapping On Error Resume Next 'Query the database rsCommon.Open strSQL, adoCon 'If an error has occured write an error to the page If Err.Number <> 0 Then Call errorMsg("An error has occured while executing SQL query on database.", "get_last_USR_+_count", "default.asp") 'Disable error trapping On Error goto 0 'Place the recordset into an array If NOT rsCommon.EOF Then 'Read in member count from database (if NOT mySQL) If NOT strDatabaseType = "mySQL" Then lngNoOfMembers = CLng(rsCommon("memberCount")) 'Read the recordset into an array saryMemebrStats = rsCommon.GetRows() End If 'Close recordset rsCommon.close 'We have tgo use a seporate query to count the number of members in mySQL If strDatabaseType = "mySQL" Then 'Count the number of members strSQL = "SELECT Count(" & strDbTable & "Author.Author_ID) AS memberCount " & _ "FROM " & strDbTable & "Author;" 'Set error trapping On Error Resume Next 'Query the database rsCommon.Open strSQL, adoCon 'If an error has occured write an error to the page If Err.Number <> 0 Then Call errorMsg("An error has occured while executing SQL query on database.", "member_count", "default.asp") 'Disable error trapping On Error goto 0 'Read in member count from database lngNoOfMembers = CLng(rsCommon("memberCount")) 'Close recordset rsCommon.close End If 'If active users is enabled update the active users application array If blnActiveUsers Then 'Call active users function saryActiveUsers = activeUsers("", strTxtForumIndex, "default.asp", 0) End If %> <% = strMainForumName %> <% '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** If blnLCode Then Response.Write(vbCrLf & "" & _ vbCrLf & "") End If Response.Write(vbCrLf & vbCrLf & "" & vbCrLf) '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** 'If RSS Feed is enabled then have an alt link to the XML file for supporting browsers If blnRSS Then Response.Write(vbCrLf & "") %> <% 'If the user has not logged in (guest user ID = 2) then show them a quick login form If lngLoggedInUserID = 2 Then Response.Write(" ") End If Response.Write(vbCrLf & " ") 'If RSS feed is enabled then have an RSS button If blnRSS Then Response.Write(" " & _ vbCrLf & " " & _ vbCrLf & " ") End If %>
<% = strTxtTheTimeNowIs & " " & TimeFormat(now()) %>
<% 'If this is not the first time the user has visted the site display the last visit time and date If IsDate(Request.Cookies(strCookieName)("LV")) Then If dtmLastVisitDate < CDate(Request.Cookies(strCookieName)("LV")) Then Response.Write(strTxtYouLastVisitedOn & " " & DateFormat(dtmLastVisitDate) & " " & strTxtAt & " " & TimeFormat(dtmLastVisitDate)) End If End If 'Display main page link if in a category view If intCatShow <> 0 Then Response.Write("
 " & strMainForumName & "") %>
" & _ vbCrLf & "
" & strTxtQuickLogin & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & "
" & _ vbCrLf & "
<% 'Check there are categories to display If intTotalRecords = 0 Then %>
  <% = strTxtForum %> <% = strTxtTopics %> <% = strTxtPosts %> <% = strTxtLastPost %>
<% = strTxtNoForums %>
<% 'Else there the are categories so write the HTML to display categories and the forum names and a discription Else 'Loop round to show all the categories and forums Do While intCurrentRecord <= Ubound(sarryForums,2) 'Loop through the array looking for forums that are to be shown 'if a forum is found to be displayed then show the category and the forum, if not the category is not displayed as there are no forums the user can access Do While intCurrentRecord <= Ubound(sarryForums,2) 'Read in details blnHideForum = CBool(sarryForums(13,intCurrentRecord)) blnRead = CBool(sarryForums(14,intCurrentRecord)) 'If this forum is to be shown then leave the loop and display the cat and the forums If blnHideForum = False OR blnRead = True Then Exit Do 'Move to next record intCurrentRecord = intCurrentRecord + 1 Loop 'If we have run out of records jump out of loop If intCurrentRecord > Ubound(sarryForums,2) Then Exit Do 'Read in the details from the array of this category intCatID = CInt(sarryForums(0,intCurrentRecord)) strCategory = sarryForums(1,intCurrentRecord) %> <% 'Display the category name Response.Write vbCrLf & " " 'If the user only wants to see one category, only display the forums for that category If intCatShow = intCatID OR intCatShow = 0 Then 'Loop round to display all the forums for this category Do While intCurrentRecord <= Ubound(sarryForums,2) 'Initialise variables strSubForums = "" 'Read in the details for this forum intForumID = CInt(sarryForums(2, intCurrentRecord)) intSubForumID = CInt(sarryForums(3, intCurrentRecord)) strForumName = sarryForums(4, intCurrentRecord) strForumDiscription = sarryForums(5, intCurrentRecord) lngNumberOfTopics = CLng(sarryForums(6, intCurrentRecord)) lngNumberOfPosts = CLng(sarryForums(7, intCurrentRecord)) strLastEntryUser = sarryForums(8, intCurrentRecord) If isNumeric(sarryForums(9, intCurrentRecord)) Then lngLastEntryUserID = CLng(sarryForums(9, intCurrentRecord)) Else lngLastEntryUserID = 0 If isDate(sarryForums(10, intCurrentRecord)) Then dtmLastEntryDate = CDate(sarryForums(10, intCurrentRecord)) Else dtmLastEntryDate = CDate("2001-01-01 00:00:00") strForumPassword = sarryForums(11, intCurrentRecord) blnForumLocked = CBool(sarryForums(12, intCurrentRecord)) blnHideForum = CBool(sarryForums(13, intCurrentRecord)) blnRead = CBool(sarryForums(14, intCurrentRecord)) 'If this forum is to be hidden but the user is allowed access to it set the hidden boolen back to false If blnHideForum = True AND blnRead = True Then blnHideForum = False 'If the forum is not a hidden forum to this user, display it If blnHideForum = False AND intSubForumID = 0 Then 'Stats *********** 'Count the number of forums intNumberofForums = intNumberofForums + 1 'Add all the posts and topics together to get the total number for the stats at the bottom of the page lngTotalNumberOfPosts = lngTotalNumberOfPosts + lngNumberOfPosts lngTotalNumberOfTopics = lngTotalNumberOfTopics + lngNumberOfTopics 'Calculate the last forum entry across all forums for the statistics at the bottom of the forum If dtmLastEntryDateAllForums < dtmLastEntryDate Then strLastEntryUserAllForums = strLastEntryUser lngLastEntryUserIDAllForums = lngLastEntryUserID dtmLastEntryDateAllForums = dtmLastEntryDate End If 'Get the row number intForumColourNumber = intForumColourNumber + 1 'Display if this forum has any subforums '*************************************** 'Initilise variables intTempRecord = 0 'Loop round to read in any sub forums in the stored array recordset Do While intTempRecord <= Ubound(sarryForums,2) 'Becuase the member may have an individual permission entry in the permissions table for this forum, 'it maybe listed twice in the array, so we need to make sure we don't display the same forum twice If intSubForumID = CInt(sarryForums(2,intTempRecord)) Then intTempRecord = intTempRecord + 1 'If there are no records left exit loop If intTempRecord > Ubound(sarryForums,2) Then Exit Do 'If this is a subforum of the main forum then get the details If CInt(sarryForums(3,intTempRecord)) = intForumID Then 'Read in sub forum details from the database intSubForumID = CInt(sarryForums(2,intTempRecord)) strSubForumName = sarryForums(4,intTempRecord) lngSubForumNumberOfTopics = CLng(sarryForums(6,intTempRecord)) lngSubForumNumberOfPosts = CLng(sarryForums(7,intTempRecord)) strLastSubEntryUser = sarryForums(8,intCurrentRecord) If isNumeric(sarryForums(9,intCurrentRecord)) Then lngLastSubEntryUserID = CLng(sarryForums(9,intCurrentRecord)) Else lngLastEntryUserID = 0 If isDate(sarryForums(10,intCurrentRecord)) Then dtmLastSubEntryDate = CDate(sarryForums(10,intCurrentRecord)) Else dtmLastSubEntryDate = Now() blnHideForum = CBool(sarryForums(13,intTempRecord)) blnSubRead = CBool(sarryForums(14,intTempRecord)) 'If this sub forum is to be hidden and but the user is allowed access to it set the hidden boolen back to false If blnHideForum = True AND blnSubRead = True Then blnHideForum = False 'If the sub forum is to be hidden then don't show it If blnHideForum = False Then 'Stats ********** 'Count the number of forums intNumberofForums = intNumberofForums + 1 'Add all the posts and topics together to get the total number for the stats at the bottom of the page lngTotalNumberOfPosts = lngTotalNumberOfPosts + lngSubForumNumberOfPosts lngTotalNumberOfTopics = lngTotalNumberOfTopics + lngSubForumNumberOfTopics 'Calculate the last forum entry across all forums for the statistics at the bottom of the forum If dtmLastEntryDateAllForums < dtmLastSubEntryDate Then strLastEntryUserAllForums = strLastSubEntryUser lngLastEntryUserIDAllForums = lngLastSubEntryUserID dtmLastEntryDateAllForums = dtmLastSubEntryDate End If 'If there are other sub forums place a comma inbetween If strSubForums <> "" Then strSubForums = strSubForums & "" 'Display the sub forum strSubForums = strSubForums & "" & strSubForumName & "
" End If End If 'Move to next record intTempRecord = intTempRecord + 1 Loop 'If there are sub forums If strSubForums <> "" Then strSubForums = "
" & strSubForums 'Write the HTML of the forum descriptions and hyperlinks to the forums 'Calculate row colour Response.Write(vbCrLf & " ") Else Response.Write("class=""oddTableRow"">") Response.Write(vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " " & _ vbCrLf & " ") End If 'Move to the next database record intCurrentRecord = intCurrentRecord + 1 'If there are more records in the array to display then run some test to see what record to display next and where If intCurrentRecord <= Ubound(sarryForums,2) Then 'Becuase the member may have an individual permission entry in the permissions table for this forum, 'it maybe listed twice in the array, so we need to make sure we don't display the same forum twice If intForumID = CInt(sarryForums(2,intCurrentRecord)) Then intCurrentRecord = intCurrentRecord + 1 'If there are no records left exit loop If intCurrentRecord > Ubound(sarryForums,2) Then Exit Do 'If this is a subforum jump to the next record, unless we have run out of forums Do While CInt(sarryForums(3,intCurrentRecord)) > 0 'Go to next record intCurrentRecord = intCurrentRecord + 1 'If we have run out of records jump out of loop If intCurrentRecord > Ubound(sarryForums,2) Then Exit Do Loop 'If there are no records left exit loop If intCurrentRecord > Ubound(sarryForums,2) Then Exit Do 'See if the next forum is in a new category, if so jump out of this loop to display the next category If intCatID <> CInt(sarryForums(0,intCurrentRecord)) Then Exit Do End If 'Loop back round to display next forum Loop 'Else we are not displaying forums in this category so we need to move to the next category in the array Else 'Loop through the forums array till we get to the next category Do While CInt(sarryForums(0,intCurrentRecord)) = intCatID 'Go to next record intCurrentRecord = intCurrentRecord + 1 'If we have run out of records jump out of forums loop into the category loop If intCurrentRecord > Ubound(sarryForums,2) Then Exit Do Loop End If %>
  <% = strTxtForum %> <% = strTxtTopics %> <% = strTxtPosts %> <% = strTxtLastPost %>
" & strCategory & "
") 'If the user has no access to a forum diplay a no access icon If blnRead = False Then Response.Write ("") 'If the forum requires a password diplay the password icon ElseIf strForumPassword <> "" Then Response.Write ("") 'If the forum is read only and has new posts show the locked new posts icon ElseIf CDate(dtmLastVisitDate) < dtmLastEntryDate AND (blnForumLocked = True) AND blnAdmin = False AND blnModerator = False Then Response.Write ("") 'If the forum is read only show the locked new posts icon ElseIf blnForumLocked Then Response.Write ("") 'If the forum has new posts show the new posts icon ElseIf CDate(dtmLastVisitDate) < dtmLastEntryDate Then Response.Write ("") 'If the forum is open but with no new replies Else Response.Write ("") End If Response.Write("") 'If this is the forum admin then let them have access to the forum admin pop up window If blnAdmin Then Response.Write("") 'Display forum Response.Write("" & strForumName & "") 'Display the number of people viewing in that forum If blnForumViewing AND blnActiveUsers Then If viewingForum(intForumID) > 0 Then Response.Write(" (" & viewingForum(intForumID) & " " & strTxtViewing & ")") End If 'Display forum details Response.Write("
" & strForumDiscription & strSubForums & "
" & lngNumberOfTopics & "" & lngNumberOfPosts & "") If lngNumberOfPosts <> 0 Then 'Don't disply last post details if there are none Response.Write(DateFormat(dtmLastEntryDate) & " " & strTxtAt & " " & TimeFormat(dtmLastEntryDate) & "" & _ "
" & strTxtBy & " " & strLastEntryUser & " ") End If Response.Write("

<% 'Loop back round for next category Loop End If %>
<% If strDatabaseType = "Access" Then %> <% Dim rsEnSonMesajlar Dim intSay Dim rsLatestPosts2 Dim sql2 Dim LastLatestPostsDateTime Dim LastLatestPostsDate Dim LastLatestPostsTime Set rsEnSonMesajlar = Server.CreateObject("ADODB.Recordset") strSql = "Select " & strDbTable & "Topic.Subject, " & strDbTable & "Topic.Topic_ID, " & strDbTable & "Forum.Forum_ID, " & strDbTable & "Forum.Forum_name, " & strDbTable & "Topic.Last_Thread_ID, " & strDbTable & "Topic.No_of_views " strSql = strSql & "From " & strDbTable & "Topic, " & strDbTable & "Forum Where " & strDbTable & "Topic.Hide = False And " & strDbTable & "Topic.Forum_ID = " & strDbTable & "Forum.Forum_ID Order By " & strDbTable & "Topic.Last_Thread_ID desc" rsEnSonMesajlar.Open strSQL, adoCon For intSay = 1 to 10 if rsEnSonMesajlar.Eof Then Exit For Set rsLatestPosts2 = Server.CreateObject("ADODB.Recordset") sql2 = "SELECT tblThread.Thread_ID, tblThread.Topic_ID, tblThread.Message_date, tblAuthor.Username, tblAuthor.Author_ID FROM (tblAuthor INNER JOIN tblThread ON tblAuthor.Author_ID = tblThread.Author_ID) WHERE tblThread.Hide = False And Topic_ID= " & rsEnSonMesajlar("Topic_ID") & " order by Message_date desc" rsLatestPosts2.Open sql2, adoCon LastLatestPostsDateTime = rsLatestPosts2("Message_date") LastLatestPostsDate = DateFormat(LastLatestPostsDateTime) LastLatestPostsTime = TimeFormat(LastLatestPostsDateTime) Response.Write "" rsEnSonMesajlar.MoveNext Next end if %>
En Son Mesaj Yazılan Konular
Konu Forum Yazan Tarih Okunma
 " & rsEnSonMesajlar("Subject") & "" & rsEnSonMesajlar("Forum_name") & ""&rsLatestPosts2("Username") &"" & LastLatestPostsDate & "-" & LastLatestPostsTime & "" & rsEnSonMesajlar("No_of_views") & "

<% 'Get the number of active users if enabled If blnActiveUsers Then %> <% 'If birthdays is enabled show who has a birthday today If strBirthdays <> "" Then %> <% End If %>
<% = strTxtWhatsGoingOn %>
<% = strTxtForumStatistics %>
<% = strTxtForumStatistics %> <% Response.Write(strTxtOurUserHavePosted & " " & FormatNumber(lngTotalNumberOfPosts, 0) & " " & strTxtPostsIn & " " & FormatNumber(lngTotalNumberOfTopics, 0) & " " & strTxtTopicsIn & " " & intNumberofForums & " " & strTxtForums & _ "
" & strTxtLastPost & "; " & DateFormat(dtmLastEntryDateAllForums) & " " & strTxtAt & " " & TimeFormat(dtmLastEntryDateAllForums) & " " & strTxtBy & " " & strLastEntryUserAllForums & "") 'Display some statistics for the members If lngNoOfMembers > 0 Then Response.Write("
" & strTxtWeHave & " " & FormatNumber(lngNoOfMembers, 0) & " " & strTxtForumMembers & _ "
" & strTxtTheNewestForumMember & " " & saryMemebrStats(0, 0) & "") End If %>
<% = strTxtActiveUsers %>
<% = strTxtActiveUsers %> <% '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 add the name of the members name of the active users to the members online string ElseIf CBool(saryActiveUsers(8, intArrayPass)) = false Then If strMembersOnline <> "" Then strMembersOnline = strMembersOnline & ", " strMembersOnline = strMembersOnline & "" & saryActiveUsers(2, intArrayPass) & "" End If Next 'Calculate the number of members online and total people online intActiveUsers = UBound(saryActiveUsers, 2) intActiveMembers = intActiveUsers - intActiveGuests Response.Write(strTxtInTotalThereAre & " " & intActiveUsers & " " & strTxtActiveUsers & " " & strTxtOnLine & ", " & intActiveGuests & " " & strTxtGuestsAnd & " " & intActiveMembers & " " & strTxtMembers) If strMembersOnline <> "" Then Response.Write(vbCrLf & "
" & strTxtMembers & " " & strTxtOnLine & ": " & strMembersOnline) End If %>
<% = strTxtTodaysBirthdays %>
<% = strTxtTodaysBirthdays %> <% = strBirthdays %>
Bugün Forumu Ziyaret Eden Üyeler
<% = strTxtActiveUsers %> <% Dim Num Num = 0 Dim Visiters_of_Members_Today Dim LngMmeber_Vistor_ID Dim GroupID_type If strDatabaseType = "SQLServer" Then strSQL = "SELECT tblAuthor.Username, tblAuthor.Author_ID, tblAuthor.Group_ID " strSQL = strSQL & "FROM tblAuthor " strSQL = strSQL & "where day(tblAuthor.Last_visit) = day(getdate()) and month(tblAuthor.Last_visit) = month(getdate()) and year(tblAuthor.Last_visit) = year(getdate()) " strSQL = strSQL & "ORDER BY tblAuthor.Last_visit DESC;" Else strSQL = "SELECT tblAuthor.Username, tblAuthor.Author_ID, tblAuthor.Group_ID " strSQL = strSQL & "FROM tblAuthor " strSQL = strSQL & "where day(tblAuthor.Last_visit) = day(Date()) and month(tblAuthor.Last_visit) = month(Date()) and year(tblAuthor.Last_visit) = year(Date())" strSQL = strSQL & "ORDER BY tblAuthor.Last_visit DESC;" End If 'Query the database rsCommon.Open strSQL, adoCon do while NOT rsCommon.EOF Num = Num + 1 Visiters_of_Members_Today = rsCommon("Username") LngMmeber_Vistor_ID = rsCommon("Author_ID") GroupID_type = rsCommon("Group_ID") If GroupID_type = 1 Then Response.Write(vbCrLf & "  " & Visiters_of_Members_Today & "") If GroupID_type = 3 Then Response.Write(vbCrLf & "  " & Visiters_of_Members_Today & "") If GroupID_type = 4 Then Response.Write(vbCrLf & "  " & Visiters_of_Members_Today & "") If GroupID_type = 5 Then Response.Write(vbCrLf & "  " & Visiters_of_Members_Today & "") If GroupID_type = 6 Then Response.Write(vbCrLf & "  " & Visiters_of_Members_Today & "") If GroupID_type > 6 Then Response.Write(vbCrLf & "  " & Visiters_of_Members_Today & "") rsCommon.MoveNext Loop %>

<% Response.Write("

" & "Bugün Forumu " & Num & " üye ziyaret etti
Yönetici Moderatör Kıdemli Üye Üye Yeni Üye
" ) 'Clean up Call closeDatabase() %>


<% = strTxtOpenForum %> <% = strTxtOpenForum %> <% = strTxtReadOnly %> <% = strTxtReadOnly %> <% = strTxtPasswordRequired %> <% = strTxtPasswordRequired %>
<% = strTxtOpenForumNewReplies %> <% = strTxtOpenForumNewReplies %> <% = strTxtReadOnlyNewReplies %> <% = strTxtReadOnlyNewReplies %> <% = strTxtNoAccess %> <% = strTxtNoAccess %>

<% = strTxtMarkAllPostsAsRead %> :: <% = strTxtDeleteCookiesSetByThisForum %>

<% = strTxtCookies %>


<% 'Display the process time If blnShowProcessTime Then Response.Write "

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