% @ Language=VBScript %>
<% 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 e-mail 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 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 rsForum 'Holds the Recordset for the forum details
Dim rsTopic 'Holds the Recordset for the Topic details
Dim intForumID 'Holds the forum ID number
Dim intSubID 'Holds the forum sub id number
Dim strForumName 'Holds the forum name
Dim strForumNote
Dim lngNumberOfReplies 'Holds the number of replies for a topic
Dim lngTopicID 'Holds the topic ID
Dim strSubject 'Holds the topic subject
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 intTotalNumOfPages 'Holds the total number of pages in the recordset
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 intNumberOfTopicPages 'Holds the number of topic pages
Dim intTopicPagesLoopCounter 'Holds the number of loops
Dim lngPollID 'Holds the Poll ID
Dim blnNewPost 'Set to true if the post is a new post since the users last visit
Dim intShowTopicsWithin 'Holds the amount of time to show topics within
Dim intMovedForumID 'If the post is moved this holds the moved ID
Dim intNonPriorityTopicNum 'Holds the record count for non priority topics
Dim strFirstPostMsg 'Holds the first message in the topic
Dim dtmFirstEntryDate 'Holds the date of the first message
'Initlaise variables
intNonPriorityTopicNum = 0
'Read in the Forum ID to display the Topics for
intForumID = CInt(Request.QueryString("FID"))
'If there is no Forum ID to display the Topics for then redirect the user to the main forum page
If intForumID = 0 Then
'Clean up
Set rsCommon = Nothing
adoCon.Close
Set adoCon = Nothing
'Redirect
Response.Redirect "default.asp"
End If
'If this is the first time the page is displayed then the Forum Topic record position is set to page 1
If Request.QueryString("PN") = "" OR Request.QueryString("PN") = 0 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
'Create a recordset to get the forum details
Set rsForum = Server.CreateObject("ADODB.Recordset")
'Read in the forum name from the database
'Initalise the strSQL variable with an SQL statement to query the database
If strDatabaseType = "SQLServer" Then
strSQL = "EXECUTE " & strDbProc & "ForumsAllWhereForumIs @intForumID = " & intForumID
Else
strSQL = "SELECT " & strDbTable & "Forum.* FROM " & strDbTable & "Forum WHERE Forum_ID = " & intForumID & ";"
End If
'Query the database
rsForum.Open strSQL, adoCon
'If there is a record returned by the recordset then check to see if you need a password to enter it
If NOT rsForum.EOF Then
'Read in forum details from the database
strForumName = rsForum("Forum_name")
strForumNote = rsForum("Forum_note")
intSubID = CLng(rsForum("Sub_ID"))
'Read in whether the forum is locked or not
blnForumLocked = CBool(rsForum("Locked"))
'Read in the time period to show topics within
intShowTopicsWithin = CInt(rsForum("Show_topics"))
'Check the user is welcome in this forum
Call forumPermisisons(intForumID, intGroupID, CInt(rsForum("Read")), CInt(rsForum("Post")), CInt(rsForum("Reply_posts")), CInt(rsForum("Edit_posts")), CInt(rsForum("Delete_posts")), 0, CInt(rsForum("Poll_create")), CInt(rsForum("Vote")), 0, 0)
'If the user has no read writes then kick them
If blnRead = False Then
'Reset Server Objects
rsForum.Close
Set rsForum = Nothing
Set rsCommon = Nothing
adoCon.Close
Set adoCon = Nothing
'Redirect to a page asking for the user to enter the forum password
Response.Redirect("insufficient_permission.asp?Redirect=" & RedirectOmitPath("Redirect", True))
End If
'If the forum requires a password and a logged in forum code is not found on the users machine then send them to a login page
If rsForum("Password") <> "" and Request.Cookies(strCookieName)("Forum" & intForumID) <> rsForum("Forum_code") Then
'Reset Server Objects
rsForum.Close
Set rsForum = Nothing
Set rsCommon = Nothing
adoCon.Close
Set adoCon = Nothing
'Redirect to a page asking for the user to enter the forum password
Response.Redirect "forum_password_form.asp?FID=" & intForumID
End If
End If
'Get what date to show topics till from cookie
If Request.Cookies("TS") <> "" Then
intShowTopicsFrom = CInt(Request.Cookies("TS"))
'Else if there is no cookie use the default set by the forum
Else
intShowTopicsFrom = intShowTopicsWithin
End If
'Initialse the string to display when the topics are show up till
Select Case intShowTopicsFrom
Case 0
strShowTopicsFrom = strTxtFewYears
case 7
strShowTopicsFrom = strTxtWeek
case 14
strShowTopicsFrom = strTxtTwoWeeks
Case 31
strShowTopicsFrom = strTxtMonth
Case 62
strShowTopicsFrom = strTxtTwoMonths
Case 182
strShowTopicsFrom = strTxtSixMonths
Case 365
strShowTopicsFrom = strTxtYear
End Select
%>
<% = strForumName %>
<% = strForumNote %>
<%
'If blnForumLocked Then Response.Write (" ( " & strTxtForumLocked & ")")
%>
Moderators: <%
Dim strModeratorsList
'Initalise the strSQL variable with an SQL statement to query the database to get the moderators for this forum
If strDatabaseType = "SQLServer" Then
strSQL = "EXECUTE " & strDbProc & "ModeratorGroup @intForumID = " & intForumID
Else
strSQL = "SELECT " & strDbTable & "Group.Group_ID, " & strDbTable & "Group.Name "
strSQL = strSQL & "FROM " & strDbTable & "Group, " & strDBTablePermissions & " "
strSQL = strSQL & "WHERE " & strDbTable & "Group.Group_ID = " & strDBTablePermissions & ".Group_ID AND " & strDBTablePermissions & ".Moderate = True AND " & strDBTablePermissions & ".Forum_ID = " & intForumID & ";"
End If
'Query the database
rsCommon.Open strSQL, adoCon
'Initlaise the Moderators List varible if there are records returned for the forum
If NOT rsCommon.EOF Then strModeratorsList = " " & strTxtModerators & ":"
'Loop round to build a list of moderators, if there are any
Do While NOT rsCommon.EOF
'Place the moderators username into the string
strModeratorsList = strModeratorsList & " " & rsCommon("Name") & ""
'Move to the next record
rsCommon.MoveNext
Loop
'Close the recordset
rsCommon.Close
'Initalise the strSQL variable with an SQL statement to query the database to get the moderators for this forum
If strDatabaseType = "SQLServer" Then
strSQL = "EXECUTE " & strDbProc & "Moderators @intForumID = " & intForumID
Else
strSQL = "SELECT " & strDbTable & "Author.Author_ID, " & strDbTable & "Author.Username "
strSQL = strSQL & "FROM " & strDBTablePermissions & ", " & strDbTable & "Author "
strSQL = strSQL & "WHERE " & strDbTable & "Author.Author_ID = " & strDBTablePermissions & ".Author_ID AND " & strDBTablePermissions & ".Moderate = True AND " & strDBTablePermissions & ".Forum_ID = " & intForumID & ";"
End If
'Query the database
rsCommon.Open strSQL, adoCon
'Initlaise the Moderators List varible if there are records returned for the forum
If NOT rsCommon.EOF AND strModeratorsList = "" Then strModeratorsList = " " & strTxtModerators & ":"
'Loop round to build a list of moderators, if there are any
Do While NOT rsCommon.EOF
'Place the moderators username into the string
strModeratorsList = strModeratorsList & " " & rsCommon("Username") & ""
'Move to the next record
rsCommon.MoveNext
Loop
'Close the recordset
rsCommon.Close
If strModeratorsList = "" Then
Response.Write(vbCrLf & "None")
Else
Response.Write(vbCrLf & strModeratorsList)
End If
%>
<%
If blnActiveUsers Then
Response.Write(vbCrLf & " Users browsing this forum: ")
Dim strMembersInForum
For intArrayPass = 1 To UBound(saryActiveUsers, 2)
If saryActiveUsers(8, intArrayPass) = RedirectPath(False) AND saryActiveUsers(1, intArrayPass) <> 2 Then
If strMembersInForum = "" Then
strMembersInForum = saryActiveUsers(2, intArrayPass)
Else
strMembersInForum = strMembersInForum & ", " & saryActiveUsers(2, intArrayPass)
End If
End If
Next
If strMembersInForum = "" Then
Response.Write(vbCrLf & "None")
Else
Response.Write(vbCrLf & strMembersInForum)
End If
End If
%>
<%
Dim strPageTitle
strPageTitle = "" & strMainForumName & ""
strPageTitle = strPageTitle & strNavSpacer
'If sub id not zero then its a sub forum, get the main forum name
If intSubID <> 0 Then
strSQL = "SELECT " & strDBTable & "Forum.Forum_name, " & strDBTable & "Forum.Forum_ID FROM " & strDBTable & "Forum WHERE Forum_ID = " & intSubID & ";"
rsCommon.Open strSQL, adoCon
If rsCommon.EOF Then
Else
strPageTitle = strPageTitle & " " & rsCommon("Forum_name") & ""
strPageTitle = strPageTitle & strNavSpacer
End If
rsCommon.Close
End If
'Check there are forum's to display
If rsForum.EOF Then
strPageTitle = strPageTitle & " " & strTxtNoForums
'Else there the are forum's to write the HTML to display it the forum names and a discription
Else
strPageTitle = strPageTitle & " " & strForumName & ""
End If
'Clean up
rsForum.Close
'*************************************
'** Get sub forums if any
'*************************************
'Get the sub forums
Call GetSubForums(intForumID)
'*************************************
Response.Write(vbCrLf & "
")
Response.Write(vbCrLf & "
")
Response.Write(vbCrLf & "
")
Response.Write(vbCrLf & "
")
Response.Write(vbCrLf & "
")
If blnForumLocked Then
Response.Write("
Forum Closed |
")
Else
Response.Write("
")
'If the user can create a poll disply a create poll link
If blnPollCreate = True Then Response.Write("
")
End If
Response.Write(vbCrLf & "
" & strPageTitle & "
")
Response.Write(vbCrLf & "
")
Response.Write(vbCrLf & "
")
Response.Write(vbCrLf & "
")
Response.Write(vbCrLf & "
")
Response.Write(vbCrLf & "
")
Call FormatTopTable("100%")
%>
<% = strTxtTopics %>
<% = strTxtThreadStarter %>
<% = strTxtReplies %>
<% = strTxtViews %>
<% = strTxtLastPost %>
<%
'Get the Topics for the forum from the database
'Initalise the strSQL variable with an SQL statement to query the database to count the number of Topics for each Forum
'Run Stored procedures for SQL Server
If strDatabaseType = "SQLServer" Then
If intShowTopicsFrom = 0 Then
strSQL = "EXECUTE " & strDbProc & "TopicDetialsAll @intForumID = " & intForumID
Else
strSQL = "EXECUTE " & strDbProc & "TopicDetialsInTheLastXX @intForumID = " & intForumID & ", @intShowTopicsFrom = " & intShowTopicsFrom
End If
'Run SQL for Access
Else
strSQL = "SELECT " & strDBTableTopics & ".Topic_ID, " & strDBTableTopics & ".Moved_ID, " & strDBTableTopics & ".No_of_views, " & strDBTableTopics & ".Subject, " & strDBTableTopics & ".Poll_ID, " & strDBTableTopics & ".Locked, " & strDBTableTopics & ".Priority "
strSQL = strSQL & "FROM " & strDBTableTopics & " "
'Choose a where string for the query
If intShowTopicsFrom = 0 Then
strSQL = strSQL & "WHERE (" & strDBTableTopics & ".Forum_ID = " & intForumID & ") OR (" & strDBTableTopics & ".Priority = 3) OR (" & strDBTableTopics & ".Moved_ID = " & intForumID & ") "
Else
strSQL = strSQL & "WHERE (((" & strDBTableTopics & ".Forum_ID = " & intForumID & ") OR (" & strDBTableTopics & ".Moved_ID = " & intForumID & ")) AND ((" & strDBTableTopics & ".Last_entry_date > Now() - " & intShowTopicsFrom & ") OR (" & strDBTableTopics & ".Priority > 0))) OR (" & strDBTableTopics & ".Priority = 3) "
End If
strSQL = strSQL & "ORDER BY " & strDBTableTopics & ".Priority DESC, " & strDBTableTopics & ".Last_entry_date DESC;"
End If
'Set the cursor type property of the record set to dynamic so we can naviagate through the record set
rsForum.CursorType = 1
'Query the database
rsForum.Open strSQL, adoCon
'Set the number of records to display on each page
rsForum.PageSize = intTopicPerPage
'Check there are Topic's to display
If rsForum.EOF Then
'If there are no Topic's to display then display the appropriate error message
Response.Write vbCrLf & "
"
'Else there the are topic's so write the HTML to display the topic names and a discription
Else
'Get the record poistion to display from
rsForum.AbsolutePage = intRecordPositionPageNum
'If there are no records on this page and it's above the frist page then set the page position to 1
If rsForum.EOF AND intRecordPositionPageNum > 1 Then rsForum.AbsolutePage = 1
'Count the number of pages there are in the recordset calculated by the PageSize attribute set above
intTotalNumOfPages = rsForum.PageCount
'Craete a Recodset object for the topic details
Set rsTopic = Server.CreateObject("ADODB.Recordset")
'Loop round to read in all the Topics in the database
For intRecordLoopCounter = 1 to intTopicPerPage
'If there are no records left in the recordset to display then exit the for loop
If rsForum.EOF Then Exit For
'Read in Topic details from the database
lngTopicID = CLng(rsForum("Topic_ID"))
lngPollID = CLng(rsForum("Poll_ID"))
intMovedForumID = CInt(rsForum("Moved_ID"))
lngNumberOfViews = CLng(rsForum("No_of_views"))
strSubject = rsForum("Subject")
blnTopicLocked = CBool(rsForum("Locked"))
intPriority = CInt(rsForum("Priority"))
Dim blnUserPostedInThread
blnUserPostedInThread = False
'Get a record number for the number of non priority posts
If intPriority <= 1 Then intNonPriorityTopicNum = intNonPriorityTopicNum + 1
'If this is the first topic that is not importent then display the forum topics bar
If intNonPriorityTopicNum = 1 Then Response.Write vbCrLf & "
" & strTxtForum & " " & strTxtTopics & "
"
'If this is the first topic and it is an important one then display a bar saying so
If intRecordLoopCounter = 1 AND intPriority => 2 Then Response.Write vbCrLf & "
" & strTxtImportantTopics & "
"
strSQL = "SELECT " & strDBTable & "Thread.* FROM " & strDBTable & "Thread WHERE " & strDBTable & "Thread.Topic_ID = " & lngTopicID & ";"
rsTopic.Open strSQL, adoCon
If rsTopic.EOF Then
Else
DO UNTIL rsTopic.EOF
If lngLoggedInUserID = rsTopic("Author_ID") Then
blnUserPostedInThread = True
Exit DO
End If
rsTopic.MoveNext
Loop
End If
rsTopic.Close
'Initalise the strSQL variable with an SQL statement to query the database to get the Author and subject from the database for the topic
If strDatabaseType = "SQLServer" Then
strSQL = "EXECUTE " & strDbProc & "LastAndFirstThreadAuthor @lngTopicID = " & lngTopicID
Else
strSQL = "SELECT " & strDbTable & "Thread.Thread_ID, " & strDbTable & "Thread.Author_ID, " & strDbTable & "Thread.Message, " & strDbTable & "Thread.Message_date, " & strDbTable & "Author.Username "
strSQL = strSQL & "FROM " & strDbTable & "Author, " & strDbTable & "Thread "
strSQL = strSQL & "WHERE " & strDbTable & "Author.Author_ID = " & strDbTable & "Thread.Author_ID AND " & strDbTable & "Thread.Topic_ID = " & lngTopicID & " "
strSQL = strSQL & "ORDER BY " & strDbTable & "Thread.Message_date ASC;"
End If
'Set the cursor type property of the record set to forward only so we can navigate through the record set
rsTopic.CursorType = 1
'Query the database
rsTopic.Open strSQL, adoCon
'If there is info in the database relating to the topic then get them from the record set
If NOT rsTopic.EOF Then
'Read in the subject and author and number of replies from the record set
strTopicStartUsername = rsTopic("Username")
strFirstPostMsg = Mid(rsTopic("Message"), 1, 275)
lngTopicStartUserID = CLng(rsTopic("Author_ID"))
lngNumberOfReplies = CLng((rsTopic.RecordCount) - 1)
dtmFirstEntryDate = CDate(rsTopic("Message_date"))
'Move to the last record in the record set to get the date and username of the last entry
rsTopic.MoveLast
'Read in the username and date of the last entry from the record set
lngLastEntryMessageID = CLng(rsTopic("Thread_ID"))
strLastEntryUsername = rsTopic("Username")
lngLastEntryUserID = CLng(rsTopic("Author_ID"))
dtmLastEntryDate = CDate(rsTopic("Message_date"))
'Remove HTML from message for subject link title
strFirstPostMsg = removeHTML(strFirstPostMsg)
'Trim the number of characters down to 150 for the subject link title
strFirstPostMsg = Mid(Trim(strFirstPostMsg), 1, 150)
'If the length of the message is over 150 then append ... to it
If CLng(Len(strFirstPostMsg)) = 150 Then strFirstPostMsg = Trim(strFirstPostMsg) & "..."
End If
'Set the booleon varible if this is a new post since the users last visit and has not been read
If (CDate(Session("dtmLastVisit")) < dtmLastEntryDate) AND (Request.Cookies("RT")("TID" & lngTopicID) = "") Then
blnNewPost = True
'Else this is not a new post so don't set the booleon to true
Else
blnNewPost = False
End If
'Write the HTML of the Topic descriptions as hyperlinks to the Topic details and message
Response.Write(vbCrLf & "
")
Response.Write(vbCrLf & "
")
'If the topic is pinned then display the pinned icon
If intPriority = 1 Then
Response.Write("")
'If the topic is top priorty and locked then display top priporty locked icon
ElseIf blnTopicLocked = True AND intPriority > 0 Then
Response.Write("")
'If the topic is top priorty then display top priporty icon
ElseIf intPriority > 0 Then
Response.Write("")
'If the topic is closed display a closed topic icon
ElseIf blnTopicLocked = True Then
Response.Write("")
'If the topic is moved to another forum display moved post icon
ElseIf intMovedForumID = intForumID AND intMovedForumID <> 0 Then
Response.Write("")
'If the topic is a hot topic and with new replies then display hot to new replies icon
ElseIf (lngNumberOfReplies >= intNumHotReplies OR lngNumberOfViews >= intNumHotViews) AND (blnNewPost = True) Then
Response.Write("")
'If this is a hot topic that contains a poll then display the hot topic poll icon
ElseIf (lngPollID > 0) AND (lngNumberOfReplies >= intNumHotReplies OR lngNumberOfViews >= intNumHotViews) Then
Response.Write("")
'If the topic is a hot topic display hot topic icon
ElseIf lngNumberOfReplies >= intNumHotReplies OR lngNumberOfViews >= intNumHotViews Then
Response.Write("")
'If the topic is has new replies display new replies icon
ElseIf blnNewPost = True Then
Response.Write("")
'If there is a poll in the post display the poll post icon
ElseIf lngPollID > 0 Then
Response.Write("")
'Display topic icon
Else
Response.Write("")
End If
Response.Write(vbCrLf & "
")
Response.Write(vbCrLf & "
")
'If the user is a forum admin or a moderator then give let them delete the topic
If blnAdmin OR blnModerator Then Response.Write(vbCrLf & " ")
'If the topic is moved to another forum display moved next to it
If intMovedForumID = intForumID AND intMovedForumID <> 0 Then Response.Write(strTxtMoved)
'If there is a poll display a poll text
If lngPollID > 0 Then Response.Write(strTxtPoll)
If blnUserPostedInThread Then Response.Write(" ")
'Display the subject of the topic
Response.Write(vbCrLf & " " & strSubject & "")
Dim intUsersBrowsingTopic
Dim blnUsersBrowsingTopic
Dim intTotalUsersBrowsingTopic
blnUsersBrowsingTopic = False
intTotalUsersBrowsingTopic = 0
If blnActiveUsers Then
For intUsersBrowsingTopic = 1 To UBound(saryActiveUsers, 2)
'Response.Write(vbCrLf & saryActiveUsers(8, intUsersBrowsingTopic))
If InStr(saryActiveUsers(8, intUsersBrowsingTopic), "forum/forum_posts.asp?TID=" & lngTopicID) <> 0 Then
blnUsersBrowsingTopic = True
intTotalUsersBrowsingTopic = intTotalUsersBrowsingTopic + 1
End If
Next
End If
If blnUsersBrowsingTopic Then
Response.Write(vbCrLf & "(" & intTotalUsersBrowsingTopic & " viewing)")
End If
'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(vbCrLf & " ")
'Loop round to display the links to the other pages
For intTopicPagesLoopCounter = 1 To intNumberOfTopicPages
'If there is more than 7 pages display ... last page and exit the loop
If intTopicPagesLoopCounter > 7 Then
'If this is position 8 then display just the 8th page
If intNumberOfTopicPages = 8 Then
Response.Write(vbCrLf & " 8")
'Else display the last 2 pages
Else
Response.Write(" ...")
Response.Write(vbCrLf & " " & intNumberOfTopicPages - 1 & "")
Response.Write(vbCrLf & " " & intNumberOfTopicPages & "")
End If
Exit For
End If
'Display the links to the other pages
Response.Write(vbCrLf & " " & intTopicPagesLoopCounter & "")
Next
End If
%>
<%
'Close the topic recordset
rsTopic.Close
'Move to the next database record
rsForum.MoveNext
Next
Set rsTopic = Nothing
End If
'Release server objects
rsForum.Close
Set rsForum = Nothing
%>
<%
'Display an alert message letting the user know the topic has been deleted
If Request.QueryString("DL") = "1" Then
Response.Write("")
End If
'Display an alert message if the user is watching this forum for email notification
If Request.QueryString("EN") = "FS" Then
Response.Write("")
End If
'Display an alert message if the user is not watching this forum for email notification
If Request.QueryString("EN") = "FU" Then
Response.Write("")
End If
%>
<%
'Clean up
Set rsCommon = Nothing
adoCon.Close
Set adoCon = Nothing
%>