Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 "shadow" on posts
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

mtercek
New Member

56 Posts

Posted - 20 October 2005 :  14:23:45  Show Profile
When anyone posts the message is displayed twice. Once where it should be and the second underneath in a second box slightly grayed out.

Anyone have an idea why that would be?

thanks,

Marilyn

< Moved to Help: MOD Implementation by Shaggy />

Edited by - Shaggy on 25 October 2005 07:23:45

Podge
Support Moderator

Ireland
3776 Posts

Posted - 20 October 2005 :  14:45:52  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Do you have a link to an example. You may want to make a text version of your topic.asp available for downlaoding somewhere.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

mtercek
New Member

56 Posts

Posted - 20 October 2005 :  15:08:31  Show Profile
Unfortunately this is on our company intranet so I can't link you to it.

Here is an example though of what it looks like:
Author Topic
Mark Diehl


USA
2 Posts
Posted - 10/10/2005 : 09:13:38
--------------------------------------------------------------------------------

THe safety committee meeting for October will be Thursday, October 13th at 7:00am in the class room.

Look forward to seeing you there!


THe safety committee meeting for October will be Thursday, October 13th at 7:00am in the class room.

Look forward to seeing you there!


It shows the message and then repeats it in a lighter shade. Is it ok if I post my topic.asp here in this link?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 20 October 2005 :  16:17:17  Show Profile  Send ruirib a Yahoo! Message
Yes, you can post it.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 21 October 2005 :  07:15:43  Show Profile
Be sure to save it as a *.txt file and link to that, though, so's we can access it.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

mtercek
New Member

56 Posts

Posted - 21 October 2005 :  15:12:11  Show Profile
Sorry I have to post the entire code you cannot link to our internal site. I understand if an administrator of this forum feels they must delete this lengthy post. Thank you.

<%
%>
<!--#INCLUDE FILE="config.asp"-->
<%

if (Request.QueryString("TOPIC_ID") = "" or IsNumeric(Request.QueryString("TOPIC_ID")) = False) and Request.Form("Method_Type") <> "login" and Request.Form("Method_Type") <> "logout" then
	Response.Redirect "default.asp"
	Response.End
else
	Topic_ID = cLng(Request.QueryString("TOPIC_ID"))
end if 
Dim ArchiveView, ArchiveLink
'###### Poll Mod ######
Dim vPercent(100)
Dim vAnswers(15)
Dim vCount(15)
Dim mpoll, nMaxValue, nMaxWidth
Dim nTotal, nTotal2, nThisVal
'######################

if request("ARCHIVE") = "true" then
	strActivePrefix = strTablePrefix & "A_"
	ArchiveView = "true"
	ArchiveLink = "ARCHIVE=true&"
else
	strActivePrefix = strTablePrefix
	ArchiveView = ""
	ArchiveLink = ""
end if

%>
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_subscription.asp" -->
<!--#INCLUDE FILE="inc_moderation.asp" -->
<!--#INCLUDE FILE="cal_functions.asp" -->
<% 
Response.Write	"    <script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
		"    function ChangePage(fnum){" & vbNewLine & _
		"    	if (fnum == 1) {" & vbNewLine & _
		"    		document.PageNum1.submit();" & vbNewLine & _
		"    	}" & vbNewLine & _
		"    	else {" & vbNewLine & _
		"    		document.PageNum2.submit();" & vbNewLine & _
		"    	}" & vbNewLine & _
		"    }" & vbNewLine & _
		"    </script>" & vbNewLine

mypage = request("whichpage")
if ((Trim(mypage) = "") or (IsNumeric(mypage) = False)) then mypage = 1
mypage = cLng(mypage)

if Request("SearchTerms") <> "" then
	SearchLink = "&SearchTerms=" & Request("SearchTerms")
else
	SearchLink = ""
end if

if strSignatures = "1" and strDSignatures = "1" then
	if ViewSig(MemberID) <> "0" then
		CanShowSignature = 1
	end if
end if

'## Forum_SQL - Get original topic and check for the Category, Forum or Topic Status and existence
strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO" & _
	", M.M_TITLE, M.M_HOMEPAGE, M.MEMBER_ID, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY" & _
	", T.T_DATE, T.T_SUBJECT, T.T_AUTHOR, T.TOPIC_ID, T.T_STATUS,  T.T_ISPOLL, T.T_POLLSTATUS, T.T_LAST_EDIT" & _
	", T.T_LAST_EDITBY, T.T_LAST_POST, T.T_SIG, T.T_REPLIES, T.T_ISEVENT" & _
	", C.CAT_STATUS, C.CAT_ID, C.CAT_NAME, C.CAT_SUBSCRIPTION, C.CAT_MODERATION" & _
	", F.F_STATUS, F.F_POLLS,  F.FORUM_ID, F.F_SUBSCRIPTION, F.F_SUBJECT, F.F_MODERATION, T.T_MESSAGE"
if CanShowSignature = 1 then
	strSql = strSql & ", M.M_SIG"
end if
strSql = strSql & " FROM " & strActivePrefix & "TOPICS T, " & strTablePrefix & "FORUM F, " & _ 
	strTablePrefix & "CATEGORY C, " & strMemberTablePrefix & "MEMBERS M " & _
	" WHERE T.TOPIC_ID = " & Topic_ID & _
	" AND F.FORUM_ID = T.FORUM_ID " & _
	" AND C.CAT_ID = T.CAT_ID " & _
	" AND M.MEMBER_ID = T.T_AUTHOR "

set rsTopic = Server.CreateObject("ADODB.Recordset")
rsTopic.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText

if rsTopic.EOF then
	recTopicCount = ""
else
	recTopicCount = 1
	Member_Name = rsTopic("M_NAME")
	Member_ReceiveMail = rsTopic("M_RECEIVE_EMAIL")
	Member_AIM = rsTopic("M_AIM")
	Member_ICQ = rsTopic("M_ICQ")
	Member_MSN = rsTopic("M_MSN")
	Member_YAHOO = rsTopic("M_YAHOO")
	Member_Title = rsTopic("M_TITLE")
	Member_Homepage = rsTopic("M_HOMEPAGE")
	TMember_ID = rsTopic("MEMBER_ID")
	Member_Level = rsTopic("M_LEVEL")
	Member_Posts = rsTopic("M_POSTS")
	Member_Country = rsTopic("M_COUNTRY")
	Topic_Date = rsTopic("T_DATE")
	Topic_Subject = rsTopic("T_SUBJECT")
	Topic_Author = rsTopic("T_AUTHOR")
	TopicID = rsTopic("TOPIC_ID")
	Topic_Status = rsTopic("T_STATUS")
	Topic_LastEdit = rsTopic("T_LAST_EDIT")
	Topic_LastEditby = rsTopic("T_LAST_EDITBY")
	Topic_LastPost = rsTopic("T_LAST_POST")
	Topic_Sig = rsTopic("T_SIG")
	Topic_Replies = rsTopic("T_REPLIES")
	IsEvent = rsTopic("T_ISEVENT")
	Cat_Status = rsTopic("CAT_STATUS")
	Cat_ID = rsTopic("CAT_ID")
	Cat_Name = rsTopic("CAT_NAME")
	Cat_Subscription = rsTopic("CAT_SUBSCRIPTION")
	Cat_Moderation = rsTopic("CAT_MODERATION")
	Forum_Status = rsTopic("F_STATUS")
	Forum_ID = rsTopic("FORUM_ID")
	Forum_Subject = rsTopic("F_SUBJECT")
	Forum_Subscription = rsTopic("F_SUBSCRIPTION")
	Forum_Moderation = rsTopic("F_MODERATION")
	Topic_Message = rsTopic("T_MESSAGE")
	if CanShowSignature = 1 then
		Topic_MemberSig = trim(rsTopic("M_SIG"))
	end if
'############## Poll Mod ##################
	IsPoll = rsTopic("T_ISPOLL")
	Forum_Polls = rsTopic("F_POLLS")
	Poll_Status = rsTopic("T_POLLSTATUS")
	
	if IsPoll = 1 then
		strSql = "SELECT P.P_LASTVOTE, P.P_WHOVOTES"
		For i = 1 To 15
			strSql = strSql & ", P.ANSWER" & CStr(i)
			strSql = strSql & ", P.COUNT" & CStr(i)
		Next
		strSql = strSql & " FROM " & strTablePrefix & "POLLS P"
		strSql = strSql & " WHERE P.TOPIC_ID = " & Topic_ID

		set rsPoll = Server.CreateObject("ADODB.Recordset")
		rsPoll.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
		
		if not(rsPoll.EOF) or not(rsPoll.BOF) then
			Last_Vote = rsPoll("P_LASTVOTE")
			strWhoVotes = rsPoll("P_WHOVOTES")
			For nCount = 1 to 15
				'Loop through answer and count fields for the poll
				'and store them in arrays
				vAnswers(nCount) = rsPoll("ANSWER" & CStr(nCount))
				vCount(nCount) = rsPoll("COUNT" & CStr(nCount))
			Next
		end if
		
		rsPoll.Close
		set rsPoll = nothing
	end if
	if IsPoll = 1 then
		pollLink = "poll=1&"
	else
		pollLink = ""
	end if
'##########################################

end if

rsTopic.close
set rsTopic = nothing

if recTopicCount = "" then
	if ArchiveView <> "true" then
		Response.Redirect("topic.asp?ARCHIVE=true&" & Request.QueryString)
	else
		Response.Redirect("default.asp")
	end if
end if
'################ Poll Mod ##############
if IsPoll = 1 then
	'Check to see if user has voted
	Voted = GetVote(Topic_ID)
end if
'########################################

if mLev = 4 then
	AdminAllowed = 1
	ForumChkSkipAllowed = 1
elseif mLev = 3 then
	if chkForumModerator(Forum_ID, chkString(strDBNTUserName,"decode")) = "1" then
		AdminAllowed = 1
		ForumChkSkipAllowed = 1
	else
		if lcase(strNoCookies) = "1" then
			AdminAllowed = 1
			ForumChkSkipAllowed = 0
		else
			AdminAllowed = 0
			ForumChkSkipAllowed = 0
		end if
	end if
elseif lcase(strNoCookies) = "1" then
 	AdminAllowed = 1
	ForumChkSkipAllowed = 0
else   
 	AdminAllowed = 0
	ForumChkSkipAllowed = 0
end if

if strPrivateForums = "1" and (Request.Form("Method_Type") <> "login") and (Request.Form("Method_Type") <> "logout") and ForumChkSkipAllowed = 0 then
	result = ChkForumAccess(Forum_ID, MemberID, true)
