<% @ 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 as we maybe redirecting 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 strForumName 'Holds the forum name Dim lngNumberOfReplies 'Holds the number of replies for a topic Dim lngTopicID 'Holds the topic ID Dim strSubject 'Holds the topic subject Dim strTopicIcon 'Holds the topic icon Dim strTopicStartUsername 'Holds the username of the user who started the topic Dim lngTopicStartUserID 'Holds the users Id number for the user who started the topic Dim lngNumberOfViews 'Holds the number of views a topic has had Dim lngLastEntryMessageID 'Holds the message ID of the last entry Dim strLastEntryUsername 'Holds the username of the last person to post a message in a topic Dim lngLastEntryUserID 'Holds the user's ID number of the last person to post a meassge in a topic Dim dtmLastEntryDate 'Holds the date the last person made a post in the topic Dim intRecordPositionPageNum 'Holds the recorset page number to show the topics for Dim intRecordLoopCounter 'Holds the loop counter numeber Dim intTopicPageLoopCounter 'Holds the number of pages there are in the forum Dim intLinkPageNum 'Holss the page number to link to Dim intShowTopicsFrom 'Holds when to show the topics from Dim strShowTopicsFrom 'Holds the display text from when the topics are shown from Dim blnForumLocked 'Set to true if the forum is locked Dim blnTopicLocked 'set to true if the topic is locked Dim intPriority 'Holds the priority level of the topic Dim dtmActiveFrom 'Holds the time to get active topics from Dim intNumberOfTopicPages 'Holds the number of topic pages Dim intTopicPagesLoopCounter 'Holds the number of loops Dim blnHideTopic 'Holds if the topic is hidden Dim strFirstPostMsg 'Holds the first posted message in the topic Dim intForumReadRights 'Holds the read rights of the forum Dim strForumPassword 'Holds the password for the forum Dim strForumPaswordCode 'Holds the code for the password for the forum Dim blnForumPasswordOK 'Set to true if the password for the forum is OK Dim lngPollID 'Holds the topic poll id number Dim dtmFirstEntryDate 'Holds the date of the first message Dim intForumGroupPermission 'Holds the group permisison level for forums Dim strTableRowColour 'Holds the row colour for the table Dim sarryTopics 'Holds the topics to display Dim intTotalRecords 'Holds the number of records in the topics array Dim intTotalRecordsPages 'Holds the total number of pages 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 strSortDirection 'Holds the sort order Dim strSortBy 'Holds the way the records are sorted Dim intPageLinkLoopCounter 'Holds the loop counter for mutiple page links Dim dtmEventDate 'Holds the date if this is a calendar event Dim dtmEventDateEnd 'Holds the date if this is a calendar event Dim intUnReadPostCount 'Holds the count for the number of unread posts in the forum Dim intUnReadForumPostsLoop 'Loop to count the number of unread posts in a forum Dim intMovedForumID 'If this is the first time the page is displayed then the Forum Topic record position is set to page 1 If isNumeric(Request.QueryString("PN")) = false Then intRecordPositionPageNum = 1 ElseIf Request.QueryString("PN") < 1 Then intRecordPositionPageNum = 1 'Else the page has been displayed before so the Forum Topic record postion is set to the Record Position number Else intRecordPositionPageNum = CInt(Request.QueryString("PN")) End If 'If we have not yet checked for unread posts since last visit run it now If Session("dtmUnReadPostCheck") = "" Then Call UnreadPosts() 'Read in array if at application level ElseIf isArray(Application("sarryUnReadPosts" & strSessionID)) Then sarryUnReadPosts = Application("sarryUnReadPosts" & strSessionID) 'Read in the unread posts array ElseIf isArray(Session("sarryUnReadPosts")) Then sarryUnReadPosts = Session("sarryUnReadPosts") End If 'Get the sort critiria Select Case Request.QueryString("SO") Case "T" strSortBy = strDbTable & "Topic.Subject " Case "A" strSortBy = strDbTable & "Author.Username " Case "R" strSortBy = strDbTable & "Topic.No_of_replies " Case "V" strSortBy = strDbTable & "Topic.No_of_views " Case Else strSortBy = strDbTable & "Topic.Last_Thread_ID " End Select 'Sort the direction of db results If Request.QueryString("OB") = "desc" Then strSortDirection = "asc" strSortBy = strSortBy & "DESC" Else strSortDirection = "desc" strSortBy = strSortBy & "ASC" End If 'If this is the first time it is run the we want dates DESC If Request.QueryString("OB") = "" AND Request.QueryString("SO") = "" Then strSortDirection = "asc" strSortBy = strDbTable & "Topic.Last_Thread_ID DESC" End If 'Initilise variables intShowTopicsFrom = 12 '12 = yesterday 'Initliase the forum group permisions 'If guest group If intGroupID = 2 Then intForumGroupPermission = 1 'If admin group ElseIf intGroupID = 1 Then intForumGroupPermission = 4 'All other groups Else intForumGroupPermission = 2 End If 'If new show period save to app session If isNumeric(Request.QueryString("MT")) AND Request.QueryString("MT") <> "" Then Call saveSessionItem("MT", Request.QueryString("MT")) intShowTopicsFrom = CInt(Request.QueryString("MT")) 'Get what date to show active topics ElseIf getSessionItem("MT") <> "" Then intShowTopicsFrom = CInt(getSessionItem("MT")) 'If this is not the first time the user has visted then use year as the date to show hidden topics from Else intShowTopicsFrom = 0 'All End If 'If there is a date to show topics with then apply it to the SQL query If intShowTopicsFrom <> 0 Then 'Initialse the string to display when active topics are shown since Select Case intShowTopicsFrom Case 1 strShowTopicsFrom = strTxtLastVisitOn & " " & DateFormat(dtmLastVisitDate) & " " & strTxtAt & " " & TimeFormat(dtmLastVisitDate) dtmActiveFrom = internationalDateTime(dtmLastVisitDate) case 2 strShowTopicsFrom = strTxtLastFifteenMinutes dtmActiveFrom = internationalDateTime(DateAdd("n", -15, now())) case 3 strShowTopicsFrom = strTxtLastThirtyMinutes dtmActiveFrom = internationalDateTime(DateAdd("n", -30, now())) Case 4 strShowTopicsFrom = strTxtLastFortyFiveMinutes dtmActiveFrom = internationalDateTime(DateAdd("n", -45, now())) Case 5 strShowTopicsFrom = strTxtLastHour dtmActiveFrom = internationalDateTime(DateAdd("h", -1, now())) Case 6 strShowTopicsFrom = strTxtLastTwoHours dtmActiveFrom = internationalDateTime(DateAdd("h", -2, now())) Case 7 strShowTopicsFrom = strTxtLastFourHours dtmActiveFrom = internationalDateTime(DateAdd("h", -4, now())) Case 8 strShowTopicsFrom = strTxtLastSixHours dtmActiveFrom = internationalDateTime(DateAdd("h", -6, now())) Case 9 strShowTopicsFrom = strTxtLastEightHours dtmActiveFrom = internationalDateTime(DateAdd("h", -8, now())) Case 10 strShowTopicsFrom = strTxtLastTwelveHours dtmActiveFrom = internationalDateTime(DateAdd("h", -12, now())) Case 11 strShowTopicsFrom = strTxtLastSixteenHours dtmActiveFrom = internationalDateTime(DateAdd("h", -16, now())) Case 12 strShowTopicsFrom = strTxtYesterday dtmActiveFrom = internationalDateTime(DateAdd("d", -1, now())) Case 13 strShowTopicsFrom = strTxtLastWeek dtmActiveFrom = internationalDateTime(DateAdd("ww", -1, now())) Case 14 strShowTopicsFrom = strTxtLastMonth dtmActiveFrom = internationalDateTime(DateAdd("m", -1, now())) Case 15 strShowTopicsFrom = strTxtLastTwoMonths dtmActiveFrom = internationalDateTime(DateAdd("m", -2, now())) Case 16 strShowTopicsFrom = strTxtLastSixMonths dtmActiveFrom = internationalDateTime(DateAdd("m", -6, now())) Case 17 strShowTopicsFrom = strTxtLastYear dtmActiveFrom = internationalDateTime(DateAdd("yyyy", -1, now())) End Select End If 'If SQL server remove dash (-) from the ISO international date to make SQL Server safe If strDatabaseType = "SQLServer" Then dtmActiveFrom = Replace(dtmActiveFrom, "-", "", 1, -1, 1) If strDatabaseType = "Access" Then dtmActiveFrom = "#" & dtmActiveFrom & "#" Else dtmActiveFrom = "'" & dtmActiveFrom & "'" End If 'Initalise SQL query (quite complex but required if we only want 1 db hit to get the lot for the whole page) strSQL = "" & _ "SELECT " & strDbTable & "Forum.Forum_ID, " & strDbTable & "Forum.Forum_name, " & strDbTable & "Forum.Password, " & strDbTable & "Forum.Forum_code, " & strDbTable & "Topic.Topic_ID, " & strDbTable & "Topic.Poll_ID, " & strDbTable & "Topic.Moved_ID, " & strDbTable & "Topic.Subject, " & strDbTable & "Topic.Icon, " & strDbTable & "Topic.Start_Thread_ID, " & strDbTable & "Topic.Last_Thread_ID, " & strDbTable & "Topic.No_of_replies, " & strDbTable & "Topic.No_of_views, " & strDbTable & "Topic.Locked, " & strDbTable & "Topic.Priority, " & strDbTable & "Topic.Hide, " & strDbTable & "Thread.Message_date, " & strDbTable & "Thread.Message, " & strDbTable & "Thread.Author_ID, " & strDbTable & "Author.Username, LastThread.Message_date, LastThread.Author_ID, LastAuthor.Username, " & strDbTable & "Topic.Event_date, " & strDbTable & "Topic.Event_date_end " & _ "FROM " & strDbTable & "Category" & strDBNoLock & ", " & strDbTable & "Forum" & strDBNoLock & ", " & strDbTable & "Topic" & strDBNoLock & ", " & strDbTable & "Thread" & strDBNoLock & ", " & strDbTable & "Thread AS LastThread" & strDBNoLock & ", " & strDbTable & "Author" & strDBNoLock & ", " & strDbTable & "Author AS LastAuthor" & strDBNoLock & " " & _ "WHERE " & strDbTable & "Category.Cat_ID = " & strDbTable & "Forum.Cat_ID " & _ "AND " & strDbTable & "Forum.Forum_ID = " & strDbTable & "Topic.Forum_ID " & _ "AND " & strDbTable & "Thread.Author_ID = " & strDbTable & "Author.Author_ID " & _ "AND LastThread.Author_ID = LastAuthor.Author_ID " & _ "AND " & strDbTable & "Topic.Start_Thread_ID = " & strDbTable & "Thread.Thread_ID " & _ "AND " & strDbTable & "Topic.Last_Thread_ID = LastThread.Thread_ID " 'If not admin check they are a moderator If blnAdmin = false Then strSQL = strSQL & _ "AND (" & strDbTable & "Topic.Forum_ID " & _ "IN (" & _ "SELECT " & strDbTable & "Permissions.Forum_ID " & _ "FROM " & strDbTable & "Permissions " & strDBNoLock & " " & _ "WHERE (" & strDbTable & "Permissions.Group_ID = " & intGroupID & " OR " & strDbTable & "Permissions.Author_ID = " & lngLoggedInUserID & ") " & _ "AND " & strDbTable & "Permissions.Moderate = " & strDBTrue & _ ")" & _ ")" End If 'Get topics with hidden posts only strSQL = strSQL & _ "AND (" & strDbTable & "Topic.Hide=" & strDBTrue & " OR (" & strDbTable & "Topic.Topic_ID " & _ "IN (" & _ "SELECT Topic_ID " & _ "FROM " & strDbTable & "Thread " & strDBNoLock & " " & _ "WHERE " & strDbTable & "Thread.Hide = " & strDBTrue & _ ")" & _ ")" & _ ")" 'If there is a date to show topics with then apply it to the SQL query If intShowTopicsFrom <> 0 Then strSQL = strSQL & _ "AND (LastThread.Message_date > " & dtmActiveFrom & ")" End If strSQL = strSQL & "ORDER BY " & strDbTable & "Category.Cat_order ASC, " & strDbTable & "Forum.Forum_Order ASC, " & strSortBy & ";" 'Set error trapping On Error Resume Next 'Query the database rsCommon.Open strSQL, adoCon 'If an error has occurred write an error to the page If Err.Number <> 0 AND strDatabaseType = "mySQL" Then Call errorMsg("An error has occurred while executing SQL query on database.
Please check that the MySQL Server version is 4.1 or above.", "get_hidden_topics", "pre_approved_topics.asp") ElseIf Err.Number <> 0 Then Call errorMsg("An error has occurred while executing SQL query on database.", "get_hidden_topics", "pre_approved_topics.asp") End If 'Disable error trapping On Error goto 0 'SQL Query Array Look Up table '0 = tblForum.Forum_ID '1 = tblForum.Forum_name '2 = tblForum.Password '3 = tblForum.Forum_code '4 = tblTopic.Topic_ID '5 = tblTopic.Poll_ID '6 = tblTopic.Moved_ID '7 = tblTopic.Subject '8 = tblTopic.Icon '9 = tblTopic.Start_Thread_ID '10 = tblTopic.Last_Thread_ID '11 = tblTopic.No_of_replies '12 = tblTopic.No_of_views '13 = tblTopic.Locked '14 = tblTopic.Priority '15 = tblTopic.Hide '16 = tblThread.Message_date '17 = tblThread.Message, '18 = tblThread.Author_ID, '19 = tblAuthor.Username, '20 = LastThread.Message_date, '21 = LastThread.Author_ID, '22 = LastAuthor.Username '23 = tblTopic.Event_date '24 = tblTopic.Event_date_end 'Read in some details of the topics If NOT rsCommon.EOF Then 'Read in the topivc recordset into an array sarryTopics = rsCommon.GetRows() 'Count the number of records intTotalRecords = Ubound(sarryTopics,2) + 1 'Count the number of pages for the topics using '\' so that any fraction is omitted intTotalRecordsPages = intTotalRecords \ intTopicPerPage 'If there is a remainder or the result is 0 then add 1 to the total num of pages If intTotalRecords Mod intTopicPerPage > 0 OR intTotalRecordsPages = 0 Then intTotalRecordsPages = intTotalRecordsPages + 1 'Start position intStartPosition = ((intRecordPositionPageNum - 1) * intTopicPerPage) 'End Position intEndPosition = intStartPosition + intTopicPerPage 'Get the start position intCurrentRecord = intStartPosition End If 'Close the recordset rsCommon.Close 'Page to link to for mutiple page (with querystrings if required) strLinkPage = "pre_approved_topics.asp?" 'If active users is enabled update the active users application array If blnActiveUsers Then 'Call active users function saryActiveUsers = activeUsers(strTxtHiddenTopicsPosts, "", "", 0) End If 'Set bread crumb trail strBreadCrumbTrail = strBreadCrumbTrail & strNavSpacer & "" & strTxtHiddenTopicsPosts & "" 'Status bar Active Topics Links strStatusBarTools = strStatusBarTools & "   " & strTxtActiveTopics & " " strStatusBarTools = strStatusBarTools & "   " & strTxtUnAnsweredTopics & " " %> <% = strMainForumName & ": " & strTxtHiddenTopicsPosts %> <% '***** 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 ****** %>