end if

if strModeration > 0 and Cat_Moderation > 0 and Forum_Moderation > 0 and AdminAllowed = 0 then
        Moderation = "Y"
else
        Moderation = "N"
end if

if mypage = -1 and Request.QueryString("REPLY_ID") <> "" then
	strSql1 = "SELECT REPLY_ID "
	strSql2 = "FROM " & strActivePrefix & "REPLY "
	strSql3 = "WHERE TOPIC_ID = " & Topic_ID & " "
	' DEM --> if not a Moderator, all unapproved posts should not be viewed.
	if AdminAllowed = 0 then
		strSql3 = strSql3 & "AND (R_STATUS < "
		if Moderation = "Y" then
			' Ignore unapproved/rejected posts
			strSql3 = strSql3 & "2 "
		else
			' Ignore any previously rejected topic
			strSql3 = strSql3 & "3 "
		end if
		strSql3 = strSql3 & "OR R_AUTHOR = " & MemberID & ") "
	end if
	strSql4 = "ORDER BY R_DATE ASC "

	if strDBType = "mysql" then
		set rsReplies = Server.CreateObject("ADODB.Recordset")

		rsReplies.open strSql1 & strSql2 & strSql3 & strSql4, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText

		if rsReplies.EOF then
			iReplyCount = ""
		else
			arrReplyData = rsReplies.GetRows(adGetRowsRest)
			iReplyCount = UBound(arrReplyData, 2)
			rREPLY_ID = 0
		end if

		LastPostReplyID = cLng(Request.QueryString("REPLY_ID"))

		if iReplyCount <> "" then
			for iReply = 0 to iReplyCount
				intReplyID = arrReplyData(rREPLY_ID,iReply)
				if LastPostReplyID = intReplyID then
					intPageNumber = ((iReply+1)/strPageSize)
					if intPageNumber > cLng(intPageNumber) then
						intPageNumber = cLng(intPageNumber) + 1
					end if
					strwhichpage = "whichpage=" & intPageNumber & "&"
					exit for
				end if
			next
		else
			strwhichpage = ""
		end if

		rsReplies.Close
		set rsReplies = nothing
	else
		set rsReplies = Server.CreateObject("ADODB.Recordset")
		rsReplies.cachesize = strPageSize
		rsReplies.pagesize = strPageSize

		rsReplies.open strSql1 & strSql2 & strSql3 & strSql4, my_Conn, adOpenStatic, adLockReadOnly, adCmdText

		LastPostReplyID = cLng(Request.QueryString("REPLY_ID"))
		rsReplies.Find = "REPLY_ID=" & LastPostReplyID & ""

		if not (rsReplies.EOF or rsReplies.BOF) then
			if rsReplies.absolutepage > 1 then strwhichpage = "whichpage=" & rsReplies.absolutepage & "&"
		else
			strwhichpage = ""
		end if

		rsReplies.Close
		set rsReplies = nothing
	end if

	Response.Redirect("topic.asp?" & strwhichpage & "TOPIC_ID=" & Topic_ID & "#" & LastPostReplyID & "")
	Response.End
end if

' -- Get all the high level(board, category, forum) subscriptions being held by the user
Dim strSubString, strSubArray, strBoardSubs, strCatSubs, strForumSubs, strTopicSubs
if MySubCount > 0 then
	strSubString = PullSubscriptions(0, 0, 0)
	strSubArray  = Split(strSubString,";")
	if uBound(strSubArray) < 0 then
		strBoardSubs = ""
		strCatSubs = ""
		strForumSubs = ""
		strTopicSubs = ""
	else
		strBoardSubs = strSubArray(0)
		strCatSubs = strSubArray(1)
		strForumSubs = strSubArray(2)
		strTopicSubs = strSubArray(3)
	end if
end If

if (Moderation = "Y" and Topic_Status > 1 and Topic_Author <> MemberID) then
	Response.write  "<p align=""center"" class=""largetext""><br />Viewing of this Topic is not permitted until it has been moderated.<br />Please try again later</p>" & vbNewLine & _
			"<p align=""center"" class=""largetext""><a href=""JavaScript:history.go(-1)"">Go Back</a></p><br />" & vbNewLine
	WriteFooter
	Response.end
else
	Response.Write	"    <script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
			"    <!--" & vbNewLine & _
			"    function jumpTo(s) {if (s.selectedIndex != 0) location.href = s.options[s.selectedIndex].value;return 1;}" & vbNewLine & _
			"    // -->" & vbNewLine & _
			"    </script>" & vbNewLine

	'## Forum_SQL
	strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO"
	strSql = strSql & ", M.M_TITLE, M.MEMBER_ID, M.M_HOMEPAGE, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY"
	strSql = strSql & ", R.REPLY_ID, R.FORUM_ID, R.R_AUTHOR, R.TOPIC_ID, R.R_MESSAGE, R.R_LAST_EDIT"
	strSql = strSql & ", R.R_LAST_EDITBY, R.R_SIG, R.R_STATUS, R.R_DATE"
	if CanShowSignature = 1 then
		strSql = strSql & ", M.M_SIG"
	end if
	strSql2 = " FROM " & strMemberTablePrefix & "MEMBERS M, " & strActivePrefix & "REPLY R "
	strSql3 = " WHERE M.MEMBER_ID = R.R_AUTHOR "
	strSql3 = strSql3 & " AND R.TOPIC_ID = " & Topic_ID & " "
		' DEM --> if not a Moderator, all unapproved posts should not be viewed.
		if AdminAllowed = 0 then
			strSql3 = strSql3 & " AND (R.R_STATUS < "
			if Moderation = "Y" then
				' Ignore unapproved/rejected posts
				strSql3 = strSql3 & "2"
			else
				' Ignore any previously rejected topic
				strSql3 = strSql3 & "3"
			end if
		strSql3 = strSql3 & " OR R.R_AUTHOR = " & MemberID & ")"
	end if
	strSql4 = " ORDER BY R.R_DATE ASC"

	if strDBType = "mysql" then 'MySql specific code
		if mypage > 1 then
 			intOffset = cLng((mypage-1) * strPageSize)
			strSql5 = " LIMIT " & intOffset & ", " & strPageSize & " "
		end if

		'## Forum_SQL - Get the total pagecount 
		strSql1 = "SELECT COUNT(R.TOPIC_ID) AS REPLYCOUNT "
		
		set rsCount = my_Conn.Execute(strSql1 & strSql2 & strSql3)
		iPageTotal = rsCount(0).value
		rsCount.close
		set rsCount = nothing

		if iPageTotal > 0 then
			maxpages = (iPageTotal  \ strPageSize )
			if iPageTotal mod strPageSize <> 0 then
				maxpages = maxpages + 1
			end if
			if iPageTotal < (strPageSize + 1) then
				intGetRows = iPageTotal
			elseif (mypage * strPageSize) > iPageTotal then
				intGetRows = strPageSize - ((mypage * strPageSize) - iPageTotal)
			else
				intGetRows = strPageSize
			end if
		else
			iPageTotal = 0
			maxpages = 0
		end if
	
		if iPageTotal > 0 then
			set rsReplies = Server.CreateObject("ADODB.Recordset")
			rsReplies.Open strSql & strSql2 & strSql3 & strSql4 & strSql5, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
				arrReplyData = rsReplies.GetRows(intGetRows)
				iReplyCount = UBound(arrReplyData, 2)
			rsReplies.Close
			set rsReplies = nothing
		else
			iReplyCount = ""
		end if
		
	else 'end MySql specific code
	
		set rsReplies = Server.CreateObject("ADODB.Recordset")
		rsReplies.cachesize = strPageSize
		rsReplies.open strSql & strSql2 & strSql3 & strSql4, my_Conn, adOpenStatic, adLockReadOnly, adCmdText

			if not (rsReplies.EOF or rsReplies.BOF) then
				rsReplies.pagesize = strPageSize
				rsReplies.absolutepage = mypage '**
				maxpages = cLng(rsReplies.pagecount)
				if maxpages >= mypage then
					arrReplyData = rsReplies.GetRows(strPageSize)
					iReplyCount = UBound(arrReplyData, 2)
				else
					iReplyCount = ""
				end if
			else  '## No replies found in DB
				iReplyCount = ""
			end if

		rsReplies.Close
		set rsReplies = nothing
	end if
'################################## Poll Mod #####################################
Select Case Request.Form("Method_Type")
	Case "member_vote"
		if Request.Form("R1") = "" then
			Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """> </font></p>" & vbNewLine & _
					"<table align=""center"" border=""0"">" & vbNewLine & _
		  			"	<tr>" & vbNewLine & _
		    		"		<td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>You must choose an answer in order for your vote to be counted!</font></td>" & vbNewLine & _
		  			"	</tr>" & vbNewLine & _
		  			"	<tr>" & vbNewLine & _
		  			"		<td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><br /><br /><a href=""JavaScript:history.go(-1)"">Go Back To Vote</a></font></td>" & vbNewLine & _
		  			"	</tr>" & vbNewLine & _
					"</table>" & vbNewLine & _
					"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """> </font></p>" & vbNewLine
			WriteFooter
			Response.End
		elseif strWhoVotes = "members" and MemberID = "-1" then
			Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """> </font></p>" & vbNewLine & _
					"<table align=""center"" border=""0"">" & vbNewLine & _
		  			"	<tr>" & vbNewLine & _
		    		"		<td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>You need to be a member in order to vote!</font></td>" & vbNewLine & _
		  			"	</tr>" & vbNewLine & _
		  			"	<tr>" & vbNewLine & _
					"		<td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><br /><br /><a href=""JavaScript:history.go(-1)"">Go Back to the forum</a></font></td>" & vbNewLine & _
		  			"	</tr>" & vbNewLine & _
					"</table>" & vbNewLine & _
					"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """> </font></p>" & vbNewLine
			WriteFooter
	  		Response.End	
		elseif Voted = true then
			Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """> </font></p>" & vbNewLine & _
					"<table align=""center"" border=""0"">" & vbNewLine & _
		  			"	<tr>" & vbNewLine & _
		    		"		<td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>You may only vote once per poll!</font></td>" & vbNewLine & _
		  			"	</tr>" & vbNewLine & _
		  			"	<tr>" & vbNewLine & _
					"		<td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><br /><br /><a href=""JavaScript:history.go(-1)"">Go Back and click on ""View Results"" to see the results.</a></font></td>" & vbNewLine & _
		  			"	</tr>" & vbNewLine & _
					"</table>" & vbNewLine & _
					"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """> </font></p>" & vbNewLine
			WriteFooter
			Response.End
		elseif trim(Request.Form("R1")) <> "" then
			if IsNumeric(Request.Form("R1")) = false then
				nNumber = -1
			else
				nNumber = cLng(Request.Form("R1"))
			end if
			
			if nNumber <> -1 then
				'## Forum_SQL - 
				strSql = "UPDATE " & strTablePrefix & "POLLS "
				strSql = strSql & "    SET COUNT" & nNumber & " = COUNT" & nNumber & " +1"
				strSql = strSql & ",   P_LASTVOTE = '" & DateToStr(strForumTimeAdjust) & "'"
				strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
			
				my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
				
				Voted = true
				
				'## Forum_SQL -
				strSql = "SELECT " & strTablePrefix & "POLLS.P_LASTVOTE"
				For i = 1 To 15
					strSql = strSql & ", " & strTablePrefix & "POLLS.ANSWER" & CStr(i) 
					strSql = strSql & ", " & strTablePrefix & "POLLS.COUNT" & CStr(i)
				Next
				strSql = strSql & " FROM " & strTablePrefix & "POLLS"
				strSql = strSql & " WHERE " & strTablePrefix & "POLLS.TOPIC_ID = " & Topic_ID
				
				set rsPoll = Server.CreateObject("ADODB.Recordset")
				rsPoll.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
				
				Last_Vote = rsPoll("P_LASTVOTE")
				For nCount = 1 to 15
					vAnswers(nCount) = rsPoll("ANSWER" & CStr(nCount))
					vCount(nCount) = rsPoll("COUNT" & CStr(nCount))
				Next
				
				rsPoll.Close
				set rsPoll = nothing
			
				Call UpdateVote("0", MemberID, Topic_ID, Forum_ID, Cat_ID)
			end if
		end if
	Case "guest_vote" '# User is viewing results - no vote
		if strVResults = "0" and Voted <> true then
			Call UpdateVote("1", MemberID, Topic_ID, Forum_ID, Cat_ID)
		end if
	Case else
		if strVResults = "0" and Request.QueryString("results") = "1" and Voted = false then
			Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """> </font></p>" & vbNewLine & _
					"<table align=""center"" border=""0"">" & vbNewLine & _
			  		"	<tr>" & vbNewLine & _
			    	"		<td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>You cannot view the poll results before you vote!</font></td>" & vbNewLine & _
			  		"	</tr>" & vbNewLine & _
			  		"	<tr>" & vbNewLine & _
					"		<td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><br /><br /><a href=""JavaScript:history.go(-1)"">Go Back to Vote.</a></font></td>" & vbNewLine & _
			  		"	</tr>" & vbNewLine & _
					"</table>" & vbNewLine & _
					"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """> </font></p>" & vbNewLine
			WriteFooter
		   Response.End
		end if