<% = strTxtHiddenTopicsPosts %>

<% = strTxtLastPostDetailNotHiddenDetails %>

<% = strTxtShowTopics %>
<% 'If there are no active topics display an error msg If intTotalRecords <= 0 Then 'If there are no Active Topic's to display then display the appropriate error message Response.Write vbCrLf & " " 'Disply any active topics in the forum Else 'Do....While Loop to loop through the recorset to display the forum topics Do While intCurrentRecord < intEndPosition 'If there are no topic records left to display then exit loop If intCurrentRecord >= intTotalRecords Then Exit Do 'SQL Query Array Look Up table '0 = tblForum.Forum_ID '1 = tblForum.Forum_name '2 = tblForum.Password '3 = tblForum.Forum_code '4 = tblTopic.Topic_ID '5 = tblTopic.Poll_ID '6 = tblTopic.Moved_ID '7 = tblTopic.Subject '8 = tblTopic.Icon '9 = tblTopic.Start_Thread_ID '10 = tblTopic.Last_Thread_ID '11 = tblTopic.No_of_replies '12 = tblTopic.No_of_views '13 = tblTopic.Locked '14 = tblTopic.Priority '15 = tblTopic.Hide '16 = tblThread.Message_date '17 = tblThread.Message, '18 = tblThread.Author_ID, '19 = tblAuthor.Username, '20 = LastThread.Message_date, '21 = LastThread.Author_ID, '22 = LastAuthor.Username '23 = tblTopic.Event_date '24 = tblTopic.Event_date_end 'Read in Topic details from the database intForumID = CInt(sarryTopics(0,intCurrentRecord)) strForumPassword = sarryTopics(2,intCurrentRecord) strForumPaswordCode = sarryTopics(3,intCurrentRecord) 'Read in Topic details from the database lngTopicID = CLng(sarryTopics(4,intCurrentRecord)) lngPollID = CLng(sarryTopics(5,intCurrentRecord)) strSubject = sarryTopics(7,intCurrentRecord) strTopicIcon = sarryTopics(8,intCurrentRecord) lngNumberOfReplies = CLng(sarryTopics(11,intCurrentRecord)) lngNumberOfViews = CLng(sarryTopics(12,intCurrentRecord)) blnTopicLocked = CBool(sarryTopics(13,intCurrentRecord)) intPriority = CInt(sarryTopics(14,intCurrentRecord)) blnHideTopic = CBool(sarryTopics(15,intCurrentRecord)) dtmEventDate = sarryTopics(23,intCurrentRecord) dtmEventDateEnd = sarryTopics(24,intCurrentRecord) 'Read in the first post details dtmFirstEntryDate = CDate(sarryTopics(16,intCurrentRecord)) strFirstPostMsg = Mid(sarryTopics(17,intCurrentRecord), 1, 275) lngTopicStartUserID = CLng(sarryTopics(18,intCurrentRecord)) strTopicStartUsername = sarryTopics(19,intCurrentRecord) 'Read in the last post details lngLastEntryMessageID = CLng(sarryTopics(10,intCurrentRecord)) dtmLastEntryDate = CDate(sarryTopics(20,intCurrentRecord)) lngLastEntryUserID = CLng(sarryTopics(21,intCurrentRecord)) strLastEntryUsername = sarryTopics(22,intCurrentRecord) 'Clean up input to prevent XXS hack strSubject = formatInput(strSubject) 'If the forum name is different to the one from the last forum display the forum name If sarryTopics(1,intCurrentRecord) <> strForumName Then 'Give the forum name the new forum name strForumName = sarryTopics(1,intCurrentRecord) 'Display the new forum name Response.Write vbCrLf & " " End If 'Remove HTML from message for subject link title strFirstPostMsg = removeHTML(strFirstPostMsg, 150, true) 'Clean up input to prevent XXS hack strFirstPostMsg = formatInput(strFirstPostMsg) 'Unread Posts ********* intUnReadPostCount = 0 'If there is a newer post than the last time the unread posts array was initilised run it again If dtmLastEntryDate > CDate(Session("dtmUnReadPostCheck")) Then Call UnreadPosts() 'Count the number of unread posts in this forum If isArray(sarryUnReadPosts) AND dtmLastEntryDate > dtmLastVisitDate Then For intUnReadForumPostsLoop = 0 to UBound(sarryUnReadPosts,2) 'Increament unread post count If CLng(sarryUnReadPosts(1,intUnReadForumPostsLoop)) = lngTopicID AND sarryUnReadPosts(3,intUnReadForumPostsLoop) = "1" Then intUnReadPostCount = intUnReadPostCount + 1 Next End If 'Calculate the row colour If intCurrentRecord MOD 2=0 Then strTableRowColour = "evenTableRow" Else strTableRowColour = "oddTableRow" 'If this is a hidden post then change the row colour to highlight it If blnHideTopic Then strTableRowColour = "hiddenTableRow" 'Write the HTML of the Topic descriptions as hyperlinks to the Topic details and message Response.Write(vbCrLf & " ") 'Display the status topic icons Response.Write(vbCrLf & " ") Response.Write(vbCrLf & " <% 'Move to the next record intCurrentRecord = intCurrentRecord + 1 Loop End If %>
  <% = strTxtTopics %><% If Request.QueryString("SO") = "T" Then Response.Write(" ") %> / <% = strTxtThreadStarter %><% If Request.QueryString("SO") = "A" Then Response.Write(" ") %> <% = strTxtReplies %><% If Request.QueryString("SO") = "R" Then Response.Write(" ") %> <% = strTxtViews %><% If Request.QueryString("SO") = "V" Then Response.Write(" ") %> <% = strTxtLastPost %><% If Request.QueryString("SO") = "" Then Response.Write(" ") %>

" & strTxtNoHiddenTopicsPostsSince & " " & strShowTopicsFrom & " " & strTxtToDisplay & "

" & strForumName & "
") %><% Response.Write("
") 'If the user is a forum admin or a moderator then give let them delete the topic If blnAdmin OR blnModerator Then Response.Write(" " & _ "
" & _ "
" & strTxtTopicAdmin & "
") 'Lock or un-lock forum if admin If blnTopicLocked Then Response.Write("
" & strTxtUnLockTopic & "
") Else Response.Write("
" & strTxtLockTopic & "
") End If 'Hide or show topic If blnHideTopic = false Then Response.Write("
" & strTxtHideTopic & "
") Else Response.Write("
" & strTxtShowTopic & "
") End If Response.Write("
" & strTxtDeleteTopic & "
") Response.Write("
") End If 'If topic icons enabled and we have a topic icon display it If blnTopicIcon AND strTopicIcon <> "" Then Response.Write(" ") 'Display the subject of the topic Response.Write("" & strSubject & "") 'Display who started the topic and when Response.Write("
" & strTxtBy & " " & strTopicStartUsername & ", " & DateFormat(dtmFirstEntryDate) & " " & strTxtAt & " " & TimeFormat(dtmFirstEntryDate) & "" & _ "
") 'Calculate the number of pages for the topic and display links if there are more than 1 page intNumberOfTopicPages = ((lngNumberOfReplies + 1)\intThreadsPerPage) 'If there is a remainder from calculating the num of pages add 1 to the number of pages If ((lngNumberOfReplies + 1) Mod intThreadsPerPage) > 0 Then intNumberOfTopicPages = intNumberOfTopicPages + 1 'If there is more than 1 page for the topic display links to the other pages If intNumberOfTopicPages > 1 Then Response.Write("
") 'Loop round to display the links to the other pages For intTopicPagesLoopCounter = 1 To intNumberOfTopicPages 'If there is more than 3 pages display ... last page and exit the loop If intTopicPagesLoopCounter > 4 Then 'If this is position 4 then display just the 4th page If intNumberOfTopicPages = 4 Then Response.Write("4") 'Else display the last 2 pages Else Response.Write(" ") Response.Write("" & intNumberOfTopicPages - 1 & "") Response.Write("" & intNumberOfTopicPages & "") End If 'Exit the loop as we are finshed here Exit For End If 'Display the links to the other pages Response.Write("" & intTopicPagesLoopCounter & "") Next Response.Write("
") End If %>
<% = lngNumberOfReplies %> <% = lngNumberOfViews %> <% = strTxtBy %> <% = strLastEntryUsername %>
<% = DateFormat(dtmLastEntryDate) & " " & strTxtAt & " " & TimeFormat(dtmLastEntryDate) %> <% 'If there are unread posts display a differnet icon and link to the last unread post If intUnReadPostCount > 0 Then Response.Write(" ") 'Else there are no unread posts so display a normal topic link Else Response.Write(" ") End If %>

<% 'Release server objects Call closeDatabase() %>

<% '***** 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 & "") If blnACode Then Response.Write(" [Free Express Edition]") Else Response.Write("") If blnACode Then Response.Write("
Powered by Web Wiz Forums Free Express Edition") End If Response.Write("
Copyright ©2001-2008 Web Wiz") 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 & "
" %>