End Select
'###########################################################################################


	Response.Write	"      <table border=""0"" width=""100%"">" & vbNewLine & _
			"        <tr>" & vbNewLine & _
			"          <td width=""50%"" align=""left"" nowrap>" & vbNewLine & _
			"          " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
			"          " & getCurrentIcon(strIconBar,"","align=""absmiddle""")
	if Cat_Status <> 0 then 
		Response.Write	getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""")
	else 
		Response.Write	getCurrentIcon(strIconFolderClosed,"","align=""absmiddle""")
	end if
	Response.Write	" <a href=""default.asp?CAT_ID=" & Cat_ID & """>" & ChkString(Cat_Name,"display") & "</a><br />" & vbNewLine & _
			"          " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""")
	if ArchiveView = "true" then
		Response.Write	getCurrentIcon(strIconFolderArchived,"","align=""absmiddle""")
	else
		if Forum_Status <> 0 and Cat_Status <> 0 then
			Response.Write	getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""")
		else
			Response.Write	getCurrentIcon(strIconFolderClosed,"","align=""absmiddle""")
		end if
	end if
	Response.Write	" <a href=""forum.asp?" & ArchiveLink & "FORUM_ID=" & Forum_ID & """>" & ChkString(Forum_Subject,"display") & "</a><br />" & vbNewLine
	if ArchiveView = "true" then
		Response.Write	"          " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderArchived,"","align=""absmiddle""") & " "
		elseif IsEvent="1" then
		Response.Write	"          " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strCalIconEvent,"","align=""absmiddle""") & " " & strCalEvent & ": "

	
	elseif Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0 then
		Response.Write	"          " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpenTopic,"","align=""absmiddle""") & " "
	else
		Response.Write	"          " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderClosedTopic,"","align=""absmiddle""") & " "
	end if
	if Request.QueryString("SearchTerms") <> "" then
		Response.Write	SearchHiLite(ChkString(Topic_Subject,"title"))
	else
		Response.Write	ChkString(Topic_Subject,"title")
	end if
	Response.Write	"</td>" & vbNewLine & _
			"          <td align=""center"" width=""50%"">" & vbNewLine
	call PostingOptions()
	Response.Write	"</td>" & vbNewLine & _
			"        </tr>" & vbNewLine & _
			"      </table>" & vbNewLine & _
			"    </td>" & vbNewLine & _
			"  </tr>" & vbNewLine & _
			"</table>" & vbNewLine
	if maxpages > 1 then
		Response.Write	"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""1"" width=""95%"">" & vbNewLine & _
				"  <tr>" & vbNewLine & _
				"    <td align=""right"" valign=""top"">"
		if mypage > 1 then Response.Write("<a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & "&whichpage=" & mypage-1 & SearchLink & """ title=""Goto the Previous page in this Topic""" & dWStatus("Goto the Previous page in this Topic") & ">Previous Page</a>")
		'if mypage > 1 then Response.Write("<a href=""javascript: onclick=document.PageNum1.whichpage.value=" & mypage-1 & ";document.PageNum1.submit();"" title=""Goto the Previous page in this Topic""" & dWStatus("Goto the Previous page in this Topic") & ">Previous Page</a>")
		if mypage > 1 and mypage < maxpages then Response.Write(" | ")
		if mypage < maxpages then Response.Write("<a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & "&whichpage=" & mypage+1 & SearchLink & """ title=""Goto the Next page in this Topic""" & dWStatus("Goto the Next page in this Topic") & ">Next Page</a>")
		'if mypage < maxpages then Response.Write("<a href=""javascript: onclick=document.PageNum1.whichpage.value=" & mypage+1 & ";document.PageNum1.submit();"" title=""Goto the Next page in this Topic""" & dWStatus("Goto the Next page in this Topic") & ">Next Page</a>")
		Response.Write	"</td>" & vbNewLine & _
			"  </tr>" & vbNewLine & _
			"</table>" & vbNewLine
	end if
	Response.Write	"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""95%"">" & vbNewLine & _
			"  <tr>" & vbNewLine & _
			"    <td>" & vbNewLine & _
  			"      <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
			"        <tr>" & vbNewLine & _
			"          <td class=""tableborder"">" & vbNewLine & _
			"            <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
			"              <tr>" & vbNewLine & _
			"                <td align=""center"" class=""headcell"" width=""" & strTopicWidthLeft & """"
	if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap")
	Response.Write	"><b>Author</b></td>" & vbNewLine & _
			"                <td align=""center"" class=""headcell"" width=""" & strTopicWidthRight & """"
	if lcase(strTopicNoWrapRight) = "1" then Response.Write(" nowrap")
	Response.Write	"><b>" & vbNewLine
	if strShowTopicNav = "1" then
		Call Topic_nav()
	else
		Response.Write("Topic")
	end if
	Response.Write	"</b></td>" & vbNewLine
	if (AdminAllowed = 1) then
		if maxpages > 1 then
			Call DropDownPaging(1)
			Response.Write	"                <td align=""right"" class=""headcell"" nowrap>" & vbNewLine
			call AdminOptions()
			Response.Write	"                </td>" & vbNewLine
		else
			Response.Write	"                <td align=""right"" class=""headcell"" nowrap>" & vbNewLine
			call AdminOptions()
			Response.Write	"                </td>" & vbNewLine
		end if
	else
		if maxpages > 1 then
			Call DropDownPaging(1)
		else
	        	Response.Write	"                <td align=""right"" class=""headcell"" nowrap> </td>" & vbNewLine
	 	end if
	end if
	Response.Write	"              </tr>" & vbNewLine
 
	if mypage = 1 then 
		Call GetFirst() 
	end if
	
	'## Forum_SQL
	strSql = "UPDATE " & strActivePrefix & "TOPICS "
	strSql = strSql & " SET T_VIEW_COUNT = (T_VIEW_COUNT + 1) "
	strSql = strSql & " WHERE (TOPIC_ID = " & Topic_ID & ")"

	my_conn.Execute (strSql),,adCmdText + adExecuteNoRecords
 
	if iReplyCount = "" then  '## No replies found in DB
		' Nothing
	else
		intI = 0 
	
		rM_NAME = 0
		rM_RECEIVE_EMAIL = 1
		rM_AIM = 2
		rM_ICQ = 3
		rM_MSN = 4
		rM_YAHOO = 5
		rM_TITLE = 6
		rMEMBER_ID = 7
		rM_HOMEPAGE = 8
		rM_LEVEL = 9
		rM_POSTS = 10
		rM_COUNTRY = 11
		rREPLY_ID = 12
		rFORUM_ID = 13
		rR_AUTHOR = 14
		rTOPIC_ID = 15
		rR_MESSAGE = 16
		rR_LAST_EDIT = 17
		rR_LAST_EDITBY = 18
		rR_SIG = 19
		rR_STATUS = 20
		rR_DATE = 21
		if CanShowSignature = 1 then
			rM_SIG = 22
		end if
		
		for iForum = 0 to iReplyCount

			Reply_MemberName = arrReplyData(rM_NAME, iForum)
			Reply_MemberReceiveEmail = arrReplyData(rM_RECEIVE_EMAIL, iForum)
			Reply_MemberAIM = arrReplyData(rM_AIM, iForum)
			Reply_MemberICQ = arrReplyData(rM_ICQ, iForum)
			Reply_MemberMSN = arrReplyData(rM_MSN, iForum)
			Reply_MemberYAHOO = arrReplyData(rM_YAHOO, iForum)
			Reply_MemberTitle = arrReplyData(rM_TITLE, iForum)
			Reply_MemberID = arrReplyData(rMEMBER_ID, iForum)
			Reply_MemberHomepage = arrReplyData(rM_HOMEPAGE, iForum)
			Reply_MemberLevel = arrReplyData(rM_LEVEL, iForum)
			Reply_MemberPosts = arrReplyData(rM_POSTS, iForum)
			Reply_MemberCountry = arrReplyData(rM_COUNTRY, iForum)
			Reply_ReplyID = arrReplyData(rREPLY_ID, iForum)
			Reply_ForumID = arrReplyData(rFORUM_ID, iForum)
			Reply_Author = arrReplyData(rR_AUTHOR, iForum)
			Reply_TopicID = arrReplyData(rTOPIC_ID, iForum)
			Reply_Content = arrReplyData(rR_MESSAGE, iForum)
			Reply_LastEdit = arrReplyData(rR_LAST_EDIT, iForum)
			Reply_LastEditBy = arrReplyData(rR_LAST_EDITBY, iForum)
			Reply_Sig = arrReplyData(rR_SIG, iForum)
			Reply_Status = arrReplyData(rR_STATUS, iForum)
			Reply_Date = arrReplyData(rR_DATE, iForum)
			if CanShowSignature = 1 then
				Reply_MemberSig = trim(arrReplyData(rM_SIG, iForum))
			end if

			if intI = 0 then 
				CColor = "altforumcell"
			else
				CColor = "forumcell"
			end if

			Response.Write	"              <tr>" & vbNewLine & _
					"                <td class=""" & CColor & """ valign=""top"" width=""" & strTopicWidthLeft & """"
			if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap")
			Response.Write	">" & vbNewLine & _
					"                <p><b>" & profileLink(ChkString(Reply_MemberName,"display"),Reply_Author) & "</b><br />" & vbNewLine
			if strShowRank = 1 or strShowRank = 3 then
				Response.Write	"                <span class=""smalltext"">" & ChkString(getMember_Level(Reply_MemberTitle, Reply_MemberLevel, Reply_MemberPosts),"display") & "<br />" & vbNewLine
			end if
			if strShowRank = 2 or strShowRank = 3 then
				Response.Write	"                " & getStar_Level(Reply_MemberLevel, Reply_MemberPosts) & "<br />" & vbNewLine
			end if
		 	Response.Write	"                </p>" & vbNewLine & _
					"                <p class=""smalltext"">" & Reply_MemberCountry & "<br />" & vbNewLine & _
					"                <span class=""smalltext"">" & Reply_MemberPosts & " Posts</p></td>" & vbNewLine & _
					"                <td class=""" & CColor & """ height=""100%"" width=""" & strTopicWidthRight & """"
			if lcase(strTopicNoWrapRight) = "1" then Response.Write(" nowrap")
			if (AdminAllowed = 1) and (maxpages > 1) then
				Response.Write	(" colspan=""3"" ")
			else
				Response.Write	(" colspan=""2"" ")
			end if
			Response.Write	"valign=""top""><a name=""" & Reply_ReplyID & """></a>" & vbNewLine & _
					"                  <table width=""100%"" height=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine & _
					"                    <tr>" & vbNewLine & _
					"                      <td valign=""top"">" & vbNewLine
			' DEM --> Start of Code altered for moderation
			if Reply_Status < 2 then
				Response.Write  "                      " & getCurrentIcon(strIconPosticon,"","hspace=""3""") & "<span class=""smalltext"">Posted - " & ChkDate(Reply_Date, " : " ,true) & "</span>" & vbNewline
			elseif Reply_Status = 2 then
				Response.Write  "                       <span class=""smalltext"">NOT MODERATED!!!</span>" & vbNewline
			elseif Reply_Status = 3 then
				Response.Write  "                      " & getCurrentIcon(strIconPosticonHold,"","hspace=""3""") & "<span class=""smalltext"">ON HOLD</span>" & vbNewline
			end if
			' DEM --> End of Code added for moderation.
			Response.Write	"                       " & profileLink(getCurrentIcon(strIconProfile,"Show Profile","align=""absmiddle"" hspace=""6"""),Reply_MemberID) & vbNewLine
			if mLev > 2 or Reply_MemberReceiveEmail = "1" then
				if (mlev <> 0) or (mlev = 0 and  strLogonForMail <> "1") then
					Response.Write	"                       <a href=""JavaScript:openWindow('pop_mail.asp?id=" & Reply_MemberID & "')"">" & getCurrentIcon(strIconEmail,"Email Poster","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
				end if
			end if
			if strHomepage = "1" then
				if Reply_MemberHomepage <> " " then
					Response.Write	"                       <a href=""" & Reply_MemberHomepage & """ target=""_blank"">" & getCurrentIcon(strIconHomepage,"Visit " & ChkString(Reply_MemberName,"display") & "'s Homepage","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
				end if
			end if
			if (AdminAllowed = 1 or Reply_MemberID = MemberID) then
				if (Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0) or (AdminAllowed = 1) then
					Response.Write	"                       <a href=""post.asp?" & ArchiveLink & "method=Edit&REPLY_ID=" & Reply_ReplyID & "&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconEditTopic,"Edit Reply","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
				end if
			end if
			if (strAIM = "1") then
				if Trim(Reply_MemberAIM) <> "" then
					Response.Write	"                       <a href=""JavaScript:openWindow('pop_messengers.asp?mode=AIM&ID=" & Reply_MemberID & "')"">" & getCurrentIcon(strIconAIM,"Send " & ChkString(Reply_MemberName,"display") & " an AOL message","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
				end if
			end if
			if strICQ = "1" then
				if Trim(Reply_MemberICQ) <> "" then
					Response.Write	"                       <a href=""JavaScript:openWindow('pop_messengers.asp?mode=ICQ&ID=" & Reply_MemberID & "')"">" & getCurrentIcon(strIconICQ,"Send " & ChkString(Reply_MemberName,"display") & " an ICQ Message","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
				end if
			end if
			if (strMSN = "1") then
				if Trim(Reply_MemberMSN) <> "" then
					Response.Write	"                       <a href=""JavaScript:openWindow('pop_messengers.asp?mode=MSN&ID=" & Reply_MemberID & "')"">" & getCurrentIcon(strIconMSNM,"Click to see " & ChkString(Reply_MemberName,"display") & "'s MSN Messenger address","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
				end if
			end if
			if strYAHOO = "1" then
				if Trim(Reply_MemberYAHOO) <> "" then
					Response.Write	"                       <a href=""http://edit.yahoo.com/config/send_webmesg?.target=" & ChkString(Reply_MemberYAHOO, "urlpath") & "&.src=pg"" target=""_blank"">" & getCurrentIcon(strIconYahoo,"Send " & ChkString(Reply_MemberName,"display") & " a Yahoo! Message","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
				end if
			end if
			if ((Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status = 1) or (AdminAllowed = 1 and Topic_Status <= 1)) and ArchiveView = "" then
				Response.Write	"                       <a href=""post.asp?" & ArchiveLink & "method=ReplyQuote&REPLY_ID=" & Reply_ReplyID & "&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconReplyTopic,"Reply with Quote","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
			end if
			if (strIPLogging = "1") then
				if (AdminAllowed = 1) then
					Response.Write	"                       <a href=""JavaScript:openWindow('pop_viewip.asp?" & ArchiveLink & "mode=getIP&REPLY_ID=" & Reply_ReplyID & "&FORUM_ID=" & Forum_ID & "')"">" & getCurrentIcon(strIconIP,"View user's IP address","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
				end if
			end if
			if (AdminAllowed = 1 or Reply_MemberID = MemberID) then
				if (Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0) or (AdminAllowed = 1) then
					Response.Write	"                       <a href=""JavaScript:openWindow('pop_delete.asp?" & ArchiveLink & "mode=Reply&REPLY_ID=" & Reply_ReplyID & "&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "')"">" & getCurrentIcon(strIconDeleteReply,"Delete Reply","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
				end if
		                ' DEM --> Start of Code added for Full Moderation
				if (AdminAllowed = 1 and Reply_Status > 1) then
					ReplyString = "REPLY_ID=" & Reply_ReplyID & "&CAT_ID=" & Cat_ID & "&FORUM_ID=" & Forum_ID & "&TOPIC_ID=" & Topic_ID
					Response.Write "                       <a href=""JavaScript:openWindow('pop_moderate.asp?" & ReplyString & "')"">" & getCurrentIcon(strIconFolderModerate,"Approve/Hold/Reject this Reply","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewline
				end if
				' DEM --> End of Code added for Full Moderation
			end if
			Response.Write	"                      <hr></td>" & vbNewLine & _
					"                    </tr>" & vbNewLine & _
					"                    <tr>" & vbNewLine & _
					"                      <td valign=""top"" height=""100%""><span class=""textID"" id=""msg"">"
			if Request.QueryString("SearchTerms") <> "" then
				Response.Write	SearchHiLite(formatStr(Reply_Content))
			else
				Response.Write	formatStr(Reply_Content)
			end if
			Response.Write	"</span id=""msg""></td>" & vbNewLine & _
					"                    </tr>" & vbNewLine
			if CanShowSignature = 1 and Reply_Sig = 1 and Reply_MemberSig <> "" then
				Response.Write	"                    <tr>" & vbNewLine & _
						"                      <td valign=""bottom""><hr>" & formatStr(Reply_MemberSig) & "</td>" & vbNewLine & _
						"                    </tr>" & vbNewLine
			end if
			if strEditedByDate = "1" and Reply_LastEditBy <> "" then
				if Reply_LastEditBy <> Reply_Author then 
					Reply_LastEditByName = getMemberName(Reply_LastEditBy)
				else
					Reply_LastEditByName = chkString(Reply_MemberName,"display")
				end if
				Response.Write	"                    <tr>" & vbNewLine & _
						"                      <td valign=""bottom""><hr><span class=""smalltext"">" & _
						"Edited by - " & Reply_LastEditByName & " on " & chkDate(Reply_LastEdit, " " ,true) & "</td>" & vbNewLine & _
						"                    </tr>" & vbNewLine
			end if
			Response.Write	"                    <tr>" & vbNewLine & _
					"                      <td valign=""bottom"" align=""right"" height=""20""><a href=""#top"">" & getCurrentIcon(strIconGoUp,"Go to Top of Page","align=""right""") & "</a></td>" & vbNewLine & _
					"                    </tr>" & vbNewLine & _
					"                  </table>" & vbNewLine & _
					"                </td>" & vbNewLine & _
					"              </tr>" & vbNewLine
			intI  = intI + 1
			if intI = 2 then 
				intI = 0
			end if
		next
	end if
	Response.Write	"              <tr>" & vbNewLine
	if maxpages > 1 then
		Call DropDownPaging(2)
	else
		Response.Write	"                <td align=""center"" class=""headcell"" width=""" & strTopicWidthLeft & """"
		if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap")
		Response.Write	"><b> </b></td>" & vbNewLine
	end if
	Response.Write	"                <td align=""center"" class=""headcell"" width=""" & strTopicWidthRight & """"
	if lcase(strTopicNoWrapRight) = "1" then Response.Write(" nowrap")
	'if maxpages > 1 and (AdminAllowed = 1) then Response.Write(" colspan=""2""")
	Response.Write	"><b>" & vbNewLine
	if strShowTopicNav = "1" then
		Call Topic_nav()
	else
		Response.Write("Topic")
	end if
	Response.Write	"</b></td>" & vbNewLine
	if (AdminAllowed = 1) then
		if maxpages > 1 then
	        	Response.Write	"                <td align=""right"" class=""headcell"" nowrap> </td>" & vbNewLine
		end if
		Response.Write	"                <td align=""right"" class=""headcell"" nowrap>" & vbNewLine
		call AdminOptions()
		Response.Write	"</td>" & vbNewLine
	else
        	Response.Write	"                <td align=""right"" class=""headcell"" nowrap> </td>" & vbNewLine
	end if
	Response.Write	"              </tr>" & vbNewLine & _
			"            </table>" & vbNewLine & _
			"          </td>" & vbNewLine & _
			"        </tr>" & vbNewLine & _
			"      </table>" & vbNewLine & _
			"    </td>" & vbNewLine & _
			"  </tr>" & vbNewLine & _
			"</table>" & vbNewLine
	if maxpages > 1 then
		Response.Write	"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""1"" width=""95%"">" & vbNewLine & _
				"  <tr>" & vbNewLine & _
				"    <td align=""left"" valign=""top""><span class=""smalltext"">"
		if mypage > 1 then Response.Write("<a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & "&whichpage=" & mypage-1 & SearchLink & """ title=""Goto the Previous page in this Topic""" & dWStatus("Goto the Previous page in this Topic") & ">Previous Page</a>")
		'if mypage > 1 then Response.Write("<a href=""javascript: onclick=document.PageNum1.whichpage.value=" & mypage-1 & ";document.PageNum1.submit();"" title=""Goto the Previous page in this Topic""" & dWStatus("Goto the Previous page in this Topic") & ">Previous Page</a>")
		if mypage > 1 and mypage < maxpages then Response.Write(" | ")
		if mypage < maxpages then Response.Write("<a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & "&whichpage=" & mypage+1 & SearchLink & """ title=""Goto the Next page in this Topic""" & dWStatus("Goto the Next page in this Topic") & ">Next Page</a>")
		'if mypage < maxpages then Response.Write("<a href=""javascript: onclick=document.PageNum1.whichpage.value=" & mypage+1 & ";document.PageNum1.submit();"" title=""Goto the Next page in this Topic""" & dWStatus("Goto the Next page in this Topic") & ">Next Page</a>")
		Response.Write	"</td>" & vbNewLine & _
			"  </tr>" & vbNewLine & _
			"</table>" & vbNewLine
	end if
	Response.Write	"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""95%"">" & vbNewLine & _
			"  <tr>" & vbNewLine & _
			"    <td>" & vbNewLine & _
			"      <table width=""100%"">" & vbNewLine & _
			"        <tr>" & vbNewLine & _
			"          <td align=""center"" valign=""top"" width=""50%"">" & vbNewLine
	Call PostingOptions()
	Response.Write	"</td>" & vbNewLine & _
			"          <td align=""right"" valign=""top"" width=""50%"" nowrap>" & vbNewLine
%>
	<!--#INCLUDE FILE="inc_jump_to.asp" -->
<%
	Response.Write	"          </td>" & vbNewLine & _
			"        </tr>" & vbNewLine & _
			"      </table>" & vbNewLine

	if strShowQuickReply = "1" and strDBNTUserName <> "" and ((Cat_Status = 1) and (Forum_Status = 1) and (Topic_Status = 1)) and ArchiveView = "" then
		call QuickReply()
	end if

        WriteFooter
end if

sub GetFirst()
	Response.Write	"              <tr>" & vbNewLine & _
			"                <td class=""firstforumcell"" valign=""top"" width=""" & strTopicWidthLeft & """"
	if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap")
	Response.Write	">" & vbNewLine & _
			"                <p><b>" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</b><br />" & vbNewLine
	if strShowRank = 1 or strShowRank = 3 then
 		Response.Write	"                <span class=""smalltext""" & ChkString(getMember_Level(Member_Title, Member_Level, Member_Posts),"display") & "<br />" & vbNewLine
	end if
	if strShowRank = 2 or strShowRank = 3 then
		Response.Write	"                " & getStar_Level(Member_Level, Member_Posts) & "<br />" & vbNewLine
	end if
 	Response.Write	"                </p>" & vbNewLine & _
			"                <p class=""smalltext"">" & Member_Country & "<br />" & vbNewLine & _
			"                <span class=""smalltext"">" & Member_Posts & " Posts</span></p></td>" & vbNewLine & _
			"                <td class=""firstforumcell"" width=""" & strTopicWidthRight & """"
	if lcase(strTopicNoWrapRight) = "1" then Response.Write(" nowrap")
	if (AdminAllowed = 1) and (maxpages > 1) then
		Response.Write	(" colspan=""3"" ")
	else
		Response.Write	(" colspan=""2"" ")
	end if
	Response.Write	"valign=""top"">" & vbNewLine & _
			"                  <table width=""100%"" height=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine & _
			"                    <tr>" & vbNewLine & _
			"                      <td valign=""top"">" & vbNewLine
	if Topic_Status < 2 then
		Response.Write  "                      " & getCurrentIcon(strIconPosticon,"","hspace=""3""") & "<span class=""smalltext"">Posted - " & ChkDate(Topic_Date, " : " ,true) & "</span>" & vbNewline
	elseif Topic_Status = 2 then
		Response.Write  "                      <span class=""smalltext"">NOT MODERATED!!!</span>" & vbNewline
	elseif Topic_Status = 3 then
		Response.Write  "                      " & getCurrentIcon(strIconPosticonHold,"","hspace=""3""") & "<span class=""smalltext"">ON HOLD</span>" & vbNewline
	end if
	Response.Write	"                       " & profileLink(getCurrentIcon(strIconProfile,"Show Profile","align=""absmiddle"" hspace=""6"""),TMember_ID) & vbNewLine
	if mLev > 2 or Member_ReceiveMail = "1" then 
		if (mlev <> 0) or (mlev = 0 and  strLogonForMail <> "1") then 
			Response.Write	"                       <a href=""JavaScript:openWindow('pop_mail.asp?id=" & TMember_ID & "')"">" & getCurrentIcon(strIconEmail,"Email Poster","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
		end if
	end if
	if (strHomepage = "1") then
		if Member_Homepage <> " " then
			Response.Write	"                       <a href=""" & Member_Homepage & """ target=""_blank"">" & getCurrentIcon(strIconHomepage,"Visit " & ChkString(Member_Name,"display") & "'s Homepage","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
		end if
	end if
'############################ Poll Mod ###############################
	if IsPoll = 1 and trim(strFeaturedPollID) = Topic_ID and AdminAllowed <> 1 then
		' Do nothing
	elseif IsPoll = 1 then
		if (AdminAllowed = 1 or TMember_ID = MemberID) then
			if ((Cat_Status <> 0) and (Forum_Status <> 0) and (Topic_Status <> 0)) or (AdminAllowed = 1) then
       			Response.Write "                       <a href=""post.asp?" & pollLink & "method=EditTopic&REPLY_ID=" & Topic_ID & "&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconEditTopic,"Edit Poll","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
			end if
		end if
	else
'###################################################################### 
	if (AdminAllowed = 1 or TMember_ID = MemberID) then
		if ((Cat_Status <> 0) and (Forum_Status <> 0) and (Topic_Status <> 0)) or (AdminAllowed = 1) then
			Response.Write	"                       <a href=""post.asp?" & ArchiveLink & "method=EditTopic&REPLY_ID=" & Topic_ID & "&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconEditTopic,"Edit Topic","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
		end if
	end if
		end if ' <---- ####### Poll Mod - 1 line ##########

	if (strAIM = "1") then
		if Trim(Member_AIM) <> "" then
			Response.Write	"                       <a href=""JavaScript:openWindow('pop_messengers.asp?mode=AIM&ID=" & TMember_ID & "')"">" & getCurrentIcon(strIconAIM,"Send " & ChkString(Member_Name,"display") & " an AOL message","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
		end if
	end if
	if (strICQ = "1") then
		if Trim(Member_ICQ) <> "" then
			Response.Write	"                       <a href=""JavaScript:openWindow('pop_messengers.asp?mode=ICQ&ID=" & TMember_ID & "')"">" & getCurrentIcon(strIconICQ,"Send " & ChkString(Member_Name,"display") & " an ICQ Message","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
		end if
	end if
	if (strMSN = "1") then
		if Trim(Member_MSN) <> "" then
			Response.Write	"                       <a href=""JavaScript:openWindow('pop_messengers.asp?mode=MSN&ID=" & TMember_ID & "')"">" & getCurrentIcon(strIconMSNM,"Click to see " & ChkString(Member_Name,"display") & "'s MSN Messenger address","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
		end if
	end if
	if (strYAHOO = "1") then
		if Trim(Member_YAHOO) <> "" then
			Response.Write	"                       <a href=""http://edit.yahoo.com/config/send_webmesg?.target=" & ChkString(Member_YAHOO, "urlpath") & "&.src=pg"" target=""_blank"">" & getCurrentIcon(strIconYahoo,"Send " & ChkString(Member_Name,"display") & " a Yahoo! Message","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
		end if
	end if
	if ((Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status = 1) or (AdminAllowed = 1 and Topic_Status <= 1) and ArchiveView = "" ) then
		Response.Write	"                       <a href=""post.asp?" & ArchiveLink & "method=TopicQuote&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconReplyTopic,"Reply with Quote","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
	end if
	if (strIPLogging = "1") then
		if (AdminAllowed = 1) then
			Response.Write	"                       <a href=""JavaScript:openWindow('pop_viewip.asp?" & ArchiveLink & pollLink & "mode=getIP&TOPIC_ID=" & TopicID & "&FORUM_ID=" & Forum_ID & "')"">" & getCurrentIcon(strIconIP,"View user's IP address","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
		end if
	end if
	if (AdminAllowed = 1) or (TMember_ID = MemberID and Topic_Replies < 1) then
		Response.Write	"                       <a href=""JavaScript:openWindow('pop_delete.asp?" & ArchiveLink & pollLink & "mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconDeleteReply,"Delete Topic","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
	end if
	' DEM --> Start of Code added for Full Moderation
	if (AdminAllowed = 1 and Topic_Status > 1) then
		TopicString = "TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID
		Response.Write  "                       <a href=""JavaScript:openWindow('pop_moderate.asp?" & TopicString & "')"">" & getCurrentIcon(strIconFolderModerate,"Approve/Hold/Reject this Topic","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewline
	End if
	' End of Code added for Full Moderation
	Response.Write	"                      <hr></td>" & vbNewLine & _
			"                    </tr>" & vbNewLine & _
			"                    <tr>" & vbNewLine 
'			"                      <td valign=""top"" height=""100%""><span class=""textID"" id=""msg"">"
	If IsEvent = "1" Then 
		%> <!-- #include file="cal_topic.asp" --> <% 
	End If
	if Request.QueryString("SearchTerms") <> "" then
		Response.Write	SearchHiLite(formatStr(Topic_Message))
	else
		Response.Write	formatStr(Topic_Message)
	end if
  Response.Write	"</span id=""msg""></td>" & vbNewLine 
'################################################
	Response.Write "           	<td valign=""top"" height=""100%""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine
	if IsPoll = 1 then
 		if Voted = false and Request.QueryString("results") <> "1" and Poll_Status = 1 and Forum_Polls <> "0" then
			Response.Write "<table border=""0"" width=""100%"">" & vbNewLine & _
					"  <tr>" & vbNewLine & _
					"    <td valign=""top"">" & vbNewLine & _
					"		<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Poll Question:</b></font><br />" & vbNewLine & _
					"		<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><span class=""spnMessageText"" id=""msg"">" & vbNewLine
			if Request.QueryString("SearchTerms") <> "" then
				Response.Write	SearchHiLite(formatStr(Topic_Message))
			else
				Response.Write	formatStr(Topic_Message)
			end if
			Response.Write "</span id=""msg""></font>" & vbNewLine & _
					"		<table border=""0"" width=""100%"">" & vbNewLine & _
					"		<form method=""POST"" action=""topic.asp?TOPIC_ID=" & Topic_ID & "&results=1"" name=""Poll"">" & vbNewLine & _
					"		  <tr>" & vbNewLine & _
					"		    <td width=""100%"" bgcolor=""" & strForumFirstCellColor & """ align=""left"">" & vbNewLine & _
					"				<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><br><b>Choices:</b></font><br />" & vbNewLine
    		for nCount = 1 To 15
    			if trim(vAnswers(nCount)) <> "" then
					Response.Write "				<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input type=""radio"" value=""" & nCount & """ name=""R1"">" & formatStr(vAnswers(nCount)) & "</font><br />" & vbNewLine
	    		end if
    		next
      	Response.Write "		    </td>" & vbNewLine & _
					"		  </tr>" & vbNewLine
			if IsPoll = 1 then
				Response.Write "		  <tr>" & vbNewLine & _
							"		  	<td width=""100%"" bgcolor=""" & strForumFirstCellColor & """ align=""left""><br />" & vbNewLine
				if strGfxButtons <> "0" then
					Response.Write "<input type=""image"" src=""" & strImageURL & "vote_now.gif"" name=""vote"" width=""72"" height=""16"" hspace=""0"" alt=""Vote Now"" onClick=""submitPoll(this)"">" & vbNewLine & _
							"<input type=""image"" src=""" & strImageURL & "view_results.gif"" name=""results"" width=""95"" height=""16"" hspace=""0"" alt=""Poll Results"" onClick=""submitPoll(this)"">" & vbNewLine
				else
					Response.Write "<input type=""button"" value=""Vote Now!"" name=""vote"" onClick=""submitPoll(this)"">" & vbNewLine & _
							"<input type=""button"" value=""Poll Results"" name=""results"" onClick=""submitPoll(this)"">" & vbNewLine
				end if
				if strVResults = "0" then
					Response.Write "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>(Anonymous Vote)</font>" & vbNewLine
				end if
				Response.Write	"			<input type=""hidden"" name=""Method_Type"" value="""">" & vbNewLine & _
						"		  	</td>" & vbNewLine & _
						"		  </tr>" & vbNewLine
			end if
			Response.Write "		</form>" & vbNewLine & _
					"		</table>" & vbNewLine
			if strWhoVotes = "members" and mlev = 0 then
				Response.Write "		<hr size=""" & strFooterFontSize & """ noshade>" & vbNewLine & _
						"		<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><b>Who Can Vote?</b> Only Members can vote. You need to <a href=""policy.asp"">register</a> or be logged in to vote.</font>" & vbNewLine
			end if
			Response.Write "    </td>" & vbNewLine & _
					"  </tr>" & vbNewLine & _
					"</table>" & vbNewLine
		end if
	else
		Response.Write "                      <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><span class=""spnMessageText"" id=""msg"">"
		if Request.QueryString("SearchTerms") <> "" then
			Response.Write	SearchHiLite(formatStr(Topic_Message))
		else
			Response.Write	formatStr(Topic_Message)
		end if
		Response.Write	"</span id=""msg""></font>" & vbNewLine
	end if

	if IsPoll = 1 then
		if Request.QueryString("results") = "1" or _
		(Request.QueryString("results") <> "1" and Voted = true) or Poll_Status = 0 or Forum_Polls = "0" then
			Response.Write "<table border=""0"" width=""100%"">" & vbNewLine & _
 					"	<tr>" & vbNewLine & _
					"		<td valign=""top"" colspan=""3"">" & vbNewLine & _
					"			<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Poll Question:</b></font><br />" & vbNewLine & _
					"			<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><span class=""spnMessageText"" id=""msg"">" & vbNewLine
			if Request.QueryString("SearchTerms") <> "" then
				Response.Write	SearchHiLite(formatStr(Topic_Message))
			else
				Response.Write	formatStr(Topic_Message)
			end if
			Response.Write "</span id=""msg""></font><br /><br />" & vbNewLine & _
					"		</td>" & vbNewLine & _
					"	</tr>" & vbNewLine & _
					"	<tr>" & vbNewLine & _
					"		<td colspan=""3""><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Results:</b></font></td>" & vbNewLine & _
					"	</tr>" & vbNewLine

			'First of all get max value and nLowValue
			nMaxValue = 0
			for nCount = 1 to 15
				if trim(vAnswers(nCount)) <> "" and vCount(nCount) > nMaxValue then
					nMaxValue = vCount(nCount)
				end if	
			next
			
			if nMaxValue = 0 then	
				nMaxValue = 1
			end if
			
			nMaxWidth = 200 'This is number of pixels for maxvalue
			
			nTotal = 0
			nTotal2 = 0
			
			'1. Go through all and get total
			for nCount = 1 to 15
				if trim(vAnswers(nCount)) <> "" then
					nTotal = nTotal + vCount(nCount)
					nTotal2 = nTotal2 + vCount(nCount)
				end if
			next
			
			if nTotal2 = 0 then
				nTotal2 = 1
			end if
			
			'2. Go through all and get percent
			for nCount = 1 to 15
				if trim(vAnswers(nCount)) <> "" then
					vPercent(nCount) = FormatNumber(vCount(nCount)/nTotal2*100,0)
				end if
			next
			
			for nCount = 1 to 15
				if trim(vAnswers(nCount)) <> "" then
					nThisVal = FormatNumber(vCount(nCount)/nMaxValue * nMaxWidth,0)
					Response.Write "	<tr>" & vbNewLine & _
							"		<td width=""30%""><font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & formatStr(vAnswers(nCount)) & "</font></td>" & vbNewLine & _
							"		<td nowrap><font face="""  & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """><img src=""" & strImageURL & "bar.gif"" width=""" & nThisVal & """ height=""10"">  [" & vPercent(nCount) & "%]</font></td>" & vbNewLine & _
							"		<td nowrap width=""10%""><font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>" & vCount(nCount) & " votes</font></td>" & vbNewLine & _
							"	</tr>" & vbNewLine
				end if
			next
			Response.Write "	<tr>" & vbNewLine & _
					"		<td align=""left"" colspan=""3""><br />" & vbNewLine & _
					"			<hr noshade size=""" & strFooterFontSize & """>" & vbNewLine & _
					"			<table cellspacing=""0"""
			if AdminAllowed = 1 and ArchiveView <> "true" then
				Response.Write " cellPadding=""3"""
			else
				Response.Write " cellPadding=""0"""
			end if
			Response.Write " border=""0"">" & vbNewLine & _
					"				<tr>" & vbNewLine & _
					"					<td align=""left""><font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
					"					<b>Poll Status:</b> " & vbNewLine
			if Poll_Status = 0 or Forum_Polls = "0" then
				Response.Write "Locked"
			else
				Response.Write "Open"
			end if
			Response.Write "  #187;#187;  </font></td>" & vbNewLine & _
					"					<td align=""left""><font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
					"					<b>Total Votes:</b> " & nTotal & " counted  #187;#187;  </font></td>" & vbNewLine & _
					"					<td align=""left""><font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
					"					<b>Last Vote:</b> " & vbNewLine
			if cint(nTotal) > 0 then Response.Write(chkDate(Last_Vote, " ", true)) else Response.Write("never")
			Response.Write " </font></td>" & vbNewLine & _
					"				</tr>" & vbNewLine
			if AdminAllowed = 1 and ArchiveView <> "true" then
				Response.Write "				<tr>" & vbNewLine & _
						"					<td colspan=""3""><font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strFooterFontSize & """><b>Admins/Moderators:</b> <a href=""javascript:openPollWindow('pop_poll.asp?TOPIC_ID=" & Topic_ID & "&p=wv','300','300')"">See who voted</a></font></td>" & vbNewLine & _
						"				</tr>" & vbNewLine
			end if
			Response.Write "			</table>" & vbNewLine & _
					"		</td>" & vbNewLine & _
					"	</tr>" & vbNewLine & _
					"</table>" & vbNewLine
		end if
	end if
	Response.Write "           	</td>" & vbNewLine
' Remember to start the 2nd line below with Response.Write.
' #####################################################################################

Response.Write			"                    </tr>" & vbNewLine
	if CanShowSignature = 1 and Topic_Sig = 1 and Topic_MemberSig <> "" then
		Response.Write	"                    <tr>" & vbNewLine & _
				"                      <td valign=""bottom""><hr>" & formatStr(Topic_MemberSig) & "</td>" & vbNewLine & _
				"                    </tr>" & vbNewLine
	end if
	if strEditedByDate = "1" and Topic_LastEditBy <> "" then
		if Topic_LastEditBy <> Topic_Author then 
			Topic_LastEditByName = getMemberName(Topic_LastEditBy)
		else
			Topic_LastEditByName = chkString(Member_Name,"display")
		end if
		Response.Write	"                    <tr>" & vbNewLine & _
				"                      <td valign=""bottom""><hr><span class=""smalltext"">" &_
				"Edited by - " & Topic_LastEditByName & " on " & chkDate(Topic_LastEdit, " ", true) & "</span>" & vbNewLine & _
				"                    </tr>" & vbNewLine
	end if
	Response.Write	"                  </table>" & vbNewLine & _
			"                </td>" & vbNewLine & _
			"              </tr>" & vbNewLine
End Sub


sub PostingOptions() 
	Response.Write	"          " & vbNewLine
	if (mlev = 4 or mlev = 3 or mlev = 2 or mlev = 1) or (lcase(strNoCookies) = "1") or (strDBNTUserName = "") then
		if ((Cat_Status = 1) and (Forum_Status = 1)) then
			Response.Write	"          <a href=""post.asp?" & ArchiveLink & "method=Topic&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconFolderNewTopic,"","align=""absmiddle""") & "</a> <a href=""post.asp?" & ArchiveLink & "method=Topic&FORUM_ID=" & Forum_ID & """>New Topic</a>" & vbNewLine
		'############################## Poll Mod ################################
			if strPolls = "1" and ((Forum_Polls = "2" and AdminAllowed = 1) or (Forum_Polls = "1")) then
				Response.Write " <a href=""post.asp?poll=1&method=Topic&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconPoll,"New Poll","align=""absmiddle""") & "</a> <a href=""post.asp?poll=1&method=Topic&FORUM_ID=" & Forum_ID & """>New Poll</a><br />" & vbNewLine
			end if
		'########################################################################

		else
			if (AdminAllowed = 1) then
				Response.Write	"          <a href=""post.asp?" & ArchiveLink & "method=Topic&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconFolderLocked,"","align=""absmiddle""") & "</a> <a href=""post.asp?" & ArchiveLink & "method=Topic&FORUM_ID=" & Forum_ID & """>New Topic</a>" & vbNewLine
			'########################### Poll Mod ###############################
				Response.Write " <a href=""post.asp?poll=1&method=Topic&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconPoll,"New Poll","align=""absmiddle""") & "</a> <a href=""post.asp?poll=1&method=Topic&FORUM_ID=" & Forum_ID & """>New Poll</a><br />" & vbNewLine
			'####################################################################

			else
				Response.Write	"          " & getCurrentIcon(strIconFolderLocked,"","align=""absmiddle""") & " Forum Locked" & vbNewLine
			end if 
		end if 
		if ((Cat_Status = 1) and (Forum_Status = 1) and (Topic_Status = 1)) and ArchiveView = "" then
			Response.Write	"          <a href=""post.asp?" & ArchiveLink & "method=Reply&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconReplyTopic,"","align=""absmiddle""") & "</a> <a href=""post.asp?" & ArchiveLink & "method=Reply&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>Reply to Topic</a>" & vbNewLine
		else 
			if ((AdminAllowed = 1 and Topic_Status <= 1) and ArchiveView = "")  then
				Response.Write	"          <a href=""post.asp?" & ArchiveLink & "method=Reply&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>"
				' DEM --> Added if statement to show normal icon for unmoderated posts.
				if Topic_Status = 1 and Cat_Status <> 0 and Forum_Status <> 0 then
					Response.Write	getCurrentIcon(strIconReplyTopic,"","align=""absmiddle""") & "</a> "
				else
					Response.Write	getCurrentIcon(strIconClosedTopic,"","align=""absmiddle""") & "</a> "
				end if 
				Response.Write	"<a href=""post.asp?" & ArchiveLink & "method=Reply&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>Reply to Topic</a>" & vbNewLine
			else 
				if Topic_Status = 0 then
					Response.Write	getCurrentIcon(strIconClosedTopic,"","align=""absmiddle""") & " Topic Locked" & vbNewline
				end if
			end if
		end if 
		if lcase(strEmail) = "1" and Topic_Status < 2 then 
			if Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0 and mLev > 0 then
				if strSubscription > 0 and Cat_Subscription > 0 and Forum_Subscription > 0 then
					if InArray(strTopicSubs, Topic_ID) then
						Response.Write "          <br />" & ShowSubLink ("U", Cat_ID, Forum_ID, Topic_ID, "Y") & vbNewLine
					elseif strBoardSubs <> "Y" and not(InArray(strForumSubs,Forum_ID) or InArray(strCatSubs,Cat_ID)) then
						Response.Write "          <br />" & ShowSubLink ("S", Cat_ID, Forum_ID, Topic_ID, "Y") & vbNewLine
					end if
				end if
			end if
			if ((mlev <> 0) or (mlev = 0 and strLogonForMail <> "1")) and lcase(strShowSendToFriend) = "1" then
			'########################### Poll Mod ################################
				if strPolls = "1" and ((Forum_Polls = "2" and AdminAllowed = 1) or (Forum_Polls = "1")) then
					Response.Write	"           <a href=""JavaScript:openWindow('pop_send_to_friend.asp?url=" & strForumURL & "topic.asp?TOPIC_ID=" & Topic_ID & "')"">" & getCurrentIcon(strIconSendTopic,"","align=""absmiddle""") & "</a> <a href=""JavaScript:openWindow('pop_send_to_friend.asp?url=" & strForumURL & "topic.asp?TOPIC_ID=" & Topic_ID & "')"">Send Topic to a Friend</a>" & vbNewLine
				else 
			'#####################################################################

				Response.Write	"          <br /><a href=""JavaScript:openWindow('pop_send_to_friend.asp?url=" & strForumURL & "topic.asp?TOPIC_ID=" & Topic_ID & "')"">" & getCurrentIcon(strIconSendTopic,"","align=""absmiddle""") & "</a> <a href=""JavaScript:openWindow('pop_send_to_friend.asp?url=" & strForumURL & "topic.asp?TOPIC_ID=" & Topic_ID & "')"">Send Topic to a Friend</a>" & vbNewLine
			end if 
		end if 
		end if ' <---########### Poll Mod ###########
		
		if lcase(strShowPrinterFriendly) = "1" and Topic_Status < 2 then
			Response.Write	"          <br /><a href=""JavaScript:openWindow5('pop_printer_friendly.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & "')"">" & getCurrentIcon(strIconPrint,"","align=""absmiddle""") & "</a> <a href=""JavaScript:openWindow5('pop_printer_friendly.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & "')"">Printer Friendly</a>" & vbNewLine
		end if
	end if 
	Response.Write	"          "
end sub 

sub AdminOptions() 
	Response.Write	"                " & vbNewLine
	if (AdminAllowed = 1) or (lcase(strNoCookies) = "1") then
		if (Cat_Status = 0) then 
			if (mlev = 4) then
				Response.Write	"                <a href=""JavaScript:openWindow('pop_open.asp?mode=Category&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderUnlocked,"Un-Lock Category","") & "</a>" & vbNewLine
			else
				Response.Write	"                " & getCurrentIcon(strIconFolderUnlocked,"Category Locked","") & vbNewLine
			end if
		else 
			if (Forum_Status = 0) then
				Response.Write	"                <a href=""JavaScript:openWindow('pop_open.asp?mode=Forum&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderUnlocked,"Un-Lock Forum","") & "</a>" & vbNewLine
			else
				if (Topic_Status <> 0) then
					Response.Write	"                <a href=""JavaScript:openWindow('pop_lock.asp?mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderLocked,"Lock Topic","") & "</a>" & vbNewLine
				else
					Response.Write	"                <a href=""JavaScript:openWindow('pop_open.asp?mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderUnlocked,"Un-Lock Topic","") & "</a>" & vbNewLine
				end if
			end if
		end if
		if ((Cat_Status <> 0) and (Forum_Status <> 0) and (Topic_Status <> 0)) or (AdminAllowed = 1) then
			Response.Write	"                <a href=""post.asp?" & ArchiveLink & pollLink & "method=EditTopic&REPLY_ID=" & Topic_ID & "&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconFolderPencil,"Edit Topic","hspace=""0""") & "</a>" & vbNewLine
		end if
		Response.Write	"                <a href=""JavaScript:openWindow('pop_delete.asp?" & ArchiveLink & pollLink & "mode=Topic&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "')"">" & getCurrentIcon(strIconFolderDelete,"Delete Topic","") & "</a>" & vbNewLine & _
				"                <a href=""post.asp?" & ArchiveLink & "method=Topic&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconFolderNewTopic,"New Topic","") & "</a>" & vbNewLine
		if Topic_Status <= 1 and ArchiveView = "" then
			Response.Write	"                <a href=""post.asp?" & ArchiveLink & "method=Reply&TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconReplyTopic,"Reply to Topic","") & "</a>" & vbNewLine
		end if
	end if 
	' DEM --> Start of Code added for Full Moderation
	if (AdminAllowed = 1 and CheckForUnModeratedPosts("TOPIC", Cat_ID, Forum_ID, Topic_ID) > 0) then
		TopicString = "TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "&CAT_ID=" & Cat_ID & "&REPLY_ID=X"
		Response.Write "                <a href=""JavaScript:openWindow('pop_moderate.asp?" & TopicString & "')"">" & getCurrentIcon(strIconFolderModerate,"Approve/Hold/Reject all posts for this Topic","") & "</a>" & vbNewline
	end if
	' DEM --> End of Code added for Full Moderation
	Response.Write "                "
end sub 

sub DropDownPaging(fnum)
	if maxpages > 1 then
		if mypage = "" then
			pge = 1
		else
			pge = mypage
		end if
		scriptname = request.servervariables("script_name")
		Response.Write("                <form name=""PageNum" & fnum & """ action=""topic.asp"">" & vbNewLine)
		Response.Write("                <td class=""headcell"" nowrap>" & vbNewLine)
		if Archiveview = "true" then Response.Write("                <input type=""hidden"" name=""ARCHIVE"" value=""" & ArchiveView & """>" & vbNewLine)
		Response.Write("                <input type=""hidden"" name=""TOPIC_ID"" value=""" & Request("TOPIC_ID") & """>" & vbNewLine)
		Response.Write("                <b>Page: </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine)
		for counter = 1 to maxpages
			if counter <> cLng(pge) then   
				Response.Write "                	<option value=""" & counter &  """>" & counter & "</option>" & vbNewLine
			else
				Response.Write "                	<option selected value=""" & counter &  """>" & counter & "</option>" & vbNewLine
			end if
		next
		Response.Write("                </select><b> of " & maxpages & "</b>" & vbNewLine)
		if Request.QueryString("SearchTerms") <> "" then Response.Write("                <input type=""hidden"" name=""SearchTerms"" value=""" & Request.QueryString("SearchTerms") & """>" & vbNewLine)
		Response.Write("                </td>" & vbNewLine)
		Response.Write("                </form>" & vbNewLine)
	end if
	top = "0"
end sub 

Sub Topic_nav()    

	if prevTopic = "" then
		strSQL = "SELECT T_SUBJECT, TOPIC_ID "
		strSql = strSql & "FROM " & strActivePrefix & "TOPICS "
		strSql = strSql & "WHERE T_LAST_POST > '" & Topic_LastPost
		strSql = strSql & "' AND FORUM_ID=" & Forum_ID
		strSql = strSql & " ORDER BY T_LAST_POST;"

		set rsPrevTopic = my_conn.Execute(TopSQL(strSql,1))

		if rsPrevTopic.EOF then
			prevTopic = getCurrentIcon(strIconBlank,"","align=""top"" hspace=""6""")
		else
			prevTopic = "<a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & rsPrevTopic("TOPIC_ID") & """>" & getCurrentIcon(strIconGoLeft,"Previous Topic","align=""top"" hspace=""6""") & "</a>"
		end if

		rsPrevTopic.close
		set rsPrevTopic = nothing
	else
		prevTopic = prevTopic
	end if

	if NextTopic = "" then
		strSQL = "SELECT T_SUBJECT, TOPIC_ID "
		strSql = strSql & "FROM " & strActivePrefix & "TOPICS "
		strSql = strSql & "WHERE T_LAST_POST < '" & Topic_LastPost
		strSql = strSql & "' AND FORUM_ID=" & Forum_ID
		strSql = strSql & " ORDER BY T_LAST_POST DESC;"

		set rsNextTopic = my_conn.Execute(TopSQL(strSql,1))

		if rsNextTopic.EOF then
			nextTopic = getCurrentIcon(strIconBlank,"","align=""top"" hspace=""6""")
		else
			nextTopic = "<a href=""topic.asp?" & ArchiveLink & "TOPIC_ID=" & rsNextTopic("TOPIC_ID") & """>" & getCurrentIcon(strIconGoRight,"Next Topic","align=""top"" hspace=""6""") & "</a>"
		end if

		rsNextTopic.close
		set rsNextTopic = nothing
	else
		nextTopic = nextTopic
	end if

	Response.Write ("                " & prevTopic & "<b> Topic </b>" & nextTopic)

end sub

function SearchHiLite(fStrMessage)
	'function derived from HiLiTeR by 2eNetWorX
	fArr = split(replace(Request.QueryString("SearchTerms"),";",""), ",")
	strBuffer = ""
	for iPos = 1 to len(fStrMessage)
		bChange = False
		'Looks for html tags
		if mid(fStrMessage, iPos, 1) = "<" then
			bInHTML = True
		end if
		'Looks for End of html tags
		if bInHTML = True then
			if mid(fStrMessage, iPos, 1) = ">" then
				bInHTML = False
			end if
		end if
		if bInHTML <> True then  
			for i = 0 to UBound(fArr)
				if fArr(i) <> "" then
					if lcase(mid(fStrMessage, iPos, len(fArr(i)))) = lcase(fArr(i)) then
						bChange = True
						strBuffer = strBuffer & "<span class=""spnSearchHighlight"" id=""hilite"">" & _ 
						mid(fStrMessage, iPos, len(fArr(i))) & "</span id=""hilite"">"
						iPos = iPos + len(fArr(i)) - 1
					end if
				end if
			next
		end if
		if Not bChange then
			strBuffer = strBuffer & mid(fStrMessage, iPos, 1)
		end if
	next
	SearchHiLite = strBuffer
end function

Sub QuickReply()
	intSigDefault = getSigDefault(MemberID)
	Response.Write	"    <script language=""JavaScript"" type=""text/javascript"" src=""inc_code.js""></script>" & vbNewLine & _
			"      <table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
			"        <tr>" & vbNewLine & _
			"          <td class=""popuptableborder"">" & vbNewLine & _
			"            <table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""1"">" & vbNewLine & _
			"              <form name=""PostTopic"" method=""post"" action=""post_info.asp"" onSubmit=""return validate();"">" & vbNewLine & _
			"              <input name=""ARCHIVE"" type=""hidden"" value=""" & ArchiveView & """>" & vbNewLine & _
			"              <input name=""Method_Type"" type=""hidden"" value=""Reply"">" & vbNewLine & _
			"              <input name=""TOPIC_ID"" type=""hidden"" value=""" & Topic_ID & """>" & vbNewLine & _
			"              <input name=""FORUM_ID"" type=""hidden"" value=""" & Forum_ID & """> " & vbNewLine & _
			"              <input name=""CAT_ID"" type=""hidden"" value=""" & Cat_ID & """>" & vbNewLine & _
			"              <input name=""Refer"" type=""hidden"" value=""" & request.servervariables("SCRIPT_NAME") & "?" & replace(Request.QueryString,"#","#") & """>" & vbNewLine & _
			"              <input name=""UserName"" type=""hidden"" value=""" & strDBNTUserName & """>" & vbNewLine & _
			"              <input name=""Password"" type=""hidden"" value=""" & Request.Cookies(strUniqueID & "User")("Pword") & """>" & vbNewLine & _
			"              <tr>" & vbNewLine & _
			"                <td class=""headcell"" noWrap vAlign=""top"" colspan=""2""><b>Quick Reply</b></td>" & vbNewLine & _
			"              </tr>" & vbNewLine & _
			"              <tr>" & vbNewLine & _
			"                <td class=""forumcell"" noWrap vAlign=""top"" align=""right""><b>Message: </b><br />" & vbNewLine & _
			"                <br />" & vbNewLine & _
			"                  <table border=""0"">" & vbNewLine & _
			"                    <tr>" & vbNewLine & _
			"                      <td align=""left"" nowrap><span class=""smalltext"">" & vbNewLine
	if strAllowHTML = "1" then
		Response.Write	"                      * HTML is ON<br />" & vbNewLine
	else
		Response.Write	"                      * HTML is OFF<br />" & vbNewLine
	end if
	if strAllowForumCode = "1" then
		Response.Write	"                      * <a href=""JavaScript:openWindow6('pop_forum_code.asp')"">Forum Code</a> is ON<br />" & vbNewLine
	else
		Response.Write	"                      * Forum Code is OFF<br />" & vbNewLine
	end if
	if strSignatures = "1" then
		Response.Write	"                      <br /><input name=""Sig"" type=""checkbox"" value=""yes""" & chkCheckbox(intSigDefault,1,true) & ">Include Signature<br />" & vbNewLine
	end if
	Response.Write	"                      </span></td>" & vbNewLine & _
			"                    </tr>" & vbNewLine & _
			"                  </table>" & vbNewLine & _
			"                </span></td>" & vbNewLine & _
			"                <td width=""" & strTopicWidthRight & """ class=""forumcell""><textarea name=""Message"" cols=""50"" rows=""6"" wrap=""VIRTUAL"" style=""width:100%""></textarea><br /></td>" & vbNewLine & _
			"              </tr>" & vbNewLine & _
			"              <tr>" & vbNewLine & _
			"                <td class=""forumcell"" noWrap align=""center"" colspan=""2""><input name=""Submit"" type=""submit"" value=""Submit Reply""> <input name=""Preview"" type=""button"" value=""Preview Reply"" onclick=""OpenPreview()""> <input name=""Reset"" type=""reset"" value=""Reset Form""></td>" & vbNewLine & _
			"              </tr>" & vbNewLine & _
			"              </form>" & vbNewLine & _
			"            </table>" & vbNewLine & _
			"          </td>" & vbNewLine & _
			"        </tr>" & vbNewLine & _
			"      </table>" & vbNewLine & _
			"      <br />" & vbNewLine
end sub
%>
Go to Top of Page

Soar
Junior Member

USA
197 Posts

Posted - 21 October 2005 :  22:31:33  Show Profile  Visit Soar's Homepage
I'm not familiar with the Poll Mod, but in comparing the modded version of post.asp provided in that mod with your version, I noticed that the mod version contains the following instruction:

'####################################### Poll Mod ##################################
'# Remember to remove the &_ from the end of the line above. #
'# Find the following code in your file and comment out or remove it: #
'###################################################################################
' " <td valign=""top"" height=""100%""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><span class=""spnMessageText"" id=""msg"">"
'if Request.QueryString("SearchTerms") <> "" then
' Response.Write SearchHiLite(formatStr(Topic_Message))
'else
' Response.Write formatStr(Topic_Message)
'end if
'Response.Write "</span id=""msg""></font></td>" & vbNewLine & _


In examining your version of post.asp, you have not commented out those lines (line 999 and lines 1003 - 1008 in your topic.asp file). These lines are added back later in the Poll Mod (which you have done in your version), so I think that may be where your "repeat" comes from.

Having said that, I'm hardly an expert with ASP, so perhaps someone better than I can also take a look.
Go to Top of Page

mtercek
New Member

56 Posts

Posted - 24 October 2005 :  11:48:12  Show Profile
The code I have posted is from topic.asp. Someone suggested that is where I problem is. Do you see anything else that's odd? I am not an asp expert either. I think I need to get some training though. :)

Edited by - mtercek on 24 October 2005 11:50:04
Go to Top of Page

Soar
Junior Member

USA
197 Posts

Posted - 24 October 2005 :  19:31:32  Show Profile  Visit Soar's Homepage
quote:
Originally posted by mtercek

The code I have posted is from topic.asp. Someone suggested that is where I problem is. Do you see anything else that's odd? I am not an asp expert either. I think I need to get some training though. :)



Sorry, finger-fudge on my part - for some reason I typed post.asp instead of topic.asp. The section I quoted was actually from the topic.asp file in the mod. Again, I'd edit your topic.asp and comment out the lines indicated in the mod file instructions.

Edited by - Soar on 24 October 2005 21:56:16
Go to Top of Page

mtercek
New Member

56 Posts

Posted - 25 October 2005 :  10:01:46  Show Profile
Soar, You are a genius!! That was it exactly!!

Thank you so much

Marilyn
Go to Top of Page

Soar
Junior Member

USA
197 Posts

Posted - 25 October 2005 :  21:49:51  Show Profile  Visit Soar's Homepage
You're welcome. Glad you got it fixed.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.73 seconds. Powered By: Snitz Forums 2000 Version 3.4.07