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
 Ignore Post Mod Question
 New Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MaGraham
Senior Member

USA
1297 Posts

Posted - 12 December 2013 :  00:22:42  Show Profile  Reply with Quote


In the "Ignore Post Mod" did anyone ever use Carefree's suggestion here to iclude a link for adding users to the ignore list next to the PM and email icon?

I thought that sounded like an excellent idea so I searched for more info on it but couldn't find any so I thought I'd ask.

Also, does anyone know of any mods that are simply not compatible with this one or that might cause a number of problems?

For those using this mod, do you and your members like the way it works?



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 13 December 2013 :  06:59:21  Show Profile
Here you go:

"pop_ignorelist.asp" (modified, replace the original)

<%
'###############################################################################
'##
'##	              Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-14 Michael Anderson, Pierre Gorissen,
'##	          Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output.  The "powered by" text/logo with a
'## link back to http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful but
'## WITHOUT ANY WARRANTY; without even an implied warranty of MERCHANTABILITY
'## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
'## for more details.
'##
'## You should have received a copy of the GNU General Public License along
'## with this program; if not, write to:
'##
'##	          Free Software Foundation, Inc.
'##	          59 Temple Place, Suite 330
'##	          Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'##	            http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'##	             manderson@snitz.com
'##
'###############################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_header_short.asp" -->
<%
If MemberID<1 Then
	response.write "<br /><br /><p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><center><b>You need to login to add members to your ignorelist.</b><br><br>If you have not registered then you can <a target=""_blank"" href=""policy.asp"">do so</a> for free.</p>"
Else
	intIgnoreID = Request.QueryString("id")
	MethodType = trim(lCase(Request("mode")))
	if (IsNull(intIgnoreID) or IsNumeric(intIgnoreID) = False or MethodType = "") then
  	strError = "Faulty paramaters"
	else
	  intIgnoreID = cLng(intIgnoreID)
	  Select Case MethodType
  		Case "i"
   			strSql="SELECT MEMBER_ID, M_LEVEL FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID=" & intIgnoreID
  			Set rs=my_Conn.Execute(strSql)
	  		If not rs.EOF then
  				If rs("M_LEVEL")<2 Then
	  				rs.Close
		  			strSql="SELECT I_IGNOREID FROM " & strTablePrefix & "IGNORE_POSTS WHERE I_MEMBERID = " & memberID & " AND I_IGNOREID = " & intIgnoreID
  					Set rsI=my_Conn.Execute(strSql)
  					If not rsI.EOF then
  						rsI.Close
  						strSql="DELETE FROM " & strTablePrefix & "IGNORE_POSTS WHERE I_MEMBERID=" & MemberID & " AND I_IGNOREID=" & intIgnoreID
  						my_Conn.Execute(strSql)
  						If Err.Number=0 Then
								Response.Write "The member has been removed from your ignore list." & vbNewLine
							End If
 							If Err.Number <> 0 Then
 								strError=Err.Number & ": " & Err.Description & vbCrLf & " on line " & Err.Line & " of " & Err.Source
							End If
		  			Else
  						rsI.Close
	  					strSql="INSERT INTO " & strTablePrefix & "IGNORE_POSTS (I_MEMBERID,I_IGNOREID) VALUES (" & MemberID & ", " & intIgnoreID & ")"
  						my_Conn.Execute(strSql)
  						If Err.Number=0 Then
								Response.Write "The member has been added to your ignore list." & vbNewLine
							End If
							If Err.Number <> 0 Then
 								strError= Err.Number & ": " & Err.Description & vbCrLf & " on line " & Err.Line & " of " & Err.Source
							End If
							On Error GoTo 0
  					End If
  					Set rsI=Nothing
		  		Else
		  			If rs("M_LEVEL") = 2 Then strLvl="moderator" Else strLvl="administrator"
		  			rs.Close
						Response.Write "The member's level is " & strLvl & " and cannot be ignored.  Please don't try editing the URL." & vbNewLine
					End If
				Else
					Response.Write "The member does not exist.  Please don't try editing the URL." & vbNewLine
		  	End If
  			Set rs=Nothing
  		Case "a"
  			set rs = server.CreateObject("ADODB.RecordSet")
			  strSql ="SELECT M.MEMBER_ID, M.M_NAME, M.M_LEVEL " & _
  			"FROM " & strMemberTablePrefix & "MEMBERS M WHERE M.MEMBER_ID = " & intIgnoreID
			  rs.Open strSql, my_Conn
		  	If rs.BOF or rs.EOF Then
			  	set rs = nothing
		  		strError = "Member doesn't exist. Please don't tamper with the url."
			  else
		 			intIgnoreID = rs("MEMBER_ID")
	 				strIgnoreName = rs("M_NAME")
	 				strIgnoreLevel = rs("M_LEVEL")
	 				rs.close
	  			strSql ="SELECT I.I_IGNOREID " & _
					"FROM " & strTablePrefix & "IGNORE_POSTS I " & _
					"WHERE I.I_MEMBERID = " & memberID & " AND I.I_IGNOREID = " & intIgnoreID
					set rsIgnCheck = my_Conn.Execute(strSql)
					if rsIgnCheck.BOF or rsIgnCheck.EOF then
						boolIgnore = False
						set rsIgnCheck = nothing
					else
						boolIgnore = True
						set rsIgnCheck = nothing
					end if
					if strIgnoreLevel = 2 or strIgnoreLevel = 3 or boolIgnore = True or intIgnoreID = memberID then
						if strIgnoreLevel = 2 then
		  				strMemTitle = "moderator"
						elseif strIgnoreLevel = 3 then
		  				strMemTitle = "administrator"
						end if
						if boolIgnore = True then
							strError = strIgnoreName & " is already on your ignore list."
						else
							if intIgnoreID = memberID then
			  				strError = "You cannot ignore your own posts."
							else
				  			strError = strIgnoreName & " is a " & strMemTitle & " and cannot be added to your ignore list."
							end if
						end if
					else
						strSql = "INSERT INTO " & strTablePrefix & "IGNORE_POSTS (I_MEMBERID, I_IGNOREID) VALUES ("
						strSql = strSql & memberID & ", "
						strSql = strSql & intIgnoreID & ")"
			  		my_conn.Execute (strSql)
						Response.Write strIgnoreName & " has been added to your ignorelist."
					end if
				End If
	 			set rs = nothing
  		Case "r"
		  	strSql ="SELECT I.I_IGNOREID " & _
				"FROM " & strTablePrefix & "IGNORE_POSTS I " & _
				"WHERE I.I_MEMBERID = " & memberID & " AND I.I_IGNOREID = " & intIgnoreID
				set rsIgnCheck = my_Conn.Execute(strSql)
	  		if rsIgnCheck.BOF or rsIgnCheck.EOF then
					boolIgnore = False
					set rsIgnCheck = nothing
				else
					boolIgnore = True
					set rsIgnCheck = nothing
				end if
			  if boolIgnore = True then
					strSql = "DELETE FROM " & strTablePrefix & "IGNORE_POSTS where I_MEMBERID = " & memberID & _
					" AND I_IGNOREID = " & intIgnoreID
					my_conn.Execute strSql
					Response.Write "The Member has been removed from your ignorelist." & vbNewLine & _
					"		<script language=""javascript1.2"">self.opener.location.reload();</script>" & vbNewLine
  			end if
  	End Select
		Response.Write strError
	end if
End If
WriteFooterShort
%>


"members.asp" (make change)

Look for these lines (appx 431-435):

		if strUseExtendedProfile then
			Response.Write	"                <a href=""pop_profile.asp?mode=display&id=" & Members_MemberID & """" & dWStatus("View " & ChkString(Members_MemberName,"display") & "'s Profile") & ">"
		else
			Response.Write	"                <a href=""JavaScript:openWindow3('pop_profile.asp?mode=display&id=" & Members_MemberID & "')""" & dWStatus("View " & ChkString(Members_MemberName,"display") & "'s Profile") & ">"
		end if

After those, insert these:


		If Members_MemberID<>MemberID Then
			If cLng(strIgnorePost)=1 then
				If Members_MemberLevel < 2 Then
					strSql="SELECT I_IGNOREID FROM " & strTablePrefix & "IGNORE_POSTS WHERE I_MEMBERID = " & memberID & " AND I_IGNOREID = " & Members_MemberID
  				Set rsI=my_Conn.Execute(strSql)
  				If not rsI.EOF then
						Response.Write	"								 <a href=""javascript:openWindow('pop_ignorelist.asp?id=" & Members_MemberID & "&mode=i')""><acronym style=""border:none; text-decoration:none"" title=""Unignore""><image src=""" & strImageURL & "Unignore.png"" height=""17"" alt=""Un-Ignore User"" align=""absmiddle"" hspace=""0"" /></acronym></a>"
					else
						Response.Write	"								 <a href=""javascript:openWindow('pop_ignorelist.asp?id=" & Members_MemberID & "&mode=i')""><acronym style=""border:none; text-decoration:none"" title=""Ignore""><image src=""" & strImageURL & "Ignore.png"" height=""17"" alt=""Un-Ignore User"" align=""absmiddle"" hspace=""0"" /></acronym></a>"
					end if
				End If
			End If
		End If



Images:

Save this as unignore.png:

Save this as ignore.png:

Edited by - Carefree on 15 December 2013 00:00:22
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 13 December 2013 :  08:59:40  Show Profile

Thank you so much, Carefree!

I haven't even done the "Ignore Post Mod" yet though.

I'll have to look at that one again.


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 14 December 2013 :  05:43:52  Show Profile

I'm working on the "Ignore Post" mod and I can't seem to match up the following.

I was suppose to find this lines in topic.asp.



 if Request.QueryString("SearchTerms") <> "" then
        Response.Write  SearchHiLite(formatStr(Topic_Message))
    else
        Response.Write  formatStr(Topic_Message)
    end if



Then I was suppose to replace those lines with this below but I am not finding those above.


'## Ignore Post Mod Below
    if strIgnorePost = "1" then
      boolIgnorePost = ChkIgnoreList(arrIgnoreMemberList, TMember_ID)
    end if

    if Request.QueryString("SearchTerms") <> "" then
     if strIgnorePost = "1" then
        if boolIgnorePost then
          WriteIgnPostLinks TopicID, 0, TMember_ID
        else
          Response.Write SearchHiLite(formatStr(Topic_Message))
        end if
     else
        Response.Write SearchHiLite(formatStr(Topic_Message))
     end if
    else
     if strIgnorePost = "1" then
         if boolIgnorePost then
           WriteIgnPostLinks TopicID, 0, TMember_ID
         else
           Response.Write formatStr(Topic_Message)
         end if
     else
        Response.Write SearchHiLite(formatStr(Topic_Message))
     end if         
    end if
'## Ignore Post Mod Above




Here is my topic.asp if someone can help me, please. I've completed all of the mod except for the above.


<%
'#################################################################################
'## Snitz Forums 2000 v3.4.07
'#################################################################################
'## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen,
'##                       Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
%>
<!--#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, CColor

if request("ARCHIVE") = "true" then
   strActivePrefix = strTablePrefix & "A_"
   ArchiveView = "true"
   ArchiveLink = "ARCHIVE=true&"
elseif request("ARCHIVE") <> "" then
   Response.Redirect "default.asp"
   Response.End
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" -->

<%
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
'  ## Poll Below
strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_PMRECEIVE, M.M_MSN, M.M_YAHOO" & _
   ", M.M_TITLE, M.M_HOMEPAGE, M.MEMBER_ID, M.M_LEVEL, M.M_POSTS, M.M_GLOW_TEXT, M.M_COUNTRY, M.M_SKYPE, M.M_GOOGLETALK" & _
   ", 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" & _
   ", 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, F.F_RATING_AUTH, T.ALLOW_RATING, T.T_MSGICON, T.T_MESSAGE"
'  ## Poll Above
if CanShowSignature = 1 then
   strSql = strSql & ", M.M_SIG"
end if
 if CanShowAvatar = 1 then
   strSql = strSql & ", M.M_AVATAR_URL"
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_GOOGLETALK = rsTopic("M_GOOGLETALK")
   Member_SKYPE = rsTopic("M_SKYPE")
   Member_YAHOO = rsTopic("M_YAHOO")
   Member_PM = rsTopic("M_PMRECEIVE")
   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")
   Member_GlowText = rsTopic("M_GLOW_TEXT")
   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")
   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_MsgIcon = rsTopic("T_MSGICON")
   Topic_Message = rsTopic("T_MESSAGE")
   intRatingAuth = rsTopic("F_RATING_AUTH")
   Allow_Rating = rsTopic("ALLOW_RATING")
   if CanShowSignature = 1 then
      Topic_MemberSig = trim(rsTopic("M_SIG"))
   end if
           if CanShowAvatar = 1 then
      Member_Avatar = rsTopic("M_AVATAR_URL")
   end if
 '  ## Poll Below
   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, P.P_ENDDATE"
      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")
         strPEndDate = rsPoll("P_ENDDATE")
         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
      If strPEndDate<=datetostr(strForumTimeAdjust) then
         Poll_Status=0
      End If
   end if
   if IsPoll = 1 then
      pollLink = "poll=1&"
   else
      pollLink = ""
   end if
 '  ## Poll Above
end if

rsTopic.close
set rsTopic = nothing

'## Events Calendar - Check if this topic is an event
blnEvent = TRUE
strSQL = "SELECT EVENT_DATE FROM " & strTablePrefix & "CAL_EVENTS WHERE TOPIC_ID = " & Topic_ID & " ORDER BY EVENT_DATE"
set rsCal = Server.CreateObject("ADODB.Recordset")
rsCal.open StrSql, My_conn
If rsCal.EOF then blnEvent = FALSE else arrDates = rsCal.GetRows
rsCal.close
set rsCal = nothing

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

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 then
   strSql = "SELECT REPLY_ID FROM " & strActivePrefix & "REPLY WHERE TOPIC_ID = " & Topic_ID & " "
   if AdminAllowed = 0 then
      strSql = strSql & " AND (R_STATUS < "
      if Moderation = "Y" then
         strSql = strSql & "2 "
      else
         strSql = strSql & "3 "
      end if
      strSql = strSql & "OR R_AUTHOR = " & MemberID & ") "
   end if
   strSql = strSql & "ORDER BY R_DATE ASC "

   set rsReplies = Server.CreateObject("ADODB.Recordset")
   if strDBType = "mysql" then
      rsReplies.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
   else
      rsReplies.open strSql, my_Conn, adOpenStatic, adLockReadOnly, adCmdText
   end if

   if not rsReplies.EOF then
      arrReplyData = rsReplies.GetRows(adGetRowsRest)
      iReplyCount = UBound(arrReplyData, 2)

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

   rsReplies.close
   set rsReplies = nothing
   my_Conn.close
   set my_Conn = nothing

   Response.Redirect "topic.asp?" & ArchiveLink & strwhichpage & "TOPIC_ID=" & Topic_ID & SearchLink & "#" & 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""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """><br />Viewing of this Topic is not permitted until it has been moderated.<br />Please try again later</font></p>" & vbNewLine & _
         "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """><a href=""JavaScript:history.go(-1)"">Go Back</a></font></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_GOOGLETALK, M.M_SKYPE, M.M_YAHOO, M.M_PMRECEIVE"
   strSql = strSql & ", M.M_TITLE, M.MEMBER_ID, M.M_HOMEPAGE, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY, M.M_GLOW_TEXT"
   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, R.R_MSGICON"
   if CanShowSignature = 1 then
      strSql = strSql & ", M.M_SIG"
   end if
          if CanShowAvatar = 1 then
      strSql = strSql & ", M.M_AVATAR_URL"
   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 Below
   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
               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
               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
   '  ## Poll Above

   Response.Write "     <table border=""0"" width=""100%"">" & vbNewLine & _
         "       <tr>" & vbNewLine & _
         "         <td width=""50%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
         "         " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">COMMUNITY HOME</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 blnEvent 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 "</font></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""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>"
      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 bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
         "           <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
         "             <tr>" & vbNewLine & _
         "               <td align=""center"" bgcolor=""" & strHeadCellColor & """ width=""" & strTopicWidthLeft & """"
   if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap")
   Response.Write "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Author</font></b></td>" & vbNewLine & _
         "               <td align=""center"" bgcolor=""" & strHeadCellColor & """ width=""" & strTopicWidthRight & """"
   if lcase(strTopicNoWrapRight) = "1" then Response.Write(" nowrap")
   Response.Write "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>" & vbNewLine
   if strShowTopicNav = "1" then
      Call Topic_nav()
   else
      Response.Write("Topic")
   end if
   Response.Write "</font></b></td>" & vbNewLine
   if (AdminAllowed = 1) then
      if maxpages > 1 then
         Call DropDownPaging(1)
         Response.Write "               <td align=""right"" bgcolor=""" & strHeadCellColor & """ nowrap>" & vbNewLine
         call AdminOptions()
         Response.Write "               </td>" & vbNewLine
      else
         Response.Write "               <td align=""right"" bgcolor=""" & strHeadCellColor & """ nowrap>" & vbNewLine
         call AdminOptions()
         Response.Write "               </td>" & vbNewLine
      end if
   else
      if maxpages > 1 then
         Call DropDownPaging(1)
      else
            Response.Write "               <td align=""right"" bgcolor=""" & strHeadCellColor & """ nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> </font></td>" & vbNewLine
      end if
   end if
   Response.Write "             </tr>" & vbNewLine

'## Ignore post mod. Lets poulate the array with the ignored members ID
        if strIgnorePost = "1" then
          arrIgnoreMemberList = IgnoreMemberList()
        end if
'## Ignore post mod above
   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_GOOGLETALK = 5
      rM_SKYPE = 6
      rM_YAHOO = 7
      rM_PM = 8
      rM_TITLE = 9
      rMEMBER_ID = 10
      rM_HOMEPAGE = 11
      rM_LEVEL = 12
      rM_POSTS = 13
      rM_COUNTRY = 14
      rM_GLOW_TEXT = 15
      rREPLY_ID = 16
      rFORUM_ID = 17
      rR_AUTHOR = 18
      rTOPIC_ID = 19
      rR_MESSAGE = 20
      rR_LAST_EDIT = 21
      rR_LAST_EDITBY = 22
      rR_SIG = 23
      rR_STATUS = 24
      rR_DATE = 25
      rR_MSGICON = 26
      if CanShowSignature = 1 then
         rM_SIG = 27
      end if
                     if CanShowAvatar = 1 then
                      if CanShowSignature = 1 then
                  rM_AVATAR = 28
                      else
                            rM_AVATAR = 27
                      end if
                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_MemberGOOGLETALK = arrReplyData(rM_GOOGLETALK, iForum)
         Reply_MemberSKYPE = arrReplyData(rM_SKYPE, iForum)
         Reply_MemberYAHOO = arrReplyData(rM_YAHOO, iForum)
         Reply_MemberPM = arrReplyData(rM_PM, 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_MemberGlowText = arrReplyData(rM_GLOW_TEXT, 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)
         Reply_MsgIcon = arrReplyData(rR_MSGICON, iForum)
         if CanShowSignature = 1 then
            Reply_MemberSig = trim(arrReplyData(rM_SIG, iForum))
         end if
                               if CanShowAvatar = 1 then
            Reply_MemberAvatar = trim(arrReplyData(rM_AVATAR, iForum))
         end if

         if intI = 0 then
            CColor = strAltForumCellColor
         else
            CColor = strForumCellColor
         end if

         Response.Write "             <tr>" & vbNewLine & _
               "               <td bgcolor=""" & CColor & """ valign=""top"" width=""" & strTopicWidthLeft & """"
         if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap")
         Response.Write ">" & vbNewLine & _
               "              <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"" style=""width:0; height:0; " & Reply_MemberGlowText & """>" & profileLink(ChkString(Reply_MemberName,"display"),Reply_Author) & "</span></b></font><br />" & VbNewLine
         if strShowRank = 1 or strShowRank = 3 then
            Response.Write "               <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & ChkString(getMember_Level(Reply_MemberTitle, Reply_MemberLevel, Reply_MemberPosts),"display") & "</small></font><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>" & vbNewLine
                                  if CanShowAvatar = 1 and Reply_MemberAvatar <> "noavatar.gif" then
            Response.Write "  <table width=""" & intAvatarWidth & """ height= """ & intAvatarHeight & """ cellspacing=""0"" cellpadding=""0"" border=""0"" style="" background-image: url('" & Reply_MemberAvatar & "');background-repeat: no-repeat; background-position: center;"">" & vbNewLine & _
                        "    <tr>" & vbNewLine & _
                        "       <td align=""center""><img src=""" & strImageURL & "noavatar.gif"" width=""96"" height=""96"" border=""0""></td>" & vbNewLine & _
                        "    </tr>" & vbNewLine & _
                         " </table>" & vbNewLine
         end if
         if strCountry = "1" and trim(Reply_MemberCountry) <> "" then
            Response.Write "               <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberCountry & "</small></font><br /><img src=""" & strImageURL & Reply_MemberCountry & ".gif""><br />" & vbNewLine
         end if
         Response.Write "               <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberPosts & " Posts</small></font></p></td>" & vbNewLine & _
               "               <td bgcolor=""" & 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(getCurrentMsgIcon(Reply_MsgIcon),"","hspace=""3""") & "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize  & """>Posted - " & ChkDate(Reply_Date, " : " ,true) & "</font>" & vbNewline
         elseif Reply_Status = 2 then
            Response.Write  "                    <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize  & """>NOT MODERATED!!!</font>" & vbNewline
         elseif Reply_Status = 3 then
            Response.Write  "                    " & getCurrentIcon(strIconPosticonHold,"","hspace=""3""") & "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize  & """>ON HOLD</font>" & vbNewline
         end if
         ' DEM --> End of Code added for moderation.
         Response.Write "           <a href=""JavaScript:openWindowLink('pop_link_reply.asp?TOPIC_ID=" & Topic_ID & "&REPLY_ID=" & Reply_ReplyID & "')"">" & getCurrentIcon(strIconLinkTo,"Share a link to this reply","align=""absmiddle"" hspace=""3""") & "</a>" & vbNewLine
         Response.Write "                      " & profileLink(getCurrentIcon(strIconProfile,"View This Member's 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:openWindow5('pop_mail.asp?id=" & Reply_MemberID & "')"">" & getCurrentIcon(strIconEmail,"Send An Email To This Member","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 strGOOGLETALK = "1" then
            if Trim(Reply_MemberGOOGLETALK) <> "" then
               Response.Write "                      <a href=""JavaScript:openWindow('pop_messengers.asp?mode=GOOGLETALK&ID=" & Reply_MemberID & "')"">" & getCurrentIcon(strIconGOOGLETALK,"Click to see " & ChkString(Reply_MemberName,"display") & "","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
            end if
         end if
         if strSKYPE = "1" then
            if Trim(Reply_MemberSKYPE) <> "" then
               Response.Write "                      <a href=""JavaScript:openWindow('pop_messengers.asp?mode=SKYPE&ID=" & Reply_MemberID & "')"">" & getCurrentIcon(strIconSKYPE,"Bekijk het Skype telefoon adres van " & ChkString(Reply_MemberName,"display") & "","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
         '######################## Fame Mod #########################
         if TMember_ID <> MemberID and mLev > 1 then
            Response.Write "<a href=""pop_fame.asp?topic_id="& topic_id & "&reply_id="& reply_id & """ target=""_blank"">" & getCurrentIcon("" & striconFame & "","Hall of Fame", "align=""middle""") & "</a>" & vbNewLine
         end if
         '######################## Fame Mod #########################
'##FRIENDS ## User Space Mod ## Add Code Below ##############
                        if trim(strUSFriendSwitch) <> "" then
                                if cLng(strUSFriendSwitch) = 1 then
                                        if Reply_MemberID <> MemberID then
                                                Response.Write  "<a href=""JavaScript:openWindow5('pop_user_space.asp?mode=friends&id=" & Reply_MemberID & "&action=add&type=0')"">" & getCurrentIcon(strIconFriends,"Add " & ChkString(Reply_MemberName,"display") & " to your friends list","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
                                        end if
                                end if
                        end if
'## END #####################################################
'##BOOKMARKS ## User Space Mod ## Add Code below ###############

                        if trim(strUSBookmarkSwitch) <> "" then
                                if cLng(strUSBookmarkSwitch) = 1 then
                                        Response.Write  "<a href=""JavaScript:openWindow5('pop_user_space.asp?mode=bookmark&action=add&type=post&archive=" & ArchiveView & "&topic_id=" & TopicID & "&reply_id=" & Reply_ReplyID & "')"">" & getCurrentIcon(strIconFavorites,"Bookmark this reply","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
                                end if
                        end if

'## End #####################################################
         If (Reply_MemberPM = "1" and strPMStatus = "1") Then
            if Trim(Reply_MemberPM) <> "" then
               Response.Write "               <a href=""privatesend.asp?method=Topic&mname=" & ChkString(Reply_MemberName,"display") & """>" & getCurrentIcon(strIconPmprivatemessage,"Send " & ChkString(Reply_MemberName,"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "</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(strIconReplyQuote,"Reply with Quote","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
         end if
         if (strIPLogging = "1") then
            if (AdminAllowed = 1) then
' ########################### Ban IP Mod ###############################
               Response.Write "                      <a href=""JavaScript:openWindow('pop_ban_ip.asp?TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "')"">" & getCurrentIcon(strIconIP,"View/Ban 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 noshade size=""" & strFooterFontSize & """></td>" & vbNewLine & _
               "                   </tr>" & vbNewLine & _
               "                   <tr>" & vbNewLine & _
               "                     <td valign=""top"" height=""100%""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><span class=""spnMessageText"" id=""msg"">"
               If blnEvent Then
      %> <!-- #include file="cal_topic.asp" --> <%
   End If
 '## Ignore Post mod Below
    if strIgnorePost = "1" then
      boolIgnoreReply = ChkIgnoreList(arrIgnoreMemberList, Reply_MemberID)
    end if

    if Request.QueryString("SearchTerms") <> "" then
     if strIgnorePost = "1" then
      if boolIgnoreReply then
        WriteIgnPostLinks TopicID, Reply_ReplyID, Reply_MemberID
      else
        Response.Write SearchHiLite(formatStr(Reply_Content))
      end if
     else
      Response.Write SearchHiLite(formatStr(Reply_Content))
     end if
    else
     if strIgnorePost = "1" then
      if boolIgnoreReply then
        WriteIgnPostLinks TopicID, Reply_ReplyID, Reply_MemberID
      else
        Response.Write formatStr(Reply_Content)
      end if
     else
      Response.Write formatStr(Reply_Content)
     end if
    end if
 '## Ignore Post mod Above
         Response.Write "</span id=""msg""></font></td>" & vbNewLine & _
               "                   </tr>" & vbNewLine
         if CanShowSignature = 1 and Reply_Sig = 1 and Reply_MemberSig <> "" then
            Response.Write "                   <tr>" & vbNewLine & _
                  "                     <td valign=""bottom""><hr noshade size=""" & strFooterFontSize & """><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><span class=""spnMessageText"">" & formatStr(Reply_MemberSig) & "</span></font></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 noshade size=""1"" color=""" & strForumFontColor & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & _
               "Edited by - " & Reply_LastEditByName & " on " & chkDate(Reply_LastEdit, " " ,true) & "</font></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"" bgcolor=""" & strHeadCellColor & """ width=""" & strTopicWidthLeft & """"
      if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap")
      Response.Write "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """> </font></b></td>" & vbNewLine
   end if
   Response.Write "               <td align=""center"" bgcolor=""" & strHeadCellColor & """ width=""" & strTopicWidthRight & """"
   if lcase(strTopicNoWrapRight) = "1" then Response.Write(" nowrap")
   'if maxpages > 1 and (AdminAllowed = 1) then Response.Write(" colspan=""2""")
   Response.Write "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>" & vbNewLine
   if strShowTopicNav = "1" then
      Call Topic_nav()
   else
      Response.Write("Topic")
   end if
   Response.Write "</font></b></td>" & vbNewLine
   if (AdminAllowed = 1) then
      if maxpages > 1 then
            Response.Write "               <td align=""right"" bgcolor=""" & strHeadCellColor & """ nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> </font></td>" & vbNewLine
      end if
      Response.Write "               <td align=""right"" bgcolor=""" & strHeadCellColor & """ nowrap>" & vbNewLine
      call AdminOptions()
      Response.Write "</td>" & vbNewLine
   else
         Response.Write "               <td align=""right"" bgcolor=""" & strHeadCellColor & """ nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> </font></td>" & vbNewLine
   end if
   '## Beginning of modification for Tree Modification Mod
      Response.Write "     <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine & _
         "       <tr>" & vbNewLine & _
         "         <td width=""50%"" align=""left"" bgcolor=""" & strForumCellColor & """ nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
         "         " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">COMMUNITY HOME</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 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 "</font></td>" & vbNewLine & _
         "         <td align=""right"" width=""50%""bgcolor=""" & strForumCellColor & """ nowrap>" & vbNewLine
   call PostingOptions()
'## End of modification for Tree Navigation Mod
   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""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>"
      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
'## Beginning of second modification for Tree Navigation Mod
      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
'## End of second modification for Tree Navigation Mod
%>
   <!--#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()
   CColor = strForumFirstCellColor
' ################# TOPIC RATING MOD ######################
response.Write "<tr>" & vbNewLine & _
"<td></td>" & vbNewLine & _
"<td>" & vbNewLine

 if request("ARCHIVE")<> "true" then
 TopicRatingAvg = GetTopicRatingAvg( TopicID )
    if intRatingAuth = 1 and Allow_Rating = 1 then
          if strDBNTUserName <> "" Then
             if ( getMemberID(strDBNTUserName) = Topic_Author ) then
               Response.Write  " <table border=""0"" width=""95%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
               "  <tr>" & vbNewLine & _
               "  <td bgColor=""" & strForumFirstCellColor & """ align=left "" & strColspan & "">" & vbNewLine & _
               "  <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>You Cannot Rate your own Topic:  | Total Rating: " & getCurrentIcon(GetTopicRatingPicture(TopicRatingAvg),"","") & "</small></font>" & vbNewLine & _
               "  </td>" & vbNewLine & _
               "  </tr>" & vbNewLine & _
               "  </table>" & vbNewLine
             Else
                iTopicRating = GetTopicRating( getMemberID(strDBNTUserName), TopicID )
                   if iTopicRating <> -1 Then
                     Response.Write  "     <table border=""0"" width=""95%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
                     "       <tr>" & vbNewLine & _
                     "       <td bgColor=""" & strForumFirstCellColor & """ align=left " & strColspan & ">" & vbNewLine & _
                     "       <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>You Rated this Topic: " & getCurrentIcon(GetTopicRatingPicture(iTopicRating),"","") & " | Total Rating: " & getCurrentIcon(GetTopicRatingPicture(TopicRatingAvg),"","") & "</small></font>" & vbNewLine & _
                     "       </td>" & vbNewLine & _
                     "       </tr>" & vbNewLine & _
                     "       </table>" & vbNewLine
                   else
                     Response.Write  "     <table border=""0"" width=""95%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
                     "       <tr>" & vbNewLine & _
                     "       <td valign=""top"" height=""100%"">" & vbNewLine & _
                     "       <form align=""left"" action=""pop_topic_rating.asp?mode=goRate&id=" & TopicID & """ method=""Post"" id=Form1 name=Form1>" & vbNewLine & _
                     "       <SELECT NAME=""rating"">" & vbNewLine & _
                     "       <OPTION value=''>Rate Topic" & vbNewLine & _
                     "       <OPTION value='5'>5: Highest Rating" & vbNewLine & _
                     "       <OPTION value='4'>4" & vbNewLine & _
                     "       <OPTION value='3'>3" & vbNewLine & _
                     "       <OPTION value='2'>2" & vbNewLine & _
                     "       <OPTION value='1'>1: Lowest Rating" & vbNewLine & _
                     "       </SELECT> <INPUT TYPE=""SUBMIT"" NAME=""Submit"" VALUE=""Rate"">" & vbNewLine & _
                     "       </form>" & vbNewLine & _
                     "       </td>" & vbNewLine & _
                     "       <td bgColor=""" & strForumFirstCellColor & """ align=left " & strColspan & " valign=""top"" height=""100%"">" & vbNewLine & _
                     "       <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small> | Total Rating: " & getCurrentIcon(GetTopicRatingPicture(TopicRatingAvg),"","") & "</small></font>" & vbNewLine & _
                     "       </td>" & vbNewLine & _
                     "       </tr>" & vbNewLine & _
                     "       </table>" & vbNewLine

                   end if
             end if
          end if
    else
         Response.Write  " <table border=""0"" width=""95%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
         "<tr>" & vbNewLine & _
         "<td bgColor=""" & strForumFirstCellColor & """ align=left " & strColspan & " valign=""top"" height=""100%"">" & vbNewLine & _
         "<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>Rating is not allowed for this toic.</small></font>" & vbNewLine & _
         "</td>" & vbNewLine & _
         "</tr>" & vbNewLine & _
         "</table>" & vbNewLine
    end if
 else
   TopicRatingAvg = GetTopicRatingAvg( TopicID )
   Response.Write "<table border=""0"" width=""95%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
   "<tr>" & vbNewLine & _
   "<td bgColor=""" & strForumFirstCellColor & """ align=left " & strColspan & " valign=""top"" height=""100%"">" & vbNewLine & _
   "<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>Before Archiving the total rating was: " & getCurrentIcon(GetTopicRatingPicture(TopicRatingAvg),"","") & "</small></font>" & vbNewLine & _
   "</td>" & vbNewLine & _
   "</tr>" & vbNewLine & _
   "</table>" & vbNewLine

 end if
Response.Write "</td></tr>" &vbNewline

' ################# END TOPIC RATING MOD ######################
   Response.Write "             <tr>" & vbNewLine & _
         "               <td bgcolor=""" & strForumFirstCellColor & """ valign=""top"" width=""" & strTopicWidthLeft & """"
   if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap")
   Response.Write ">" & vbNewLine & _
         "               <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"" style=""width:0;height:0; " & Member_GlowText & """>" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b></font><br />" & VbNewLine
   if strShowRank = 1 or strShowRank = 3 then
      Response.Write "               <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & ChkString(getMember_Level(Member_Title, Member_Level, Member_Posts),"display") & "</small></font><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>" & vbNewLine
         if CanShowAvatar = 1 and Member_Avatar <> "noavatar.gif" then
      Response.Write "  <table width=""" & intAvatarWidth  & """ height= """ & intAvatarHeight & """ cellspacing=""0"" cellpadding=""0"" border=""0"" style="" background-image: url('" & Member_Avatar & "');background-repeat: no-repeat; background-position: center;"">" & vbNewLine & _
                  "    <tr>" & vbNewLine & _
                  "       <td align=""center""><img src=""" & strImageURL & "noavatar.gif"" width=""96"" height=""96"" border=""0""></td>" & vbNewLine & _
                  "    </tr>" & vbNewLine & _
                   " </table>" & vbNewLine
   end if
   if strCountry = "1" and trim(Member_Country) <> "" then
      Response.Write "               <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Country & "</small></font><br /><img src=""" & strImageURL & Member_Country & ".gif""><br />" & vbNewLine
   end if
   Response.Write "               <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Posts & " Posts</small></font></p></td>" & vbNewLine & _
         "               <td bgcolor=""" & strForumFirstCellColor & """ 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(getCurrentMsgIcon(Topic_MsgIcon),"","hspace=""3""") & "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>Posted - " & ChkDate(Topic_Date, " : " ,true) & "</font>" & vbNewline
   elseif Topic_Status = 2 then
      Response.Write  "                    <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize  & """>NOT MODERATED!!!</font>" & vbNewline
   elseif Topic_Status = 3 then
      Response.Write  "                    " & getCurrentIcon(strIconPosticonHold,"","hspace=""3""") & "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>ON HOLD</font>" & vbNewline
   end if
   Response.Write "          <a href=""JavaScript:openWindowLink('pop_link_topic.asp?url=" & strForumURL & "topic.asp?TOPIC_ID=" & Topic_ID & "')"">" & getCurrentIcon(strIconLinkTo,"Share a link to this topic","align=""absmiddle"" hspace=""3""") & "</a>" & vbNewLine
   Response.Write "                      " & profileLink(getCurrentIcon(strIconProfile,"View This Member's 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:openWindow5('pop_mail.asp?id=" & TMember_ID & "')"">" & getCurrentIcon(strIconEmail,"Send An Email To This Member","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 Below
   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 Above

   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 (strGOOGLETALK = "1") then
      if Trim(Member_GOOGLETALK) <> "" then
         Response.Write "                      <a href=""JavaScript:openWindow('pop_messengers.asp?mode=GOOGLETALK&ID=" & TMember_ID & "')"">" & getCurrentIcon(strIconGOOGLETALK,"Click to see " & ChkString(Member_Name,"display") & "'s Google Talk address","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
      end if
   end if
   if (strSKYPE = "1") then
      if Trim(Member_SKYPE) <> "" then
         Response.Write "                      <a href=""JavaScript:openWindow('pop_messengers.asp?mode=SKYPE&ID=" & TMember_ID & "')"">" & getCurrentIcon(strIconSKYPE,"Look at the Skype phone address from " & ChkString(Member_Name,"display") & "","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
   '######################## Fame Mod #########################
   if TMember_ID <> MemberID and mLev > 1 then
      Response.Write "<a href=""pop_fame.asp?topic_id="& topic_id & "&reply_id="& reply_id & """ target=""_blank"">" & getCurrentIcon("" & striconFame & "","Hall of Fame", "align=""middle""") & "</a>" & vbNewLine
   end if
   '######################## Fame Mod #########################
'##FRIENDS ## User Space Mod ## Add Code Below ##############
       if trim(strUSFriendSwitch) <> "" then
               if cLng(strUSFriendSwitch) = 1 then
                       if TMember_ID <> MemberID then
                               Response.Write  "<a href=""JavaScript:openWindow5('pop_user_space.asp?mode=friends&id=" & TMember_ID & "&action=add&type=0')"">" & getCurrentIcon(strIconFriends,"Add " & ChkString(Member_Name,"display") & " to your friends list","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
                       end if
               end if
       end if
'## END #####################################################
'##BOOKMARKS ## User Space Mod ## Add Code below ###########################

        if trim(strUSBookmarkSwitch) <> "" then
                if cLng(strUSBookmarkSwitch) = 1 then
                        Response.Write  "<a href=""JavaScript:openWindow5('pop_user_space.asp?mode=bookmark&action=add&type=post&archive=" & ArchiveView & "&topic_id=" & TopicID & "')"">" & getCurrentIcon(strIconFavorites,"Bookmark this topic","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
                end if
        end if

'## End ## Thats all for this file ##########################
   If (Member_PM = "1" and strPMStatus = "1") Then
      if Trim(Member_PM) <> "" then
         Response.Write "               <a href=""privatesend.asp?method=Topic&mname=" & ChkString(Member_Name,"display") & """>" & getCurrentIcon(strIconPmprivatemessage,"Send " & ChkString(Member_Name,"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "</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(strIconReplyQuote,"Reply with Quote","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
   end if
   if (strIPLogging = "1") then
      if (AdminAllowed = 1) then
' ########################### Ban IP Mod ###############################
               Response.Write "                      <a href=""JavaScript:openWindow('pop_ban_ip.asp?TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "')"">" & getCurrentIcon(strIconIP,"View/Ban 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
      '  ## Poll Below
      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
      '  ## Poll Above
   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 noshade size=""" & strFooterFontSize & """></td>" & vbNewLine & _
         "                   </tr>" & vbNewLine & _
         "                   <tr>" & vbNewLine
'####################################### 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 & _
'############## Poll Mod ########################
'# Then add the following code below.          #
'################################################
   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)
               If strPEndDate <= DateToStr(strForumTimeAdjust) Then
                  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
               Else
                  Response.Write "  <tr>" & vbNewLine & _
                     "    <td width=""30%""> </td>" & vbNewLine & _
                     "    <td nowrap><font face="""  & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>Poll not yet closed.  Results not available.</font></td>" & vbNewLine & _
                     "    <td nowrap width=""10%""></td>" & vbNewLine & _
                     "  </tr>" & vbNewLine
                  Exit For
               End If
            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 & _
         "                   </tr>" & vbNewLine
   '  ## Poll Above
   if CanShowSignature = 1 and Topic_Sig = 1 and Topic_MemberSig <> "" then
      Response.Write "                   <tr>" & vbNewLine & _
            "                     <td valign=""bottom""><hr noshade size=""" & strFooterFontSize & """><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><span class=""spnMessageText"">" & formatStr(Topic_MemberSig) & "</span></font></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 noshade size=""" & strFooterFontSize & """ color=""" & strForumFirstCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine & _
         "Edited by - " & Topic_LastEditByName & " on " & chkDate(Topic_LastEdit, " " ,true) & "</font></td>" & vbNewLine & _
         "                                </tr>" & vbNewLine
   end if
   Response.Write "                 </table>" & vbNewLine & _
      "               </td>" & vbNewLine & _
      "             </tr>" & vbNewLine
End Sub


sub PostingOptions()
   Response.Write "         <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
   '## Events Calendar - Adds a "New Event" Link
   strSql = "SELECT F_ALLOWEVENTS FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & Forum_ID & " AND F_ALLOWEVENTS = 1"
   set rsCal = Server.CreateObject("ADODB.Recordset")
   rsCal.Open strSql, My_conn
   if not rsCal.EOF then blnCalAllowed = TRUE else blnCalAllowed = FALSE
   rsCal.Close
   set rsCal = nothing
   if blnCalAllowed and (intCalMLev <= MLev) then Response.Write  "         <a href=""post.asp?method=Topic&event=1&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strCalIconEvent,strIconEvent,"align=""absmiddle""") & "</a> <a href=""post.asp?method=Topic&event=1&FORUM_ID=" & Forum_ID & """>" & strCalNewEvent & "</a>  " & 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 Below
         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
         '  ## Poll Above
      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 Below
            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
            '  ## Poll Above
         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 Below
            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
         '  ## Poll Above
         end if
      end if
      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 "         </font>"
end sub

sub AdminOptions()
   Response.Write "               <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & 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
   '  ## Poll Below
         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
   '  ## Poll Above
      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
     '##################################### Split Topic Mod ###########################################
      if iReplyCount <> "" then
         Response.Write  "<a href=""split.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconSplitTopic,"Split Topic","") & "</a>" & vbNewLine
      end if
   '#################################################################################################

   '################################# Merge Topic Mod ################################
         Response.Write "<a href=""merge.asp?TOPIC_ID=" & Topic_ID & """>" & getCurrentIcon(strIconMerge,"Merge Topic","") & "</a>" & vbNewLine
   '##################################################################################
   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 "               </font>"
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 bgcolor=""" & strHeadCellColor & """ nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>" & 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=""" & Server.HTMLEncode(Request.QueryString("SearchTerms")) & """>" & vbNewLine)
      Response.Write("               </font></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 & " AND T_STATUS < 2"  ' Ignore unapproved/held posts
      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 & " AND T_STATUS < 2"  ' Ignore unapproved/held posts
      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><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """> Topic </font></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 bgcolor=""" & strPopUpBorderColor & """>" & 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") & "?" & chkString(Request.QueryString,"refer") & """>" & vbNewLine & _
         "             <input name=""UserName"" type=""hidden"" value=""" & strDBNTUserName & """>" & vbNewLine & _
         "             <input name=""Password"" type=""hidden"" value=""" & Request.Cookies(strUniqueID & "User")("Pword") & """>" & vbNewLine & _
         "             <tr>" & vbNewLine & _
         "               <td bgColor=""" & strHeadCellColor & """ noWrap vAlign=""top"" colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Quick Reply</b></font></td>" & vbNewLine & _
         "             </tr>" & vbNewLine & _
         "             <tr>" & vbNewLine & _
         "               <td bgColor=""" & strForumCellColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><span class=""spnMessageText""><b>Message: </b><br />" & vbNewLine & _
         "               <br />" & vbNewLine & _
         "                 <table border=""0"">" & vbNewLine & _
         "                   <tr>" & vbNewLine & _
         "                     <td align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & 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"" id=""Sig"" type=""checkbox"" value=""yes""" & chkCheckbox(intSigDefault,1,true) & "><label for=""Sig"">Include Signature</label><br />" & vbNewLine
   end if
   Response.Write "                     </font></td>" & vbNewLine & _
         "                   </tr>" & vbNewLine & _
         "                 </table>" & vbNewLine & _
         "               </span></font></td>" & vbNewLine & _
         "               <td width=""" & strTopicWidthRight & """ bgColor=""" & strForumCellColor & """><textarea name=""Message"" cols=""50"" rows=""6"" wrap=""VIRTUAL"" style=""width:100%""></textarea><br /></td>" & vbNewLine & _
         "             </tr>" & vbNewLine & _
         "             <tr>" & vbNewLine & _
         "               <td bgColor=""" & strForumCellColor & """ noWrap align=""center"" colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><input name=""Submit"" type=""submit"" value=""Submit Reply""> <input name=""Preview"" type=""button"" value=""Preview Reply"" onclick=""OpenPreview()"">"
   'Response.Write   " <input name=""Reset"" type=""reset"" value=""Reset Form""></font></td>" & vbNewLine & _
   Response.Write "</font></td>" & vbNewLine & _
         "             </tr>" & vbNewLine & _
         "             </form>" & vbNewLine & _
         "           </table>" & vbNewLine & _
         "         </td>" & vbNewLine & _
         "       </tr>" & vbNewLine & _
         "     </table>" & vbNewLine & _
         "     <br />" & vbNewLine
end sub
'###### Ignore Post Mod Below ######
Function IgnoreMemberList()
 strSql = "SELECT I.I_IGNOREID FROM " & _
 strTablePrefix & "IGNORE_POSTS I WHERE I.I_MEMBERID = " & MemberID
 set rsIgnore = my_Conn.Execute(strSql)
 if rsIgnore.BOF or rsIgnore.EOF then
 rsIgnore.close
 set rsIgnore = nothing
 exit function
 else
   IgnoreMemberList = rsIgnore.GetRows()
    rsIgnore.close
 set rsIgnore = nothing
 end if

End Function

Function ChkIgnoreList(IgnoredMembers, CurrentMember)
if IsArray(IgnoredMembers) = False then
  ChkIgnoreList = False
  exit function
end if
 For iRow = 0 to UBound(IgnoredMembers, 2)
  if IgnoredMembers(0,iRow) = CurrentMember then
   ChkIgnoreList = True
    Exit Function
  end if
 Next
 ChkIgnoreList = False
End Function

Sub WriteIgnPostLinks(TopicID, ReplyID, IMemberID)
 if ReplyID > 0 then strReplyPart = "&REPLY_ID=" & ReplyID
  if mLev >= 3 then
    Response.Write "[<a href=""javascript:openWindowIgnore('pop_viewpost.asp?TOPIC_ID=" & TopicID & strReplyPart & "')"">View Post</a>] "
  end if
 Response.Write "[<a href=""javascript:openWindow('pop_ignorelist.asp?id=" & IMemberID & "&mode=r')"">Un-Ignore User</a>]"
End Sub
'###### Ignore Post Mod Above ######
%>




"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley

Edited by - MaGraham on 14 December 2013 05:45:19
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 14 December 2013 :  09:30:06  Show Profile
It was in the 1315-1319 range. Here:


<%
'#################################################################################
'## Snitz Forums 2000 v3.4.07
'#################################################################################
'## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen,
'##                       Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
%>
<!--#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, CColor

if request("ARCHIVE") = "true" then
   strActivePrefix = strTablePrefix & "A_"
   ArchiveView = "true"
   ArchiveLink = "ARCHIVE=true&"
elseif request("ARCHIVE") <> "" then
   Response.Redirect "default.asp"
   Response.End
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" -->

<%
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
'  ## Poll Below
strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_PMRECEIVE, M.M_MSN, M.M_YAHOO" & _
   ", M.M_TITLE, M.M_HOMEPAGE, M.MEMBER_ID, M.M_LEVEL, M.M_POSTS, M.M_GLOW_TEXT, M.M_COUNTRY, M.M_SKYPE, M.M_GOOGLETALK" & _
   ", 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" & _
   ", 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, F.F_RATING_AUTH, T.ALLOW_RATING, T.T_MSGICON, T.T_MESSAGE"
'  ## Poll Above
if CanShowSignature = 1 then
   strSql = strSql & ", M.M_SIG"
end if
 if CanShowAvatar = 1 then
   strSql = strSql & ", M.M_AVATAR_URL"
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_GOOGLETALK = rsTopic("M_GOOGLETALK")
   Member_SKYPE = rsTopic("M_SKYPE")
   Member_YAHOO = rsTopic("M_YAHOO")
   Member_PM = rsTopic("M_PMRECEIVE")
   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")
   Member_GlowText = rsTopic("M_GLOW_TEXT")
   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")
   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_MsgIcon = rsTopic("T_MSGICON")
   Topic_Message = rsTopic("T_MESSAGE")
   intRatingAuth = rsTopic("F_RATING_AUTH")
   Allow_Rating = rsTopic("ALLOW_RATING")
   if CanShowSignature = 1 then
      Topic_MemberSig = trim(rsTopic("M_SIG"))
   end if
           if CanShowAvatar = 1 then
      Member_Avatar = rsTopic("M_AVATAR_URL")
   end if
 '  ## Poll Below
   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, P.P_ENDDATE"
      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")
         strPEndDate = rsPoll("P_ENDDATE")
         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
      If strPEndDate<=datetostr(strForumTimeAdjust) then
         Poll_Status=0
      End If
   end if
   if IsPoll = 1 then
      pollLink = "poll=1&"
   else
      pollLink = ""
   end if
 '  ## Poll Above
end if

rsTopic.close
set rsTopic = nothing

'## Events Calendar - Check if this topic is an event
blnEvent = TRUE
strSQL = "SELECT EVENT_DATE FROM " & strTablePrefix & "CAL_EVENTS WHERE TOPIC_ID = " & Topic_ID & " ORDER BY EVENT_DATE"
set rsCal = Server.CreateObject("ADODB.Recordset")
rsCal.open StrSql, My_conn
If rsCal.EOF then blnEvent = FALSE else arrDates = rsCal.GetRows
rsCal.close
set rsCal = nothing

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

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 then
   strSql = "SELECT REPLY_ID FROM " & strActivePrefix & "REPLY WHERE TOPIC_ID = " & Topic_ID & " "
   if AdminAllowed = 0 then
      strSql = strSql & " AND (R_STATUS < "
      if Moderation = "Y" then
         strSql = strSql & "2 "
      else
         strSql = strSql & "3 "
      end if
      strSql = strSql & "OR R_AUTHOR = " & MemberID & ") "
   end if
   strSql = strSql & "ORDER BY R_DATE ASC "

   set rsReplies = Server.CreateObject("ADODB.Recordset")
   if strDBType = "mysql" then
      rsReplies.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
   else
      rsReplies.open strSql, my_Conn, adOpenStatic, adLockReadOnly, adCmdText
   end if

   if not rsReplies.EOF then
      arrReplyData = rsReplies.GetRows(adGetRowsRest)
      iReplyCount = UBound(arrReplyData, 2)

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

   rsReplies.close
   set rsReplies = nothing
   my_Conn.close
   set my_Conn = nothing

   Response.Redirect "topic.asp?" & ArchiveLink & strwhichpage & "TOPIC_ID=" & Topic_ID & SearchLink & "#" & 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""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """><br />Viewing of this Topic is not permitted until it has been moderated.<br />Please try again later</font></p>" & vbNewLine & _
         "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """><a href=""JavaScript:history.go(-1)"">Go Back</a></font></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_GOOGLETALK, M.M_SKYPE, M.M_YAHOO, M.M_PMRECEIVE"
   strSql = strSql & ", M.M_TITLE, M.MEMBER_ID, M.M_HOMEPAGE, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY, M.M_GLOW_TEXT"
   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, R.R_MSGICON"
   if CanShowSignature = 1 then
      strSql = strSql & ", M.M_SIG"
   end if
          if CanShowAvatar = 1 then
      strSql = strSql & ", M.M_AVATAR_URL"
   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 Below
   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
               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
               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
   '  ## Poll Above

   Response.Write "     <table border=""0"" width=""100%"">" & vbNewLine & _
         "       <tr>" & vbNewLine & _
         "         <td width=""50%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
         "         " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">COMMUNITY HOME</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 blnEvent 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 "</font></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""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>"
      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 bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
         "           <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
         "             <tr>" & vbNewLine & _
         "               <td align=""center"" bgcolor=""" & strHeadCellColor & """ width=""" & strTopicWidthLeft & """"
   if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap")
   Response.Write "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Author</font></b></td>" & vbNewLine & _
         "               <td align=""center"" bgcolor=""" & strHeadCellColor & """ width=""" & strTopicWidthRight & """"
   if lcase(strTopicNoWrapRight) = "1" then Response.Write(" nowrap")
   Response.Write "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>" & vbNewLine
   if strShowTopicNav = "1" then
      Call Topic_nav()
   else
      Response.Write("Topic")
   end if
   Response.Write "</font></b></td>" & vbNewLine
   if (AdminAllowed = 1) then
      if maxpages > 1 then
         Call DropDownPaging(1)
         Response.Write "               <td align=""right"" bgcolor=""" & strHeadCellColor & """ nowrap>" & vbNewLine
         call AdminOptions()
         Response.Write "               </td>" & vbNewLine
      else
         Response.Write "               <td align=""right"" bgcolor=""" & strHeadCellColor & """ nowrap>" & vbNewLine
         call AdminOptions()
         Response.Write "               </td>" & vbNewLine
      end if
   else
      if maxpages > 1 then
         Call DropDownPaging(1)
      else
            Response.Write "               <td align=""right"" bgcolor=""" & strHeadCellColor & """ nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> </font></td>" & vbNewLine
      end if
   end if
   Response.Write "             </tr>" & vbNewLine

'## Ignore post mod. Lets poulate the array with the ignored members ID
        if strIgnorePost = "1" then
          arrIgnoreMemberList = IgnoreMemberList()
        end if
'## Ignore post mod above
   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_GOOGLETALK = 5
      rM_SKYPE = 6
      rM_YAHOO = 7
      rM_PM = 8
      rM_TITLE = 9
      rMEMBER_ID = 10
      rM_HOMEPAGE = 11
      rM_LEVEL = 12
      rM_POSTS = 13
      rM_COUNTRY = 14
      rM_GLOW_TEXT = 15
      rREPLY_ID = 16
      rFORUM_ID = 17
      rR_AUTHOR = 18
      rTOPIC_ID = 19
      rR_MESSAGE = 20
      rR_LAST_EDIT = 21
      rR_LAST_EDITBY = 22
      rR_SIG = 23
      rR_STATUS = 24
      rR_DATE = 25
      rR_MSGICON = 26
      if CanShowSignature = 1 then
         rM_SIG = 27
      end if
                     if CanShowAvatar = 1 then
                      if CanShowSignature = 1 then
                  rM_AVATAR = 28
                      else
                            rM_AVATAR = 27
                      end if
                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_MemberGOOGLETALK = arrReplyData(rM_GOOGLETALK, iForum)
         Reply_MemberSKYPE = arrReplyData(rM_SKYPE, iForum)
         Reply_MemberYAHOO = arrReplyData(rM_YAHOO, iForum)
         Reply_MemberPM = arrReplyData(rM_PM, 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_MemberGlowText = arrReplyData(rM_GLOW_TEXT, 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)
         Reply_MsgIcon = arrReplyData(rR_MSGICON, iForum)
         if CanShowSignature = 1 then
            Reply_MemberSig = trim(arrReplyData(rM_SIG, iForum))
         end if
                               if CanShowAvatar = 1 then
            Reply_MemberAvatar = trim(arrReplyData(rM_AVATAR, iForum))
         end if

         if intI = 0 then
            CColor = strAltForumCellColor
         else
            CColor = strForumCellColor
         end if

         Response.Write "             <tr>" & vbNewLine & _
               "               <td bgcolor=""" & CColor & """ valign=""top"" width=""" & strTopicWidthLeft & """"
         if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap")
         Response.Write ">" & vbNewLine & _
               "              <p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"" style=""width:0; height:0; " & Reply_MemberGlowText & """>" & profileLink(ChkString(Reply_MemberName,"display"),Reply_Author) & "</span></b></font><br />" & VbNewLine
         if strShowRank = 1 or strShowRank = 3 then
            Response.Write "               <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & ChkString(getMember_Level(Reply_MemberTitle, Reply_MemberLevel, Reply_MemberPosts),"display") & "</small></font><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>" & vbNewLine
                                  if CanShowAvatar = 1 and Reply_MemberAvatar <> "noavatar.gif" then
            Response.Write "  <table width=""" & intAvatarWidth & """ height= """ & intAvatarHeight & """ cellspacing=""0"" cellpadding=""0"" border=""0"" style="" background-image: url('" & Reply_MemberAvatar & "');background-repeat: no-repeat; background-position: center;"">" & vbNewLine & _
                        "    <tr>" & vbNewLine & _
                        "       <td align=""center""><img src=""" & strImageURL & "noavatar.gif"" width=""96"" height=""96"" border=""0""></td>" & vbNewLine & _
                        "    </tr>" & vbNewLine & _
                         " </table>" & vbNewLine
         end if
         if strCountry = "1" and trim(Reply_MemberCountry) <> "" then
            Response.Write "               <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberCountry & "</small></font><br /><img src=""" & strImageURL & Reply_MemberCountry & ".gif""><br />" & vbNewLine
         end if
         Response.Write "               <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberPosts & " Posts</small></font></p></td>" & vbNewLine & _
               "               <td bgcolor=""" & 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(getCurrentMsgIcon(Reply_MsgIcon),"","hspace=""3""") & "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize  & """>Posted - " & ChkDate(Reply_Date, " : " ,true) & "</font>" & vbNewline
         elseif Reply_Status = 2 then
            Response.Write  "                    <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize  & """>NOT MODERATED!!!</font>" & vbNewline
         elseif Reply_Status = 3 then
            Response.Write  "                    " & getCurrentIcon(strIconPosticonHold,"","hspace=""3""") & "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize  & """>ON HOLD</font>" & vbNewline
         end if
         ' DEM --> End of Code added for moderation.
         Response.Write "           <a href=""JavaScript:openWindowLink('pop_link_reply.asp?TOPIC_ID=" & Topic_ID & "&REPLY_ID=" & Reply_ReplyID & "')"">" & getCurrentIcon(strIconLinkTo,"Share a link to this reply","align=""absmiddle"" hspace=""3""") & "</a>" & vbNewLine
         Response.Write "                      " & profileLink(getCurrentIcon(strIconProfile,"View This Member's 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:openWindow5('pop_mail.asp?id=" & Reply_MemberID & "')"">" & getCurrentIcon(strIconEmail,"Send An Email To This Member","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 strGOOGLETALK = "1" then
            if Trim(Reply_MemberGOOGLETALK) <> "" then
               Response.Write "                      <a href=""JavaScript:openWindow('pop_messengers.asp?mode=GOOGLETALK&ID=" & Reply_MemberID & "')"">" & getCurrentIcon(strIconGOOGLETALK,"Click to see " & ChkString(Reply_MemberName,"display") & "","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
            end if
         end if
         if strSKYPE = "1" then
            if Trim(Reply_MemberSKYPE) <> "" then
               Response.Write "                      <a href=""JavaScript:openWindow('pop_messengers.asp?mode=SKYPE&ID=" & Reply_MemberID & "')"">" & getCurrentIcon(strIconSKYPE,"Bekijk het Skype telefoon adres van " & ChkString(Reply_MemberName,"display") & "","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
         '######################## Fame Mod #########################
         if TMember_ID <> MemberID and mLev > 1 then
            Response.Write "<a href=""pop_fame.asp?topic_id="& topic_id & "&reply_id="& reply_id & """ target=""_blank"">" & getCurrentIcon("" & striconFame & "","Hall of Fame", "align=""middle""") & "</a>" & vbNewLine
         end if
         '######################## Fame Mod #########################
'##FRIENDS ## User Space Mod ## Add Code Below ##############
                        if trim(strUSFriendSwitch) <> "" then
                                if cLng(strUSFriendSwitch) = 1 then
                                        if Reply_MemberID <> MemberID then
                                                Response.Write  "<a href=""JavaScript:openWindow5('pop_user_space.asp?mode=friends&id=" & Reply_MemberID & "&action=add&type=0')"">" & getCurrentIcon(strIconFriends,"Add " & ChkString(Reply_MemberName,"display") & " to your friends list","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
                                        end if
                                end if
                        end if
'## END #####################################################
'##BOOKMARKS ## User Space Mod ## Add Code below ###############

                        if trim(strUSBookmarkSwitch) <> "" then
                                if cLng(strUSBookmarkSwitch) = 1 then
                                        Response.Write  "<a href=""JavaScript:openWindow5('pop_user_space.asp?mode=bookmark&action=add&type=post&archive=" & ArchiveView & "&topic_id=" & TopicID & "&reply_id=" & Reply_ReplyID & "')"">" & getCurrentIcon(strIconFavorites,"Bookmark this reply","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
                                end if
                        end if

'## End #####################################################
         If (Reply_MemberPM = "1" and strPMStatus = "1") Then
            if Trim(Reply_MemberPM) <> "" then
               Response.Write "               <a href=""privatesend.asp?method=Topic&mname=" & ChkString(Reply_MemberName,"display") & """>" & getCurrentIcon(strIconPmprivatemessage,"Send " & ChkString(Reply_MemberName,"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "</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(strIconReplyQuote,"Reply with Quote","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
         end if
         if (strIPLogging = "1") then
            if (AdminAllowed = 1) then
' ########################### Ban IP Mod ###############################
               Response.Write "                      <a href=""JavaScript:openWindow('pop_ban_ip.asp?TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "')"">" & getCurrentIcon(strIconIP,"View/Ban 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 noshade size=""" & strFooterFontSize & """></td>" & vbNewLine & _
               "                   </tr>" & vbNewLine & _
               "                   <tr>" & vbNewLine & _
               "                     <td valign=""top"" height=""100%""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><span class=""spnMessageText"" id=""msg"">"
               If blnEvent Then
      %> <!-- #include file="cal_topic.asp" --> <%
   End If
 '## Ignore Post mod Below
    if strIgnorePost = "1" then
      boolIgnoreReply = ChkIgnoreList(arrIgnoreMemberList, Reply_MemberID)
    end if

    if Request.QueryString("SearchTerms") <> "" then
     if strIgnorePost = "1" then
      if boolIgnoreReply then
        WriteIgnPostLinks TopicID, Reply_ReplyID, Reply_MemberID
      else
        Response.Write SearchHiLite(formatStr(Reply_Content))
      end if
     else
      Response.Write SearchHiLite(formatStr(Reply_Content))
     end if
    else
     if strIgnorePost = "1" then
      if boolIgnoreReply then
        WriteIgnPostLinks TopicID, Reply_ReplyID, Reply_MemberID
      else
        Response.Write formatStr(Reply_Content)
      end if
     else
      Response.Write formatStr(Reply_Content)
     end if
    end if
 '## Ignore Post mod Above
         Response.Write "</span id=""msg""></font></td>" & vbNewLine & _
               "                   </tr>" & vbNewLine
         if CanShowSignature = 1 and Reply_Sig = 1 and Reply_MemberSig <> "" then
            Response.Write "                   <tr>" & vbNewLine & _
                  "                     <td valign=""bottom""><hr noshade size=""" & strFooterFontSize & """><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><span class=""spnMessageText"">" & formatStr(Reply_MemberSig) & "</span></font></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 noshade size=""1"" color=""" & strForumFontColor & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & _
               "Edited by - " & Reply_LastEditByName & " on " & chkDate(Reply_LastEdit, " " ,true) & "</font></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"" bgcolor=""" & strHeadCellColor & """ width=""" & strTopicWidthLeft & """"
      if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap")
      Response.Write "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """> </font></b></td>" & vbNewLine
   end if
   Response.Write "               <td align=""center"" bgcolor=""" & strHeadCellColor & """ width=""" & strTopicWidthRight & """"
   if lcase(strTopicNoWrapRight) = "1" then Response.Write(" nowrap")
   'if maxpages > 1 and (AdminAllowed = 1) then Response.Write(" colspan=""2""")
   Response.Write "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>" & vbNewLine
   if strShowTopicNav = "1" then
      Call Topic_nav()
   else
      Response.Write("Topic")
   end if
   Response.Write "</font></b></td>" & vbNewLine
   if (AdminAllowed = 1) then
      if maxpages > 1 then
            Response.Write "               <td align=""right"" bgcolor=""" & strHeadCellColor & """ nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> </font></td>" & vbNewLine
      end if
      Response.Write "               <td align=""right"" bgcolor=""" & strHeadCellColor & """ nowrap>" & vbNewLine
      call AdminOptions()
      Response.Write "</td>" & vbNewLine
   else
         Response.Write "               <td align=""right"" bgcolor=""" & strHeadCellColor & """ nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> </font></td>" & vbNewLine
   end if
   '## Beginning of modification for Tree Modification Mod
      Response.Write "     <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine & _
         "       <tr>" & vbNewLine & _
         "         <td width=""50%"" align=""left"" bgcolor=""" & strForumCellColor & """ nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
         "         " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">COMMUNITY HOME</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 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 "</font></td>" & vbNewLine & _
         "         <td align=""right"" width=""50%""bgcolor=""" & strForumCellColor & """ nowrap>" & vbNewLine
   call PostingOptions()
'## End of modification for Tree Navigation Mod
   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""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>"
      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
'## Beginning of second modification for Tree Navigation Mod
      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
'## End of second modification for Tree Navigation Mod
%>
   <!--#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()
   CColor = strForumFirstCellColor
' ################# TOPIC RATING MOD ######################
response.Write "<tr>" & vbNewLine & _
"<td></td>" & vbNewLine & _
"<td>" & vbNewLine

 if request("ARCHIVE")<> "true" then
 TopicRatingAvg = GetTopicRatingAvg( TopicID )
    if intRatingAuth = 1 and Allow_Rating = 1 then
          if strDBNTUserName <> "" Then
             if ( getMemberID(strDBNTUserName) = Topic_Author ) then
               Response.Write  " <table border=""0"" width=""95%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
               "  <tr>" & vbNewLine & _
               "  <td bgColor=""" & strForumFirstCellColor & """ align=left "" & strColspan & "">" & vbNewLine & _
               "  <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>You Cannot Rate your own Topic:  | Total Rating: " & getCurrentIcon(GetTopicRatingPicture(TopicRatingAvg),"","") & "</small></font>" & vbNewLine & _
               "  </td>" & vbNewLine & _
               "  </tr>" & vbNewLine & _
               "  </table>" & vbNewLine
             Else
                iTopicRating = GetTopicRating( getMemberID(strDBNTUserName), TopicID )
                   if iTopicRating <> -1 Then
                     Response.Write  "     <table border=""0"" width=""95%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
                     "       <tr>" & vbNewLine & _
                     "       <td bgColor=""" & strForumFirstCellColor & """ align=left " & strColspan & ">" & vbNewLine & _
                     "       <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>You Rated this Topic: " & getCurrentIcon(GetTopicRatingPicture(iTopicRating),"","") & " | Total Rating: " & getCurrentIcon(GetTopicRatingPicture(TopicRatingAvg),"","") & "</small></font>" & vbNewLine & _
                     "       </td>" & vbNewLine & _
                     "       </tr>" & vbNewLine & _
                     "       </table>" & vbNewLine
                   else
                     Response.Write  "     <table border=""0"" width=""95%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
                     "       <tr>" & vbNewLine & _
                     "       <td valign=""top"" height=""100%"">" & vbNewLine & _
                     "       <form align=""left"" action=""pop_topic_rating.asp?mode=goRate&id=" & TopicID & """ method=""Post"" id=Form1 name=Form1>" & vbNewLine & _
                     "       <SELECT NAME=""rating"">" & vbNewLine & _
                     "       <OPTION value=''>Rate Topic" & vbNewLine & _
                     "       <OPTION value='5'>5: Highest Rating" & vbNewLine & _
                     "       <OPTION value='4'>4" & vbNewLine & _
                     "       <OPTION value='3'>3" & vbNewLine & _
                     "       <OPTION value='2'>2" & vbNewLine & _
                     "       <OPTION value='1'>1: Lowest Rating" & vbNewLine & _
                     "       </SELECT> <INPUT TYPE=""SUBMIT"" NAME=""Submit"" VALUE=""Rate"">" & vbNewLine & _
                     "       </form>" & vbNewLine & _
                     "       </td>" & vbNewLine & _
                     "       <td bgColor=""" & strForumFirstCellColor & """ align=left " & strColspan & " valign=""top"" height=""100%"">" & vbNewLine & _
                     "       <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small> | Total Rating: " & getCurrentIcon(GetTopicRatingPicture(TopicRatingAvg),"","") & "</small></font>" & vbNewLine & _
                     "       </td>" & vbNewLine & _
                     "       </tr>" & vbNewLine & _
                     "       </table>" & vbNewLine

                   end if
             end if
          end if
    else
         Response.Write  " <table border=""0"" width=""95%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
         "<tr>" & vbNewLine & _
         "<td bgColor=""" & strForumFirstCellColor & """ align=left " & strColspan & " valign=""top"" height=""100%"">" & vbNewLine & _
         "<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>Rating is not allowed for this toic.</small></font>" & vbNewLine & _
         "</td>" & vbNewLine & _
         "</tr>" & vbNewLine & _
         "</table>" & vbNewLine
    end if
 else
   TopicRatingAvg = GetTopicRatingAvg( TopicID )
   Response.Write "<table border=""0"" width=""95%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
   "<tr>" & vbNewLine & _
   "<td bgColor=""" & strForumFirstCellColor & """ align=left " & strColspan & " valign=""top"" height=""100%"">" & vbNewLine & _
   "<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>Before Archiving the total rating was: " & getCurrentIcon(GetTopicRatingPicture(TopicRatingAvg),"","") & "</small></font>" & vbNewLine & _
   "</td>" & vbNewLine & _
   "</tr>" & vbNewLine & _
   "</table>" & vbNewLine

 end if
Response.Write "</td></tr>" &vbNewline

' ################# END TOPIC RATING MOD ######################
   Response.Write "             <tr>" & vbNewLine & _
         "               <td bgcolor=""" & strForumFirstCellColor & """ valign=""top"" width=""" & strTopicWidthLeft & """"
   if lcase(strTopicNoWrapLeft) = "1" then Response.Write(" nowrap")
   Response.Write ">" & vbNewLine & _
         "               <p><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"" style=""width:0;height:0; " & Member_GlowText & """>" & profileLink(ChkString(Member_Name,"display"),TMember_ID) & "</span></b></font><br />" & VbNewLine
   if strShowRank = 1 or strShowRank = 3 then
      Response.Write "               <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & ChkString(getMember_Level(Member_Title, Member_Level, Member_Posts),"display") & "</small></font><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>" & vbNewLine
         if CanShowAvatar = 1 and Member_Avatar <> "noavatar.gif" then
      Response.Write "  <table width=""" & intAvatarWidth  & """ height= """ & intAvatarHeight & """ cellspacing=""0"" cellpadding=""0"" border=""0"" style="" background-image: url('" & Member_Avatar & "');background-repeat: no-repeat; background-position: center;"">" & vbNewLine & _
                  "    <tr>" & vbNewLine & _
                  "       <td align=""center""><img src=""" & strImageURL & "noavatar.gif"" width=""96"" height=""96"" border=""0""></td>" & vbNewLine & _
                  "    </tr>" & vbNewLine & _
                   " </table>" & vbNewLine
   end if
   if strCountry = "1" and trim(Member_Country) <> "" then
      Response.Write "               <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Country & "</small></font><br /><img src=""" & strImageURL & Member_Country & ".gif""><br />" & vbNewLine
   end if
   Response.Write "               <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Posts & " Posts</small></font></p></td>" & vbNewLine & _
         "               <td bgcolor=""" & strForumFirstCellColor & """ 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(getCurrentMsgIcon(Topic_MsgIcon),"","hspace=""3""") & "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>Posted - " & ChkDate(Topic_Date, " : " ,true) & "</font>" & vbNewline
   elseif Topic_Status = 2 then
      Response.Write  "                    <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize  & """>NOT MODERATED!!!</font>" & vbNewline
   elseif Topic_Status = 3 then
      Response.Write  "                    " & getCurrentIcon(strIconPosticonHold,"","hspace=""3""") & "<font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>ON HOLD</font>" & vbNewline
   end if
   Response.Write "          <a href=""JavaScript:openWindowLink('pop_link_topic.asp?url=" & strForumURL & "topic.asp?TOPIC_ID=" & Topic_ID & "')"">" & getCurrentIcon(strIconLinkTo,"Share a link to this topic","align=""absmiddle"" hspace=""3""") & "</a>" & vbNewLine
   Response.Write "                      " & profileLink(getCurrentIcon(strIconProfile,"View This Member's 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:openWindow5('pop_mail.asp?id=" & TMember_ID & "')"">" & getCurrentIcon(strIconEmail,"Send An Email To This Member","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 Below
   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 Above

   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 (strGOOGLETALK = "1") then
      if Trim(Member_GOOGLETALK) <> "" then
         Response.Write "                      <a href=""JavaScript:openWindow('pop_messengers.asp?mode=GOOGLETALK&ID=" & TMember_ID & "')"">" & getCurrentIcon(strIconGOOGLETALK,"Click to see " & ChkString(Member_Name,"display") & "'s Google Talk address","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
      end if
   end if
   if (strSKYPE = "1") then
      if Trim(Member_SKYPE) <> "" then
         Response.Write "                      <a href=""JavaScript:openWindow('pop_messengers.asp?mode=SKYPE&ID=" & TMember_ID & "')"">" & getCurrentIcon(strIconSKYPE,"Look at the Skype phone address from " & ChkString(Member_Name,"display") & "","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
   '######################## Fame Mod #########################
   if TMember_ID <> MemberID and mLev > 1 then
      Response.Write "<a href=""pop_fame.asp?topic_id="& topic_id & "&reply_id="& reply_id & """ target=""_blank"">" & getCurrentIcon("" & striconFame & "","Hall of Fame", "align=""middle""") & "</a>" & vbNewLine
   end if
   '######################## Fame Mod #########################
'##FRIENDS ## User Space Mod ## Add Code Below ##############
       if trim(strUSFriendSwitch) <> "" then
               if cLng(strUSFriendSwitch) = 1 then
                       if TMember_ID <> MemberID then
                               Response.Write  "<a href=""JavaScript:openWindow5('pop_user_space.asp?mode=friends&id=" & TMember_ID & "&action=add&type=0')"">" & getCurrentIcon(strIconFriends,"Add " & ChkString(Member_Name,"display") & " to your friends list","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
                       end if
               end if
       end if
'## END #####################################################
'##BOOKMARKS ## User Space Mod ## Add Code below ###########################

        if trim(strUSBookmarkSwitch) <> "" then
                if cLng(strUSBookmarkSwitch) = 1 then
                        Response.Write  "<a href=""JavaScript:openWindow5('pop_user_space.asp?mode=bookmark&action=add&type=post&archive=" & ArchiveView & "&topic_id=" & TopicID & "')"">" & getCurrentIcon(strIconFavorites,"Bookmark this topic","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
                end if
        end if

'## End ## Thats all for this file ##########################
   If (Member_PM = "1" and strPMStatus = "1") Then
      if Trim(Member_PM) <> "" then
         Response.Write "               <a href=""privatesend.asp?method=Topic&mname=" & ChkString(Member_Name,"display") & """>" & getCurrentIcon(strIconPmprivatemessage,"Send " & ChkString(Member_Name,"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "</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(strIconReplyQuote,"Reply with Quote","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
   end if
   if (strIPLogging = "1") then
      if (AdminAllowed = 1) then
' ########################### Ban IP Mod ###############################
               Response.Write "                      <a href=""JavaScript:openWindow('pop_ban_ip.asp?TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & "')"">" & getCurrentIcon(strIconIP,"View/Ban 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
      '  ## Poll Below
      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
      '  ## Poll Above
   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 noshade size=""" & strFooterFontSize & """></td>" & vbNewLine & _
         "                   </tr>" & vbNewLine & _
         "                   <tr>" & vbNewLine
'####################################### 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 & _
'############## Poll Mod ########################
'# Then add the following code below.          #
'################################################
   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
				'## Ignore Post Mod Below
			  if strIgnorePost = "1" then
			    boolIgnorePost = ChkIgnoreList(arrIgnoreMemberList, TMember_ID)
				end if
 				if Request.QueryString("SearchTerms") <> "" then
 					if strIgnorePost = "1" then
 						if boolIgnorePost then
  						WriteIgnPostLinks TopicID, 0, TMember_ID
  					else
  						Response.Write SearchHiLite(formatStr(Topic_Message))
  					end if
 					else
 						Response.Write SearchHiLite(formatStr(Topic_Message))
 					end if
 				else
 					if strIgnorePost = "1" then
 						if boolIgnorePost then
						  WriteIgnPostLinks TopicID, 0, TMember_ID
 						else
 							Response.Write formatStr(Topic_Message)
 						end if
					else
						Response.Write SearchHiLite(formatStr(Topic_Message))
					end if         
 				end if
				'## Ignore Post Mod Above
         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)
               If strPEndDate <= DateToStr(strForumTimeAdjust) Then
                  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
               Else
                  Response.Write "  <tr>" & vbNewLine & _
                     "    <td width=""30%""> </td>" & vbNewLine & _
                     "    <td nowrap><font face="""  & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strDefaultFontSize & """>Poll not yet closed.  Results not available.</font></td>" & vbNewLine & _
                     "    <td nowrap width=""10%""></td>" & vbNewLine & _
                     "  </tr>" & vbNewLine
                  Exit For
               End If
            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 & _
         "                   </tr>" & vbNewLine
   '  ## Poll Above
   if CanShowSignature = 1 and Topic_Sig = 1 and Topic_MemberSig <> "" then
      Response.Write "                   <tr>" & vbNewLine & _
            "                     <td valign=""bottom""><hr noshade size=""" & strFooterFontSize & """><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><span class=""spnMessageText"">" & formatStr(Topic_MemberSig) & "</span></font></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 noshade size=""" & strFooterFontSize & """ color=""" & strForumFirstCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine & _
         "Edited by - " & Topic_LastEditByName & " on " & chkDate(Topic_LastEdit, " " ,true) & "</font></td>" & vbNewLine & _
         "                                </tr>" & vbNewLine
   end if
   Response.Write "                 </table>" & vbNewLine & _
      "               </td>" & vbNewLine & _
      "             </tr>" & vbNewLine
End Sub


sub PostingOptions()
   Response.Write "         <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
   '## Events Calendar - Adds a "New Event" Link
   strSql = "SELECT F_ALLOWEVENTS FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & Forum_ID & " AND F_ALLOWEVENTS = 1"
   set rsCal = Server.CreateObject("ADODB.Recordset")
   rsCal.Open strSql, My_conn
   if not rsCal.EOF then blnCalAllowed = TRUE else blnCalAllowed = FALSE
   rsCal.Close
   set rsCal = nothing
   if blnCalAllowed and (intCalMLev <= MLev) then Response.Write  "         <a href=""post.asp?method=Topic&event=1&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strCalIconEvent,strIconEvent,"align=""absmiddle""") & "</a> <a href=""post.asp?method=Topic&event=1&FORUM_ID=" & Forum_ID & """>" & strCalNewEvent & "</a>  " & 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 Below
         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
         '  ## Poll Above
      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 Below
            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
            '  ## Poll Above
         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 Below
            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
         '  ## Poll Above
         end if
      end if
      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 "         </font>"
end sub

sub AdminOptions()
   Response.Write "               <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & 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
   '  ## Poll Below
         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
   '  ## Poll Above
      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
     '##################################### Split Topic Mod ###########################################
      if iReplyCount <> "" then
         Response.Write  "<a href=""split.asp?" & ArchiveLink & "TOPIC_ID=" & Topic_ID & "&FORUM_ID=" & Forum_ID & """>" & getCurrentIcon(strIconSplitTopic,"Split Topic","") & "</a>" & vbNewLine
      end if
   '#################################################################################################

   '################################# Merge Topic Mod ################################
         Response.Write "<a href=""merge.asp?TOPIC_ID=" & Topic_ID & """>" & getCurrentIcon(strIconMerge,"Merge Topic","") & "</a>" & vbNewLine
   '##################################################################################
   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 "               </font>"
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 bgcolor=""" & strHeadCellColor & """ nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>" & 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=""" & Server.HTMLEncode(Request.QueryString("SearchTerms")) & """>" & vbNewLine)
      Response.Write("               </font></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 & " AND T_STATUS < 2"  ' Ignore unapproved/held posts
      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 & " AND T_STATUS < 2"  ' Ignore unapproved/held posts
      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><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """> Topic </font></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 bgcolor=""" & strPopUpBorderColor & """>" & 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") & "?" & chkString(Request.QueryString,"refer") & """>" & vbNewLine & _
         "             <input name=""UserName"" type=""hidden"" value=""" & strDBNTUserName & """>" & vbNewLine & _
         "             <input name=""Password"" type=""hidden"" value=""" & Request.Cookies(strUniqueID & "User")("Pword") & """>" & vbNewLine & _
         "             <tr>" & vbNewLine & _
         "               <td bgColor=""" & strHeadCellColor & """ noWrap vAlign=""top"" colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Quick Reply</b></font></td>" & vbNewLine & _
         "             </tr>" & vbNewLine & _
         "             <tr>" & vbNewLine & _
         "               <td bgColor=""" & strForumCellColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><span class=""spnMessageText""><b>Message: </b><br />" & vbNewLine & _
         "               <br />" & vbNewLine & _
         "                 <table border=""0"">" & vbNewLine & _
         "                   <tr>" & vbNewLine & _
         "                     <td align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & 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"" id=""Sig"" type=""checkbox"" value=""yes""" & chkCheckbox(intSigDefault,1,true) & "><label for=""Sig"">Include Signature</label><br />" & vbNewLine
   end if
   Response.Write "                     </font></td>" & vbNewLine & _
         "                   </tr>" & vbNewLine & _
         "                 </table>" & vbNewLine & _
         "               </span></font></td>" & vbNewLine & _
         "               <td width=""" & strTopicWidthRight & """ bgColor=""" & strForumCellColor & """><textarea name=""Message"" cols=""50"" rows=""6"" wrap=""VIRTUAL"" style=""width:100%""></textarea><br /></td>" & vbNewLine & _
         "             </tr>" & vbNewLine & _
         "             <tr>" & vbNewLine & _
         "               <td bgColor=""" & strForumCellColor & """ noWrap align=""center"" colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><input name=""Submit"" type=""submit"" value=""Submit Reply""> <input name=""Preview"" type=""button"" value=""Preview Reply"" onclick=""OpenPreview()"">"
   'Response.Write   " <input name=""Reset"" type=""reset"" value=""Reset Form""></font></td>" & vbNewLine & _
   Response.Write "</font></td>" & vbNewLine & _
         "             </tr>" & vbNewLine & _
         "             </form>" & vbNewLine & _
         "           </table>" & vbNewLine & _
         "         </td>" & vbNewLine & _
         "       </tr>" & vbNewLine & _
         "     </table>" & vbNewLine & _
         "     <br />" & vbNewLine
end sub
'###### Ignore Post Mod Below ######
Function IgnoreMemberList()
 strSql = "SELECT I.I_IGNOREID FROM " & _
 strTablePrefix & "IGNORE_POSTS I WHERE I.I_MEMBERID = " & MemberID
 set rsIgnore = my_Conn.Execute(strSql)
 if rsIgnore.BOF or rsIgnore.EOF then
 rsIgnore.close
 set rsIgnore = nothing
 exit function
 else
   IgnoreMemberList = rsIgnore.GetRows()
    rsIgnore.close
 set rsIgnore = nothing
 end if

End Function

Function ChkIgnoreList(IgnoredMembers, CurrentMember)
if IsArray(IgnoredMembers) = False then
  ChkIgnoreList = False
  exit function
end if
 For iRow = 0 to UBound(IgnoredMembers, 2)
  if IgnoredMembers(0,iRow) = CurrentMember then
   ChkIgnoreList = True
    Exit Function
  end if
 Next
 ChkIgnoreList = False
End Function

Sub WriteIgnPostLinks(TopicID, ReplyID, IMemberID)
 if ReplyID > 0 then strReplyPart = "&REPLY_ID=" & ReplyID
  if mLev >= 3 then
    Response.Write "[<a href=""javascript:openWindowIgnore('pop_viewpost.asp?TOPIC_ID=" & TopicID & strReplyPart & "')"">View Post</a>] "
  end if
 Response.Write "[<a href=""javascript:openWindow('pop_ignorelist.asp?id=" & IMemberID & "&mode=r')"">Un-Ignore User</a>]"
End Sub
'###### Ignore Post Mod Above ######
%>
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 14 December 2013 :  11:33:58  Show Profile

You are so considerate, Carefree!

Thank you so much!


Just one quick question. . .

Your coding for members.asp above places the "ignore" icon before the members' avatars. I have all of the icons in that area i.e. "private message," "google talk," etc. on the next line below the members' avatar.

However; I can't figure out how to place the "ignore" icon below their avatar. Could you help me, please?

Here's my members.asp below.




<%
'#################################################################################
'## Snitz Forums 2000 v3.4.07
'#################################################################################
'## Copyright (C) 2000-09 Michael Anderson, Pierre Gorissen,
'##                       Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<%

if strDBNTUserName = "" then
   Err_Msg = "<li>You must be logged in to view the Members List</li>"

   Response.Write "      <table width=""100%"" border=""0"">" & vbNewLine & _
         "        <tr>" & vbNewLine & _
         "          <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
         "          " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
         "          " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Member Information</font></td>" & vbNewLine & _
         "        </tr>" & vbNewLine & _
         "      </table>" & vbNewLine & _
         "      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Was A Problem!</font></p>" & vbNewLine & _
         "      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>You must be logged in to view this page</font></p>" & vbNewLine & _
         "      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Back to Forum</a></font></p>" & vbNewLine & _
         "      <br />" & vbNewLine
   WriteFooter
   Response.End
end if

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

if trim(chkString(Request("method"),"SQLString")) <> "" then
   SortMethod = trim(chkString(Request("method"),"SQLString"))
   strSortMethod = "&method=" & SortMethod
   strSortMethod2 = "?method=" & SortMethod
end if

if trim(chkString(Request("mode"),"SQLString")) <> "" then
   strMode = trim(chkString(Request("mode"),"SQLString"))
   if strMode <> "search" then strMode = ""
end if

SearchName = trim(Request("M_NAME"))
if SearchName = "" then
   SearchName = trim(Request.Form("M_NAME"))
end if
SearchNameDisplay = Server.HTMLEncode(SearchName)
SearchName = chkString(SearchName, "sqlstring")

if Request("UserName") <> "" then
   if IsNumeric(Request("UserName")) = True then srchUName = cLng(Request("UserName")) else srchUName = "1"
end if
if Request("FirstName") <> "" then
   if IsNumeric(Request("FirstName")) = True then srchFName = cLng(Request("FirstName")) else srchFName = "0"
end if
if Request("LastName") <> "" then
   if IsNumeric(Request("LastName")) = True then srchLName = cLng(Request("LastName")) else srchLName = "0"
end if
if Request("INITIAL") <> "" then
   if IsNumeric(Request("INITIAL")) = True then srchInitial = cLng(Request("INITIAL")) else srchInitial = "0"
end if

mypage = trim(chkString(request("whichpage"),"SQLString"))
if ((mypage = "") or (IsNumeric(mypage) = FALSE)) then mypage = 1
mypage = cLng(mypage)

'New Search Code
If strMode = "search"  and (srchUName = "1" or srchFName = "1" or srchLName = "1" or srchInitial = "1" ) then
   strSql = "SELECT MEMBER_ID, M_STATUS, M_NAME, M_LEVEL, M_EMAIL, M_COUNTRY, M_HOMEPAGE,  M_AVATAR_URL, "
   strSql = strSql & "M_AIM, M_ICQ, M_MSN,  M_GOOGLETALK, M_SKYPE, M_YAHOO, M_TITLE, M_POSTS, M_LASTPOSTDATE, M_LASTHEREDATE, M_DATE, M_PMRECEIVE "
   strSql2 = " FROM " & strMemberTablePrefix & "MEMBERS "
'  if Request.querystring("link") <> "sort" then
      whereSql = " WHERE ("
      tmpSql = ""
      if srchUName = "1" then
         tmpSql = tmpSql & "M_NAME LIKE '%" & SearchName & "%' OR "
         tmpSql = tmpSql & "M_USERNAME LIKE '%" & SearchName & "%'"
      end if
      if srchFName = "1" then
         if srchUName = "1" then
               tmpSql = tmpSql & " OR "
         end if
         tmpSql = tmpSql & "M_FIRSTNAME LIKE '%" & SearchName & "%'"
      end if
      if srchLName = "1" then
         if srchFName = "1" or srchUName = "1" then
            tmpSql = tmpSql & " OR "
         end if
         tmpSql = tmpSql & "M_LASTNAME LIKE '%" & SearchName & "%' "
      end if
      if srchInitial = "1" then
         tmpSQL = "M_NAME LIKE '" & SearchName & "%'"
      end if

      whereSql = whereSql & tmpSql &")"
      Session(strCookieURL & "where_Sql") = whereSql
'  end if

   if Session(strCookieURL & "where_Sql") <> "" then
      whereSql = Session(strCookieURL & "where_Sql")
   else
      whereSql = ""
   end if
   strSQL3 = whereSql
else
   '## Forum_SQL - Get all members
   strSql = "SELECT MEMBER_ID, M_STATUS, M_NAME, M_LEVEL, M_EMAIL, M_COUNTRY, M_HOMEPAGE, M_AVATAR_URL, "
   strSql = strSql & "M_AIM, M_ICQ, M_MSN, M_GOOGLETALK, M_SKYPE, M_YAHOO, M_TITLE, M_POSTS, M_LASTPOSTDATE, M_LASTHEREDATE, M_DATE, M_PMRECEIVE "
   strSql2 = " FROM " & strMemberTablePrefix & "MEMBERS "
   if mlev = 4 then
      strSql3 = " WHERE M_NAME <> 'n/a' "
   else
      strSql3 = " WHERE M_STATUS = " & 1
   end if
end if
select case SortMethod
   case "nameasc"
      strSql4 = " ORDER BY M_NAME ASC"
   case "namedesc"
      strSql4 = " ORDER BY M_NAME DESC"
   case "levelasc"
      strSql4 = " ORDER BY M_TITLE ASC, M_NAME ASC"
   case "leveldesc"
      strSql4 = " ORDER BY M_TITLE DESC, M_NAME ASC"
   case "lastpostdateasc"
      strSql4 = " ORDER BY M_LASTPOSTDATE ASC, M_NAME ASC"
   case "lastpostdatedesc"
      strSql4 = " ORDER BY M_LASTPOSTDATE DESC, M_NAME ASC"
   case "lastheredateasc"
      if mlev = 4 or mlev = 3 then
         strSql4 = " ORDER BY M_LASTHEREDATE ASC, M_NAME ASC"
      else
         strSql4 = " ORDER BY M_POSTS DESC, M_NAME ASC"
      end if
   case "lastheredatedesc"
      if mlev = 4 or mlev = 3 then
         strSql4 = " ORDER BY M_LASTHEREDATE DESC, M_NAME ASC"
      else
         strSql4 = " ORDER BY M_POSTS DESC, M_NAME ASC"
      end if
   case "dateasc"
      strSql4 = " ORDER BY M_DATE ASC, M_NAME ASC"
   case "datedesc"
      strSql4 = " ORDER BY M_DATE DESC, M_NAME ASC"
   case "countryasc"
      strSql4 = " ORDER BY M_COUNTRY ASC, M_NAME ASC"
   case "countrydesc"
      strSql4 = " ORDER BY M_COUNTRY DESC, M_NAME ASC"
   case "postsasc"
      strSql4 = " ORDER BY M_POSTS ASC, M_NAME ASC"
   case else
      strSql4 = " ORDER BY M_POSTS DESC, M_NAME ASC"
end select

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

   '## Forum_SQL - Get the total pagecount
   strSql1 = "SELECT COUNT(MEMBER_ID) AS PAGECOUNT "

   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 rs = Server.CreateObject("ADODB.Recordset")
      rs.open strSql & strSql2 & strSql3 & strSql4 & strSql5, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
         arrMemberData = rs.GetRows(intGetRows)
         iMemberCount = UBound(arrMemberData, 2)
      rs.close
      set rs = nothing
   else
      iMemberCount = ""
   end if

else 'end MySql specific code
   set rs = Server.CreateObject("ADODB.Recordset")
   rs.cachesize = strPageSize
   rs.open strSql & strSql2 & strSql3 & strSql4, my_Conn, adOpenStatic
      If not (rs.EOF or rs.BOF) then
         rs.movefirst
         rs.pagesize = strPageSize
         rs.absolutepage = mypage '**
         maxpages = cLng(rs.pagecount)
         arrMemberData = rs.GetRows(strPageSize)
         iMemberCount = UBound(arrMemberData, 2)
      else
         iMemberCount = ""
      end if
   rs.Close
   set rs = nothing
end if

Response.Write "      <table width=""100%"" border=""0"">" & vbNewLine & _
      "        <tr>" & vbNewLine & _
      "          <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
      "          " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
      "          " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Member Information</font></td>" & vbNewLine & _
      "          <td align=""right"" valign=""bottom"">" & vbNewLine
if maxpages > 1 then
   Response.Write "            <table border=""0"" align=""right"">" & vbNewLine & _
         "              <tr>" & vbNewLine
   Call Paging2(1)
   Response.Write "              </tr>" & vbNewLine & _
         "            </table>" & vbNewLine
else
   Response.Write "           " & vbNewLine
end if
Response.Write "          </td>" & vbNewLine & _
      "        </tr>" & vbNewLine & _
      "      </table>" & vbNewLine

Response.Write "      <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewline & _
      "        <tr>" & vbNewline & _
      "          <td bgcolor=""" & strPopUpBorderColor & """>" & vbNewline & _
      "            <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewline & _
      "              <tr>" & vbNewline & _
      "              <form action=""members.asp" & strSortMethod2 & """ method=""post"" name=""SearchMembers"">" & vbNewline & _
      "                <td bgcolor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Search:</b> " & vbNewline & _
      "                <input type=""checkbox"" name=""UserName"" value=""1"""
if ((srchUName <> "")  or (srchUName = "" and srchFName = "" and srchLName = "") ) then Response.Write(" checked")
Response.Write ">User Names" & vbNewline
if strFullName = "1" then
   Response.Write "                  <input type=""checkbox"" name=""FirstName"" value=""1""" & chkCheckbox(srchFName,1,true) & ">First Name" & vbNewline & _
         "                  <input type=""checkbox"" name=""LastName"" value=""1""" & chkCheckbox(srchLName,1,true) & ">Last Name" & vbNewline
end if
Response.Write "                </font></td>" & vbNewline & _
      "                <td bgcolor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>For:</b> " & vbNewline & _
      "                <input type=""text"" name=""M_NAME"" value=""" & SearchNameDisplay & """></font></td>" & vbNewline & _
      "                <input type=""hidden"" name=""mode"" value=""search"">" & vbNewline & _
      "                <input type=""hidden"" name=""initial"" value=""0"">" & vbNewline & _
      "                <td bgcolor=""" & strPopUpTableColor & """ align=""center"">" & vbNewline
if strGfxButtons = "1" then
   'Response.Write   "                <input type=""submit"" value=""search"" style=""color:" & strPopUpBorderColor & ";border: 1px solid " & strPopUpBorderColor & "; background-color: " & strPopUpTableColor & "; cursor: hand;"" id=""submit1"" name=""submit1"">" & vbNewline
   Response.Write "                <input src=""" & strImageUrl & "button_go.png"" width=""25"" height=""20"" alt=""Quick Search"" type=""image"" value=""search"" id=""submit1"" name=""submit1"">" & vbNewline
else
   Response.Write "                <input type=""submit"" value=""search"" id=""submit1"" name=""submit1"">" & vbNewline
end if
Response.Write "                </td>" & vbNewline & _
      "              </form>" & vbNewline & _
      "              </tr>" & vbNewline & _
      "              <tr bgcolor=""" & strPopUpTableColor & """>" & vbNewLine & _
      "                <td colspan=""3"" align=""center"" valign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
      "                <a href=""members.asp""" & dWStatus("Display ALL Member Names") & ">All</a> " & vbNewLine
for intChar = 65 to 90
   if intChar <> 90 then
      Response.Write "                <a href=""members.asp?mode=search&M_NAME=" & chr(intChar) & "&initial=1" & strSortMethod & """" & dWStatus("Display Member Names starting with the letter '" & chr(intChar) & "'") & ">" & chr(intChar) & "</a> " & vbNewLine
   else
      Response.Write "                <a href=""members.asp?mode=search&M_NAME=" & chr(intChar) & "&initial=1" & strSortMethod & """" & dWStatus("Display Member Names starting with the letter '" & chr(intChar) & "'") & ">" & chr(intChar) & "</a><br /></font></td>" & vbNewLine
   end if
next
Response.Write "              </tr>" & vbNewLine & _
      "            </table>" & vbNewLine & _
      "          </td>" & vbNewLine & _
      "        </tr>" & vbNewLine & _
      "      </table>" & vbNewLine & _
      "      <br />" & vbNewLine & _
      "      <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
      "        <tr>" & vbNewLine & _
      "          <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
      "            <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""3"">" & vbNewLine & _
      "              <tr>" & vbNewLine
strNames = "UserName=" & srchUName  &_
      "&FirstName=" & srchFName &_
      "&LastName=" & srchLName &_
      "&INITIAL=" &srchInitial & "&"

Response.Write "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>  </font></b></td>" & vbNewLine & _
      "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><a href=""members.asp?" & strNames & "link=sort&mode=search&M_NAME=" & SearchName & "&method="
if Request.QueryString("method") = "nameasc" then Response.Write("namedesc") else Response.Write("nameasc")
Response.Write """" & dWStatus("Sort by Member Name") & "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Member Name</font></b></a></td>" & vbNewLine & _
      "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><a href=""members.asp?" & strNames & "link=sort&mode=search&M_NAME=" & SearchName & "&method="
if Request.QueryString("method") = "levelasc" then Response.Write("leveldesc") else Response.Write("levelasc")
Response.Write """" & dWStatus("Sort by Member Level") & "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Title</font></b></a></td>" & vbNewLine & _
      "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><a href=""members.asp?" & strNames & "link=sort&mode=search&M_NAME=" & SearchName & "&method="
if Request.QueryString("method") = "postsdesc" then Response.Write("postsasc") else Response.Write("postsdesc")
Response.Write """" & dWStatus("Sort by Post Count") & "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Posts</font></b></a></td>" & vbNewLine & _
      "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><a href=""members.asp?" & strNames & "link=sort&mode=search&M_NAME=" & SearchName & "&method="
if Request.QueryString("method") = "lastpostdatedesc" then Response.Write("lastpostdateasc") else Response.Write("lastpostdatedesc")
Response.Write """" & dWStatus("Sort by Last Post Date") & "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Last Post</font></b></a></td>" & vbNewLine & _
      "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><a href=""members.asp?" & strNames & "link=sort&mode=search&M_NAME=" & SearchName & "&method="
if Request.QueryString("method") = "datedesc" then Response.Write("dateasc") else Response.Write("datedesc")
Response.Write """" & dWStatus("Sort by Date of Registration") & "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Member Since</font></b></a></td>" & vbNewLine
if strCountry = "1" then
   Response.Write "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><a href=""members.asp?" & strNames & "link=sort&mode=search&M_NAME=" & SearchName & "&method="
   if Request.QueryString("method") = "countryasc" then Response.Write("countrydesc") else Response.Write("countryasc")
   Response.Write """" & dWStatus("Sort by Country") & "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Country</font></b></a></td>" & vbNewLine
end if
if mlev = 4 or mlev = 3 then
   Response.Write "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><a href=""members.asp?method="
   if Request.QueryString("method") = "lastheredatedesc" then Response.Write("lastheredateasc") else Response.Write("lastheredatedesc")
   Response.Write """" & dWStatus("Sort by Last Visit Date") & "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Last Visit</font></b></a></td>" & vbNewLine
end if
if mlev = 4 or (lcase(strNoCookies) = "1") then
   Response.Write "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """> </font></b></td>" & vbNewLine
end if
Response.Write "              </tr>" & vbNewLine
if iMemberCount = "" then '## No Members Found in DB
   Response.Write "              <tr>" & vbNewLine & _
         "                <td colspan=""" & sGetColspan(9, 8) & """ bgcolor=""" & strForumCellColor & """ ><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><b>No Members Found</b></font></td>" & vbNewLine & _
         "              </tr>" & vbNewLine
else
   mMEMBER_ID = 0
   mM_STATUS = 1
   mM_NAME = 2
   mM_LEVEL = 3
   mM_EMAIL = 4
   mM_COUNTRY = 5
   mM_HOMEPAGE = 6
   mM_AVATAR_URL = 7
   mM_AIM = 8
   mM_ICQ = 9
   mM_MSN = 10
   mM_SKYPE = 11
   mM_GOOGLETALK = 12
   mM_YAHOO = 13
   mM_TITLE = 14
   mM_POSTS = 15
   mM_LASTPOSTDATE = 16
   mM_LASTHEREDATE = 17
   mM_DATE = 18
   mM_PMRECEIVE = 19

   rec = 1
   intI = 0
   for iMember = 0 to iMemberCount
      if (rec = strPageSize + 1) then exit for

      Members_MemberID = arrMemberData(mMEMBER_ID, iMember)
      Members_MemberStatus = arrMemberData(mM_STATUS, iMember)
      Members_MemberName = arrMemberData(mM_NAME, iMember)
      Members_MemberLevel = arrMemberData(mM_LEVEL, iMember)
      Members_MemberEMail = arrMemberData(mM_EMAIL, iMember)
      Members_MemberCountry = arrMemberData(mM_COUNTRY, iMember)
      Members_MemberHomepage = arrMemberData(mM_HOMEPAGE, iMember)
      Members_MemberAvatar = arrMemberData(mM_AVATAR_URL, iMember)
      Members_MemberAIM = arrMemberData(mM_AIM, iMember)
      Members_MemberICQ = arrMemberData(mM_ICQ, iMember)
      Members_MemberMSN = arrMemberData(mM_MSN, iMember)
      Members_MemberSKYPE = arrMemberData(mM_SKYPE, iMember)
      Members_MemberGOOGLETALK = arrMemberData(mM_GOOGLETALK, iMember)
      Members_MemberYAHOO = arrMemberData(mM_YAHOO, iMember)
      Members_MemberTitle = arrMemberData(mM_TITLE, iMember)
      Members_MemberPosts = arrMemberData(mM_POSTS, iMember)
      Members_MemberLastPostDate = arrMemberData(mM_LASTPOSTDATE, iMember)
      Members_MemberLastHereDate = arrMemberData(mM_LASTHEREDATE, iMember)
      Members_MemberDate = arrMemberData(mM_DATE, iMember)
      Members_MemberPMreceive = arrMemberData(mM_PMRECEIVE, iMember)

      if intI = 1 then
         CColor = strAltForumCellColor
      else
         CColor = strForumCellColor
      end if

      Response.Write "              <tr>" & vbNewLine & _
            "                <td bgcolor=""" & CColor & """ align=""center"">" & vbNewLine
      if strUseExtendedProfile then
         Response.Write "                <a href=""pop_profile.asp?mode=display&id=" & Members_MemberID & """" & dWStatus("View " & ChkString(Members_MemberName,"display") & "'s Profile") & ">"
      else
         Response.Write "                <a href=""JavaScript:openWindow3('pop_profile.asp?mode=display&id=" & Members_MemberID & "')""" & dWStatus("View " & ChkString(Members_MemberName,"display") & "'s Profile") & ">"
      end if
'###### Ignore Post Mod Below ######
   If Members_MemberID<>MemberID Then
         If cLng(strIgnorePost)=1 then
            If Members_MemberLevel < 2 Then
               strSql="SELECT I_IGNOREID FROM " & strTablePrefix & "IGNORE_POSTS WHERE I_MEMBERID = " & memberID & " AND I_IGNOREID = " & Members_MemberID
            Set rsI=my_Conn.Execute(strSql)
            If not rsI.EOF then
                  Response.Write "                        <a href=""javascript:openWindow('pop_ignorelist.asp?id=" & Members_MemberID & "&mode=i')""><acronym style=""border:none; text-decoration:none"" title=""Un-ignore This Member""><image src=""" & strImageURL & "unignore.png"" height=""17"" alt=""Un-Ignore This Member"" align=""absmiddle"" hspace=""0"" /></acronym></a>"
               else
                  Response.Write "                        <a href=""javascript:openWindow('pop_ignorelist.asp?id=" & Members_MemberID & "&mode=i')""><acronym style=""border:none; text-decoration:none"" title=""Ignore This Member""><image src=""" & strImageURL & "ignore.png"" height=""17"" alt=""Ignore This Member"" align=""absmiddle"" hspace=""0"" /></acronym></a>"
               end if
            End If
         End If
      End If
'###### Ignore Post Mod Above ######
                     if Members_MemberStatus = 0 then
         Response.Write getCurrentIcon(strIconProfileLocked,"View " & ChkString(Members_MemberName,"display") & "'s Profile","hspace=""0""")
      else
                    if strShowAvatar = 1 and Trim(Members_MemberAvatar) <> "noavatar.gif" then
                        Response.Write  "<img src=""" & Trim(Members_MemberAvatar) & """ width=""100"" height=""100"" & intAvatarWidth*(3/4) & """ & intAvatarHeight*(3/4) & """ border=""" & intAvatarBorder & """>"
                    else
         Response.Write getCurrentIcon(strIconProfile,"View " & ChkString(Members_MemberName,"display") & "'s Profile","hspace=""0""")
                    end if
      end if
      Response.Write "</a><br />" & vbNewLine
      If strDBNTUserName <> "" and Members_MemberPMreceive = "1" and strPMStatus = "1" Then
      Response.Write "                <a href=""privatesend.asp?method=Topic&mname=" & ChkString(Members_MemberName,"display") & """>" & getCurrentIcon(strIconPmprivatemessage,"Send " & ChkString(Members_MemberName,"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
      End If
      if strAIM = "1" and Trim(Members_MemberAIM) <> "" then
         Response.Write "                <a href=""JavaScript:openWindow('pop_messengers.asp?mode=AIM&ID=" & Members_MemberID & "')""" & dWStatus("Send " & ChkString(Members_MemberName,"display") & " an AOL message") & ">" & getCurrentIcon(strIconAIM,"Send " & ChkString(Members_MemberName,"display") & " an AOL message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
      end if
      if strICQ = "1" and Trim(Members_MemberICQ) <> "" then
         Response.Write "                <a href=""JavaScript:openWindow6('pop_messengers.asp?mode=ICQ&ID=" & Members_MemberID & "')""" & dWStatus("Send " & ChkString(Members_MemberName,"display") & " an ICQ Message") & ">" & getCurrentIcon(strIconICQ,"Send " & ChkString(Members_MemberName,"display") & " an ICQ Message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
      end if
      if strMSN = "1" and Trim(Members_MemberMSN) <> "" then
         Response.Write "                <a href=""JavaScript:openWindow('pop_messengers.asp?mode=MSN&ID=" & Members_MemberID & "')""" & dWStatus("Click to see " & ChkString(Members_MemberName,"display") & "'s MSN Messenger address") & ">" & getCurrentIcon(strIconMSNM,"Click to see " & ChkString(Members_MemberName,"display") & "'s MSN Messenger address","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
      end if
     if strGOOGLETALK = "1" and Trim(Members_MemberGOOGLETALK) <> "" then
         Response.Write "                <a href=""JavaScript:openWindow('pop_messengers.asp?mode=GOOGLETALK&ID=" & Members_MemberID & "')""" & dWStatus("Click here to see " & ChkString(Members_MemberName,"display") & "'s Google Talk address") & ">" & getCurrentIcon(strIconGOOGLETALK,"Click here to see " & ChkString(Members_MemberName,"display") & "'s Google Talk address","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
      end if
      if strSKYPE = "1" and Trim(Members_MemberSKYPE) <> "" then
         Response.Write "                <a href=""JavaScript:openWindow('pop_messengers.asp?mode=SKYPE&ID=" & Members_MemberID & "')""" & dWStatus("Click here to send " & ChkString(Members_MemberName,"display") & " a Skype") & ">" & getCurrentIcon(strIconSKYPE,"Klik hier om " & ChkString(Members_MemberName,"display") & " te Skypen","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
      end if

      if strYAHOO = "1" and Trim(Members_MemberYAHOO) <> "" then
         Response.Write "                <a href=""http://edit.yahoo.com/config/send_webmesg?.target=" & ChkString(Members_MemberYAHOO, "urlpath") & "&.src=pg"" target=""_blank""" & dWStatus("Send " & ChkString(Members_MemberName,"display") & " a Yahoo! Message") & ">" & getCurrentIcon(strIconYahoo,"Send " & ChkString(Members_MemberName,"display") & " a Yahoo! Message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
      end if
      if cLng(strUSFriendSwitch) = 1 then

                       Response.Write "                                                      <a href=""JavaScript:openWindow5('pop_user_space.asp?mode=friends&id=" & Members_MemberID & "&action=add&type=0')"">" & getCurrentIcon(strIconFriendAdd,"Add " & ChkString(Members_MemberName,"display") & " to your friends list","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine

               end if

      Response.Write "                </td>" & vbNewLine & _
            "                <td bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
      if strUseExtendedProfile then
         Response.Write "                <span class=""spnMessageText""><a href=""pop_profile.asp?mode=display&id=" & Members_MemberID & """ title=""View " & ChkString(Members_MemberName,"display") & "'s Profile""" & dWStatus("View " & ChkString(Members_MemberName,"display") & "'s Profile") & ">"
      else
         Response.Write "                <span class=""spnMessageText""><a href=""JavaScript:openWindow3('pop_profile.asp?mode=display&id=" & Members_MemberID & "')"" title=""View " & ChkString(Members_MemberName,"display") & "'s Profile""" & dWStatus("View " & ChkString(Members_MemberName,"display") & "'s Profile") & ">"
      end if
      Response.Write ChkString(Members_MemberName,"display") & "</a></span></font></td>" & vbNewLine & _
            "                <td bgcolor=""" & CColor & """ align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & ChkString(getMember_Level(Members_MemberTitle, Members_MemberLevel, Members_MemberPosts),"display") & "</font></td>" & vbNewLine & _
            "                <td bgcolor=""" & CColor & """ align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>"
      if IsNull(Members_MemberPosts) then
         Response.Write("-")
      else
         Response.Write(Members_MemberPosts)
         if strShowRank = 2 or strShowRank = 3 then
            Response.Write("<br />" & getStar_Level(Members_MemberLevel, Members_MemberPosts) & "")
         end if
      end if
      Response.Write "</font></td>" & vbNewLine
      if IsNull(Members_MemberLastPostDate) or Trim(Members_MemberLastPostDate) = "" then
         Response.Write "                <td bgcolor=""" & CColor & """ align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>-</font></td>" & vbNewLine
      else
         Response.Write "                <td bgcolor=""" & CColor & """ align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & ChkDate(Members_MemberLastPostDate,"",false) & "</font></td>" & vbNewLine
      end if
      Response.Write "                <td bgcolor=""" & CColor & """ align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & ChkDate(Members_MemberDate,"",false) & "</font></td>" & vbNewLine
      if strCountry = "1" then
         Response.Write "                <td bgcolor=""" & CColor & """ align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>"
         if trim(Members_MemberCountry) <> "" then Response.Write(Members_MemberCountry & " ") else Response.Write("-")
         Response.Write "</font></td>" & vbNewLine
      end if
      if mlev = 4 or mlev = 3 then
         Response.Write "                <td bgcolor=""" & CColor & """ align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & ChkDate(Members_MemberLastHereDate,"",false) & "</font></td>" & vbNewLine
      end if
      if mlev = 4 or (lcase(strNoCookies) = "1") then
         Response.Write "                <td bgcolor=""" & CColor & """ align=""center""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
         if Members_MemberID = intAdminMemberID OR (Members_MemberLevel = 3 AND MemberID <> intAdminMemberID) then
            '## Do Nothing
         else
            if Members_MemberStatus <> 0 then
               Response.Write "                <a href=""JavaScript:openWindow('pop_lock.asp?mode=Member&MEMBER_ID=" & Members_MemberID & "')""" & dWStatus("Lock Member") & ">" & getCurrentIcon(strIconLock,"Lock Member","hspace=""0""") & "</a>" & vbNewLine
               Response.Write "                <a href=""JavaScript:openWindow('pop_lock.asp?mode=Zap&MEMBER_ID=" & Members_MemberID & "')""" & dWStatus("Zap Member") & ">" & getCurrentIcon(strIconZap,"Zap Member Profile","hspace=""0""") & "</a>" & vbNewLine
            else
               Response.Write "                <a href=""JavaScript:openWindow('pop_open.asp?mode=Member&MEMBER_ID=" & Members_MemberID & "')""" & dWStatus("Un-Lock Member") & ">" & getCurrentIcon(strIconUnlock,"Un-Lock Member","hspace=""0""") & "</a>" & vbNewLine
            end if
         end if
         if (Members_MemberID = intAdminMemberID and MemberID <> intAdminMemberID) OR (Members_MemberLevel = 3 AND MemberID <> intAdminMemberID AND MemberID <> Members_MemberID) then
            Response.Write "                -" & vbNewLine
         else
            if strUseExtendedProfile then
               Response.Write "                <a href=""pop_profile.asp?mode=Modify&ID=" & Members_MemberID & """" & dWStatus("Edit Member") & ">" & getCurrentIcon(strIconPencil,"Edit Member","hspace=""0""") & "</a>" & vbNewLine
            else
               Response.Write "                <a href=""JavaScript:openWindow3('pop_profile.asp?mode=Modify&ID=" & Members_MemberID & "')""" & dWStatus("Edit Member") & ">" & getCurrentIcon(strIconPencil,"Edit Member","hspace=""0""") & "</a>" & vbNewLine
            end if
         end if
'##User Space Mod ## ADD the code below #############################

                        if Members_MemberID = intAdminMemberID OR (Members_MemberLevel = 3 AND MemberID <> intAdminMemberID) then
            '## Do Nothing
         else
            Response.Write "                <a href=""user_space.asp?memid=" & Members_MemberID & """" & dWStatus("Delete Member") & ">" & getCurrentIcon(strIconFolderUserspace,"View Members User Space","hspace=""0""") & "</a>" & vbNewLine
         end if

'## End code addon ## Thats all for this file ##########################
         if Members_MemberID = intAdminMemberID OR (Members_MemberLevel = 3 AND MemberID <> intAdminMemberID) then
            '## Do Nothing
         else
'  ################ Ban IP Mod ##################
            Response.Write "                <a href=""Javascript:openWindow('pop_ban_ip.asp?mode=Member&MEMBER_ID=" & Members_MemberID & "')""" & dWStatus("Un/Ban Member") & ">" & getCurrentIcon("icon_ban.gif|15|15","Un/Ban Member","hspace=""0""") & "</a>" & vbNewLine
' ##############################################
            Response.Write "                <a href=""JavaScript:openWindow('pop_delete.asp?mode=Member&MEMBER_ID=" & Members_MemberID & "')""" & dWStatus("Delete Member") & ">" & getCurrentIcon(strIconTrashcan,"Delete Member","hspace=""0""") & "</a>" & vbNewLine
         end if
         Response.Write "                </font></b></td>" & vbNewLine
      end if
      Response.Write "              </tr>" & vbNewLine

      rec = rec + 1
      intI = intI + 1
      if intI = 2 then intI = 0
   next
end if
Response.Write "            </table>" & vbNewLine & _
      "          </td>" & vbNewLine & _
      "        </tr>" & vbNewLine & _
      "        <tr>" & vbNewLine & _
      "          <td colspan=""2"">" & vbNewLine
if maxpages > 1 then
   Response.Write "            <table border=""0"">" & vbNewLine & _
         "              <tr>" & vbNewLine
   Call Paging2(2)
   Response.Write "              </tr>" & vbNewLine & _
         "            </table>" & vbNewLine
end if
Response.Write "          </td>" & vbNewLine & _
      "        </tr>" & vbNewLine & _
      "      </table>" & vbNewLine & _
      "    <br />" & vbNewLine
WriteFooter
Response.End

sub Paging2(fnum)
   if maxpages > 1 then
      if mypage = "" then
         sPageNumber = 1
      else
         sPageNumber = mypage
      end if
      if SortMethod = "" then
         sMethod = "postsdesc"
      else
         sMethod = SortMethod
      end if

      Response.Write("              <form name=""PageNum" & fnum & """ action=""members.asp"">" & vbNewLine)
      if fnum = 1 then
         Response.Write("                <td align=""right"" valign=""bottom""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine)
      else
         Response.Write("                <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine)
      end if
      if srchInitial <> "" then Response.Write("                <input type=""hidden"" name=""initial"" value=""" & srchInitial & """>" & vbNewLine)
      if sMethod <> "" then Response.Write("                <input type=""hidden"" name=""method"" value=""" & sMethod & """>" & vbNewLine)
      if strMode <> "" then Response.Write("                <input type=""hidden"" name=""mode"" value=""" & strMode & """>" & vbNewLine)
      if searchName <> "" then Response.Write("                <input type=""hidden"" name=""M_NAME"" value=""" & searchName & """>" & vbNewLine)
      if srchUName <> "" then Response.write("                <input type=""hidden"" name=""UserName"" value=""" & srchUName & """>" & vbNewLine)
      if srchFName <> "" then Response.write("                <input type=""hidden"" name=""FirstName"" value=""" & srchFName & """>" & vbNewLine)
      if srchLName <> "" then Response.write("                <input type=""hidden"" name=""LastName"" value=""" & srchLName & """>" & vbNewLine)
      if fnum = 1 then
         Response.Write("                <b>Page: </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine)
         else
         Response.Write("                <b>Members are " & maxpages & " Pages Long: </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine)
      end if
      for counter = 1 to maxpages
         if counter <> cLng(sPageNumber) then
            Response.Write "                <option value=""" & counter &  """>" & counter & "</option>" & vbNewLine
         else
            Response.Write "                <option selected value=""" & counter &  """>" & counter & "</option>" & vbNewLine
         end if
      next
      if fnum = 1 then
         Response.Write("                </select><b> of " & maxPages & "</b>" & vbNewLine)
      else
         Response.Write("                </select>" & vbNewLine)
      end if
      Response.Write("                </font></td>" & vbNewLine)
      Response.Write("              </form>" & vbNewLine)
   end if
end sub

Function sGetColspan(lIN, lOUT)
   if (mlev = "4" or mlev = "3") then lOut = lOut + 2
   If lOut > lIn then
      sGetColspan = lIN
   Else
      sGetColspan = lOUT
   End If
end Function
%>



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 14 December 2013 :  23:19:49  Show Profile
Here you go:


<%
'#################################################################################
'## Snitz Forums 2000 v3.4.07
'#################################################################################
'## Copyright (C) 2000-09 Michael Anderson, Pierre Gorissen,
'##                       Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<%

if strDBNTUserName = "" then
   Err_Msg = "<li>You must be logged in to view the Members List</li>"

   Response.Write "      <table width=""100%"" border=""0"">" & vbNewLine & _
         "        <tr>" & vbNewLine & _
         "          <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
         "          " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
         "          " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Member Information</font></td>" & vbNewLine & _
         "        </tr>" & vbNewLine & _
         "      </table>" & vbNewLine & _
         "      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Was A Problem!</font></p>" & vbNewLine & _
         "      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>You must be logged in to view this page</font></p>" & vbNewLine & _
         "      <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Back to Forum</a></font></p>" & vbNewLine & _
         "      <br />" & vbNewLine
   WriteFooter
   Response.End
end if

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

if trim(chkString(Request("method"),"SQLString")) <> "" then
   SortMethod = trim(chkString(Request("method"),"SQLString"))
   strSortMethod = "&method=" & SortMethod
   strSortMethod2 = "?method=" & SortMethod
end if

if trim(chkString(Request("mode"),"SQLString")) <> "" then
   strMode = trim(chkString(Request("mode"),"SQLString"))
   if strMode <> "search" then strMode = ""
end if

SearchName = trim(Request("M_NAME"))
if SearchName = "" then
   SearchName = trim(Request.Form("M_NAME"))
end if
SearchNameDisplay = Server.HTMLEncode(SearchName)
SearchName = chkString(SearchName, "sqlstring")

if Request("UserName") <> "" then
   if IsNumeric(Request("UserName")) = True then srchUName = cLng(Request("UserName")) else srchUName = "1"
end if
if Request("FirstName") <> "" then
   if IsNumeric(Request("FirstName")) = True then srchFName = cLng(Request("FirstName")) else srchFName = "0"
end if
if Request("LastName") <> "" then
   if IsNumeric(Request("LastName")) = True then srchLName = cLng(Request("LastName")) else srchLName = "0"
end if
if Request("INITIAL") <> "" then
   if IsNumeric(Request("INITIAL")) = True then srchInitial = cLng(Request("INITIAL")) else srchInitial = "0"
end if

mypage = trim(chkString(request("whichpage"),"SQLString"))
if ((mypage = "") or (IsNumeric(mypage) = FALSE)) then mypage = 1
mypage = cLng(mypage)

'New Search Code
If strMode = "search"  and (srchUName = "1" or srchFName = "1" or srchLName = "1" or srchInitial = "1" ) then
   strSql = "SELECT MEMBER_ID, M_STATUS, M_NAME, M_LEVEL, M_EMAIL, M_COUNTRY, M_HOMEPAGE,  M_AVATAR_URL, "
   strSql = strSql & "M_AIM, M_ICQ, M_MSN,  M_GOOGLETALK, M_SKYPE, M_YAHOO, M_TITLE, M_POSTS, M_LASTPOSTDATE, M_LASTHEREDATE, M_DATE, M_PMRECEIVE "
   strSql2 = " FROM " & strMemberTablePrefix & "MEMBERS "
'  if Request.querystring("link") <> "sort" then
      whereSql = " WHERE ("
      tmpSql = ""
      if srchUName = "1" then
         tmpSql = tmpSql & "M_NAME LIKE '%" & SearchName & "%' OR "
         tmpSql = tmpSql & "M_USERNAME LIKE '%" & SearchName & "%'"
      end if
      if srchFName = "1" then
         if srchUName = "1" then
               tmpSql = tmpSql & " OR "
         end if
         tmpSql = tmpSql & "M_FIRSTNAME LIKE '%" & SearchName & "%'"
      end if
      if srchLName = "1" then
         if srchFName = "1" or srchUName = "1" then
            tmpSql = tmpSql & " OR "
         end if
         tmpSql = tmpSql & "M_LASTNAME LIKE '%" & SearchName & "%' "
      end if
      if srchInitial = "1" then
         tmpSQL = "M_NAME LIKE '" & SearchName & "%'"
      end if

      whereSql = whereSql & tmpSql &")"
      Session(strCookieURL & "where_Sql") = whereSql
'  end if

   if Session(strCookieURL & "where_Sql") <> "" then
      whereSql = Session(strCookieURL & "where_Sql")
   else
      whereSql = ""
   end if
   strSQL3 = whereSql
else
   '## Forum_SQL - Get all members
   strSql = "SELECT MEMBER_ID, M_STATUS, M_NAME, M_LEVEL, M_EMAIL, M_COUNTRY, M_HOMEPAGE, M_AVATAR_URL, "
   strSql = strSql & "M_AIM, M_ICQ, M_MSN, M_GOOGLETALK, M_SKYPE, M_YAHOO, M_TITLE, M_POSTS, M_LASTPOSTDATE, M_LASTHEREDATE, M_DATE, M_PMRECEIVE "
   strSql2 = " FROM " & strMemberTablePrefix & "MEMBERS "
   if mlev = 4 then
      strSql3 = " WHERE M_NAME <> 'n/a' "
   else
      strSql3 = " WHERE M_STATUS = " & 1
   end if
end if
select case SortMethod
   case "nameasc"
      strSql4 = " ORDER BY M_NAME ASC"
   case "namedesc"
      strSql4 = " ORDER BY M_NAME DESC"
   case "levelasc"
      strSql4 = " ORDER BY M_TITLE ASC, M_NAME ASC"
   case "leveldesc"
      strSql4 = " ORDER BY M_TITLE DESC, M_NAME ASC"
   case "lastpostdateasc"
      strSql4 = " ORDER BY M_LASTPOSTDATE ASC, M_NAME ASC"
   case "lastpostdatedesc"
      strSql4 = " ORDER BY M_LASTPOSTDATE DESC, M_NAME ASC"
   case "lastheredateasc"
      if mlev = 4 or mlev = 3 then
         strSql4 = " ORDER BY M_LASTHEREDATE ASC, M_NAME ASC"
      else
         strSql4 = " ORDER BY M_POSTS DESC, M_NAME ASC"
      end if
   case "lastheredatedesc"
      if mlev = 4 or mlev = 3 then
         strSql4 = " ORDER BY M_LASTHEREDATE DESC, M_NAME ASC"
      else
         strSql4 = " ORDER BY M_POSTS DESC, M_NAME ASC"
      end if
   case "dateasc"
      strSql4 = " ORDER BY M_DATE ASC, M_NAME ASC"
   case "datedesc"
      strSql4 = " ORDER BY M_DATE DESC, M_NAME ASC"
   case "countryasc"
      strSql4 = " ORDER BY M_COUNTRY ASC, M_NAME ASC"
   case "countrydesc"
      strSql4 = " ORDER BY M_COUNTRY DESC, M_NAME ASC"
   case "postsasc"
      strSql4 = " ORDER BY M_POSTS ASC, M_NAME ASC"
   case else
      strSql4 = " ORDER BY M_POSTS DESC, M_NAME ASC"
end select

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

   '## Forum_SQL - Get the total pagecount
   strSql1 = "SELECT COUNT(MEMBER_ID) AS PAGECOUNT "

   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 rs = Server.CreateObject("ADODB.Recordset")
      rs.open strSql & strSql2 & strSql3 & strSql4 & strSql5, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
         arrMemberData = rs.GetRows(intGetRows)
         iMemberCount = UBound(arrMemberData, 2)
      rs.close
      set rs = nothing
   else
      iMemberCount = ""
   end if

else 'end MySql specific code
   set rs = Server.CreateObject("ADODB.Recordset")
   rs.cachesize = strPageSize
   rs.open strSql & strSql2 & strSql3 & strSql4, my_Conn, adOpenStatic
      If not (rs.EOF or rs.BOF) then
         rs.movefirst
         rs.pagesize = strPageSize
         rs.absolutepage = mypage '**
         maxpages = cLng(rs.pagecount)
         arrMemberData = rs.GetRows(strPageSize)
         iMemberCount = UBound(arrMemberData, 2)
      else
         iMemberCount = ""
      end if
   rs.Close
   set rs = nothing
end if

Response.Write "      <table width=""100%"" border=""0"">" & vbNewLine & _
      "        <tr>" & vbNewLine & _
      "          <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
      "          " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
      "          " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Member Information</font></td>" & vbNewLine & _
      "          <td align=""right"" valign=""bottom"">" & vbNewLine
if maxpages > 1 then
   Response.Write "            <table border=""0"" align=""right"">" & vbNewLine & _
         "              <tr>" & vbNewLine
   Call Paging2(1)
   Response.Write "              </tr>" & vbNewLine & _
         "            </table>" & vbNewLine
else
   Response.Write "           " & vbNewLine
end if
Response.Write "          </td>" & vbNewLine & _
      "        </tr>" & vbNewLine & _
      "      </table>" & vbNewLine

Response.Write "      <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewline & _
      "        <tr>" & vbNewline & _
      "          <td bgcolor=""" & strPopUpBorderColor & """>" & vbNewline & _
      "            <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewline & _
      "              <tr>" & vbNewline & _
      "              <form action=""members.asp" & strSortMethod2 & """ method=""post"" name=""SearchMembers"">" & vbNewline & _
      "                <td bgcolor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Search:</b> " & vbNewline & _
      "                <input type=""checkbox"" name=""UserName"" value=""1"""
if ((srchUName <> "")  or (srchUName = "" and srchFName = "" and srchLName = "") ) then Response.Write(" checked")
Response.Write ">User Names" & vbNewline
if strFullName = "1" then
   Response.Write "                  <input type=""checkbox"" name=""FirstName"" value=""1""" & chkCheckbox(srchFName,1,true) & ">First Name" & vbNewline & _
         "                  <input type=""checkbox"" name=""LastName"" value=""1""" & chkCheckbox(srchLName,1,true) & ">Last Name" & vbNewline
end if
Response.Write "                </font></td>" & vbNewline & _
      "                <td bgcolor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>For:</b> " & vbNewline & _
      "                <input type=""text"" name=""M_NAME"" value=""" & SearchNameDisplay & """></font></td>" & vbNewline & _
      "                <input type=""hidden"" name=""mode"" value=""search"">" & vbNewline & _
      "                <input type=""hidden"" name=""initial"" value=""0"">" & vbNewline & _
      "                <td bgcolor=""" & strPopUpTableColor & """ align=""center"">" & vbNewline
if strGfxButtons = "1" then
   'Response.Write   "                <input type=""submit"" value=""search"" style=""color:" & strPopUpBorderColor & ";border: 1px solid " & strPopUpBorderColor & "; background-color: " & strPopUpTableColor & "; cursor: hand;"" id=""submit1"" name=""submit1"">" & vbNewline
   Response.Write "                <input src=""" & strImageUrl & "button_go.png"" width=""25"" height=""20"" alt=""Quick Search"" type=""image"" value=""search"" id=""submit1"" name=""submit1"">" & vbNewline
else
   Response.Write "                <input type=""submit"" value=""search"" id=""submit1"" name=""submit1"">" & vbNewline
end if
Response.Write "                </td>" & vbNewline & _
      "              </form>" & vbNewline & _
      "              </tr>" & vbNewline & _
      "              <tr bgcolor=""" & strPopUpTableColor & """>" & vbNewLine & _
      "                <td colspan=""3"" align=""center"" valign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
      "                <a href=""members.asp""" & dWStatus("Display ALL Member Names") & ">All</a> " & vbNewLine
for intChar = 65 to 90
   if intChar <> 90 then
      Response.Write "                <a href=""members.asp?mode=search&M_NAME=" & chr(intChar) & "&initial=1" & strSortMethod & """" & dWStatus("Display Member Names starting with the letter '" & chr(intChar) & "'") & ">" & chr(intChar) & "</a> " & vbNewLine
   else
      Response.Write "                <a href=""members.asp?mode=search&M_NAME=" & chr(intChar) & "&initial=1" & strSortMethod & """" & dWStatus("Display Member Names starting with the letter '" & chr(intChar) & "'") & ">" & chr(intChar) & "</a><br /></font></td>" & vbNewLine
   end if
next
Response.Write "              </tr>" & vbNewLine & _
      "            </table>" & vbNewLine & _
      "          </td>" & vbNewLine & _
      "        </tr>" & vbNewLine & _
      "      </table>" & vbNewLine & _
      "      <br />" & vbNewLine & _
      "      <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
      "        <tr>" & vbNewLine & _
      "          <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
      "            <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""3"">" & vbNewLine & _
      "              <tr>" & vbNewLine
strNames = "UserName=" & srchUName  &_
      "&FirstName=" & srchFName &_
      "&LastName=" & srchLName &_
      "&INITIAL=" &srchInitial & "&"

Response.Write "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>  </font></b></td>" & vbNewLine & _
      "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><a href=""members.asp?" & strNames & "link=sort&mode=search&M_NAME=" & SearchName & "&method="
if Request.QueryString("method") = "nameasc" then Response.Write("namedesc") else Response.Write("nameasc")
Response.Write """" & dWStatus("Sort by Member Name") & "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Member Name</font></b></a></td>" & vbNewLine & _
      "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><a href=""members.asp?" & strNames & "link=sort&mode=search&M_NAME=" & SearchName & "&method="
if Request.QueryString("method") = "levelasc" then Response.Write("leveldesc") else Response.Write("levelasc")
Response.Write """" & dWStatus("Sort by Member Level") & "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Title</font></b></a></td>" & vbNewLine & _
      "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><a href=""members.asp?" & strNames & "link=sort&mode=search&M_NAME=" & SearchName & "&method="
if Request.QueryString("method") = "postsdesc" then Response.Write("postsasc") else Response.Write("postsdesc")
Response.Write """" & dWStatus("Sort by Post Count") & "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Posts</font></b></a></td>" & vbNewLine & _
      "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><a href=""members.asp?" & strNames & "link=sort&mode=search&M_NAME=" & SearchName & "&method="
if Request.QueryString("method") = "lastpostdatedesc" then Response.Write("lastpostdateasc") else Response.Write("lastpostdatedesc")
Response.Write """" & dWStatus("Sort by Last Post Date") & "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Last Post</font></b></a></td>" & vbNewLine & _
      "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><a href=""members.asp?" & strNames & "link=sort&mode=search&M_NAME=" & SearchName & "&method="
if Request.QueryString("method") = "datedesc" then Response.Write("dateasc") else Response.Write("datedesc")
Response.Write """" & dWStatus("Sort by Date of Registration") & "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Member Since</font></b></a></td>" & vbNewLine
if strCountry = "1" then
   Response.Write "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><a href=""members.asp?" & strNames & "link=sort&mode=search&M_NAME=" & SearchName & "&method="
   if Request.QueryString("method") = "countryasc" then Response.Write("countrydesc") else Response.Write("countryasc")
   Response.Write """" & dWStatus("Sort by Country") & "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Country</font></b></a></td>" & vbNewLine
end if
if mlev = 4 or mlev = 3 then
   Response.Write "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><a href=""members.asp?method="
   if Request.QueryString("method") = "lastheredatedesc" then Response.Write("lastheredateasc") else Response.Write("lastheredatedesc")
   Response.Write """" & dWStatus("Sort by Last Visit Date") & "><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Last Visit</font></b></a></td>" & vbNewLine
end if
if mlev = 4 or (lcase(strNoCookies) = "1") then
   Response.Write "                <td align=""center"" bgcolor=""" & strHeadCellColor & """><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """> </font></b></td>" & vbNewLine
end if
Response.Write "              </tr>" & vbNewLine
if iMemberCount = "" then '## No Members Found in DB
   Response.Write "              <tr>" & vbNewLine & _
         "                <td colspan=""" & sGetColspan(9, 8) & """ bgcolor=""" & strForumCellColor & """ ><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><b>No Members Found</b></font></td>" & vbNewLine & _
         "              </tr>" & vbNewLine
else
   mMEMBER_ID = 0
   mM_STATUS = 1
   mM_NAME = 2
   mM_LEVEL = 3
   mM_EMAIL = 4
   mM_COUNTRY = 5
   mM_HOMEPAGE = 6
   mM_AVATAR_URL = 7
   mM_AIM = 8
   mM_ICQ = 9
   mM_MSN = 10
   mM_SKYPE = 11
   mM_GOOGLETALK = 12
   mM_YAHOO = 13
   mM_TITLE = 14
   mM_POSTS = 15
   mM_LASTPOSTDATE = 16
   mM_LASTHEREDATE = 17
   mM_DATE = 18
   mM_PMRECEIVE = 19

   rec = 1
   intI = 0
   for iMember = 0 to iMemberCount
      if (rec = strPageSize + 1) then exit for

      Members_MemberID = arrMemberData(mMEMBER_ID, iMember)
      Members_MemberStatus = arrMemberData(mM_STATUS, iMember)
      Members_MemberName = arrMemberData(mM_NAME, iMember)
      Members_MemberLevel = arrMemberData(mM_LEVEL, iMember)
      Members_MemberEMail = arrMemberData(mM_EMAIL, iMember)
      Members_MemberCountry = arrMemberData(mM_COUNTRY, iMember)
      Members_MemberHomepage = arrMemberData(mM_HOMEPAGE, iMember)
      Members_MemberAvatar = arrMemberData(mM_AVATAR_URL, iMember)
      Members_MemberAIM = arrMemberData(mM_AIM, iMember)
      Members_MemberICQ = arrMemberData(mM_ICQ, iMember)
      Members_MemberMSN = arrMemberData(mM_MSN, iMember)
      Members_MemberSKYPE = arrMemberData(mM_SKYPE, iMember)
      Members_MemberGOOGLETALK = arrMemberData(mM_GOOGLETALK, iMember)
      Members_MemberYAHOO = arrMemberData(mM_YAHOO, iMember)
      Members_MemberTitle = arrMemberData(mM_TITLE, iMember)
      Members_MemberPosts = arrMemberData(mM_POSTS, iMember)
      Members_MemberLastPostDate = arrMemberData(mM_LASTPOSTDATE, iMember)
      Members_MemberLastHereDate = arrMemberData(mM_LASTHEREDATE, iMember)
      Members_MemberDate = arrMemberData(mM_DATE, iMember)
      Members_MemberPMreceive = arrMemberData(mM_PMRECEIVE, iMember)

      if intI = 1 then
         CColor = strAltForumCellColor
      else
         CColor = strForumCellColor
      end if
      Response.Write "              <tr>" & vbNewLine & _
        "                <td bgcolor=""" & CColor & """ align=""center"">" & vbNewLine
      if strUseExtendedProfile then
        Response.Write "                <a href=""pop_profile.asp?mode=display&id=" & Members_MemberID & """" & dWStatus("View " & ChkString(Members_MemberName,"display") & "'s Profile") & ">"
      else
         Response.Write "                <a href=""JavaScript:openWindow3('pop_profile.asp?mode=display&id=" & Members_MemberID & "')""" & dWStatus("View " & ChkString(Members_MemberName,"display") & "'s Profile") & ">"
      end if
      if Members_MemberStatus = 0 then
        Response.Write getCurrentIcon(strIconProfileLocked,"View " & ChkString(Members_MemberName,"display") & "'s Profile","hspace=""0""")
      else
				if strShowAvatar = 1 and Trim(Members_MemberAvatar) <> "noavatar.gif" then
					Response.Write  "<img src=""" & Trim(Members_MemberAvatar) & """ width=""100"" height=""100"" & intAvatarWidth*(3/4) & """ & intAvatarHeight*(3/4) & """ border=""" & intAvatarBorder & """>"
				else
					Response.Write getCurrentIcon(strIconProfile,"View " & ChkString(Members_MemberName,"display") & "'s Profile","hspace=""0""")
				end if
      end if
      Response.Write "</a><br />" & vbNewLine
      If strDBNTUserName <> "" and Members_MemberPMreceive = "1" and strPMStatus = "1" Then
      	Response.Write "                <a href=""privatesend.asp?method=Topic&mname=" & ChkString(Members_MemberName,"display") & """>" & getCurrentIcon(strIconPmprivatemessage,"Send " & ChkString(Members_MemberName,"display") & " a Private Message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
      End If
      if strAIM = "1" and Trim(Members_MemberAIM) <> "" then
      	Response.Write "                <a href=""JavaScript:openWindow('pop_messengers.asp?mode=AIM&ID=" & Members_MemberID & "')""" & dWStatus("Send " & ChkString(Members_MemberName,"display") & " an AOL message") & ">" & getCurrentIcon(strIconAIM,"Send " & ChkString(Members_MemberName,"display") & " an AOL message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
      end if
      if strICQ = "1" and Trim(Members_MemberICQ) <> "" then
      	Response.Write "                <a href=""JavaScript:openWindow6('pop_messengers.asp?mode=ICQ&ID=" & Members_MemberID & "')""" & dWStatus("Send " & ChkString(Members_MemberName,"display") & " an ICQ Message") & ">" & getCurrentIcon(strIconICQ,"Send " & ChkString(Members_MemberName,"display") & " an ICQ Message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
      end if
      if strMSN = "1" and Trim(Members_MemberMSN) <> "" then
      	Response.Write "                <a href=""JavaScript:openWindow('pop_messengers.asp?mode=MSN&ID=" & Members_MemberID & "')""" & dWStatus("Click to see " & ChkString(Members_MemberName,"display") & "'s MSN Messenger address") & ">" & getCurrentIcon(strIconMSNM,"Click to see " & ChkString(Members_MemberName,"display") & "'s MSN Messenger address","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
      end if
			if strGOOGLETALK = "1" and Trim(Members_MemberGOOGLETALK) <> "" then
      	Response.Write "                <a href=""JavaScript:openWindow('pop_messengers.asp?mode=GOOGLETALK&ID=" & Members_MemberID & "')""" & dWStatus("Click here to see " & ChkString(Members_MemberName,"display") & "'s Google Talk address") & ">" & getCurrentIcon(strIconGOOGLETALK,"Click here to see " & ChkString(Members_MemberName,"display") & "'s Google Talk address","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
      end if
      if strSKYPE = "1" and Trim(Members_MemberSKYPE) <> "" then
         Response.Write "                <a href=""JavaScript:openWindow('pop_messengers.asp?mode=SKYPE&ID=" & Members_MemberID & "')""" & dWStatus("Click here to send " & ChkString(Members_MemberName,"display") & " a Skype") & ">" & getCurrentIcon(strIconSKYPE,"Klik hier om " & ChkString(Members_MemberName,"display") & " te Skypen","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
      end if
      if strYAHOO = "1" and Trim(Members_MemberYAHOO) <> "" then
         Response.Write "                <a href=""http://edit.yahoo.com/config/send_webmesg?.target=" & ChkString(Members_MemberYAHOO, "urlpath") & "&.src=pg"" target=""_blank""" & dWStatus("Send " & ChkString(Members_MemberName,"display") & " a Yahoo! Message") & ">" & getCurrentIcon(strIconYahoo,"Send " & ChkString(Members_MemberName,"display") & " a Yahoo! Message","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
      end if
      if cLng(strUSFriendSwitch) = 1 then
				Response.Write "                                                      <a href=""JavaScript:openWindow5('pop_user_space.asp?mode=friends&id=" & Members_MemberID & "&action=add&type=0')"">" & getCurrentIcon(strIconFriendAdd,"Add " & ChkString(Members_MemberName,"display") & " to your friends list","align=""absmiddle"" hspace=""0""") & "</a>" & vbNewLine
			end if
			'###### Ignore Post Mod Below ######
			If Members_MemberID<>MemberID Then
				If cLng(strIgnorePost)=1 then
					If Members_MemberLevel < 2 Then
						strSql="SELECT I_IGNOREID FROM " & strTablePrefix & "IGNORE_POSTS WHERE I_MEMBERID = " & memberID & " AND I_IGNOREID = " & Members_MemberID
						Set rsI=my_Conn.Execute(strSql)
						If not rsI.EOF then
							Response.Write "                        <a href=""javascript:openWindow('pop_ignorelist.asp?id=" & Members_MemberID & "&mode=i')""><acronym style=""border:none; text-decoration:none"" title=""Un-ignore This Member""><image src=""" & strImageURL & "unignore.png"" height=""17"" alt=""Un-Ignore This Member"" align=""absmiddle"" hspace=""0"" /></acronym></a>"
						else
							Response.Write "                        <a href=""javascript:openWindow('pop_ignorelist.asp?id=" & Members_MemberID & "&mode=i')""><acronym style=""border:none; text-decoration:none"" title=""Ignore This Member""><image src=""" & strImageURL & "ignore.png"" height=""17"" alt=""Ignore This Member"" align=""absmiddle"" hspace=""0"" /></acronym></a>"
						end if
					End If
				End If
			End If
			'###### Ignore Post Mod Above ######
      Response.Write "                </td>" & vbNewLine & _
            "                <td bgcolor=""" & CColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
      if strUseExtendedProfile then
         Response.Write "                <span class=""spnMessageText""><a href=""pop_profile.asp?mode=display&id=" & Members_MemberID & """ title=""View " & ChkString(Members_MemberName,"display") & "'s Profile""" & dWStatus("View " & ChkString(Members_MemberName,"display") & "'s Profile") & ">"
      else
         Response.Write "                <span class=""spnMessageText""><a href=""JavaScript:openWindow3('pop_profile.asp?mode=display&id=" & Members_MemberID & "')"" title=""View " & ChkString(Members_MemberName,"display") & "'s Profile""" & dWStatus("View " & ChkString(Members_MemberName,"display") & "'s Profile") & ">"
      end if
      Response.Write ChkString(Members_MemberName,"display") & "</a></span></font></td>" & vbNewLine & _
            "                <td bgcolor=""" & CColor & """ align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & ChkString(getMember_Level(Members_MemberTitle, Members_MemberLevel, Members_MemberPosts),"display") & "</font></td>" & vbNewLine & _
            "                <td bgcolor=""" & CColor & """ align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>"
      if IsNull(Members_MemberPosts) then
         Response.Write("-")
      else
         Response.Write(Members_MemberPosts)
         if strShowRank = 2 or strShowRank = 3 then
            Response.Write("<br />" & getStar_Level(Members_MemberLevel, Members_MemberPosts) & "")
         end if
      end if
      Response.Write "</font></td>" & vbNewLine
      if IsNull(Members_MemberLastPostDate) or Trim(Members_MemberLastPostDate) = "" then
         Response.Write "                <td bgcolor=""" & CColor & """ align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>-</font></td>" & vbNewLine
      else
         Response.Write "                <td bgcolor=""" & CColor & """ align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & ChkDate(Members_MemberLastPostDate,"",false) & "</font></td>" & vbNewLine
      end if
      Response.Write "                <td bgcolor=""" & CColor & """ align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & ChkDate(Members_MemberDate,"",false) & "</font></td>" & vbNewLine
      if strCountry = "1" then
         Response.Write "                <td bgcolor=""" & CColor & """ align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>"
         if trim(Members_MemberCountry) <> "" then Response.Write(Members_MemberCountry & " ") else Response.Write("-")
         Response.Write "</font></td>" & vbNewLine
      end if
      if mlev = 4 or mlev = 3 then
         Response.Write "                <td bgcolor=""" & CColor & """ align=""center"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & ChkDate(Members_MemberLastHereDate,"",false) & "</font></td>" & vbNewLine
      end if
      if mlev = 4 or (lcase(strNoCookies) = "1") then
         Response.Write "                <td bgcolor=""" & CColor & """ align=""center""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
         if Members_MemberID = intAdminMemberID OR (Members_MemberLevel = 3 AND MemberID <> intAdminMemberID) then
            '## Do Nothing
         else
            if Members_MemberStatus <> 0 then
               Response.Write "                <a href=""JavaScript:openWindow('pop_lock.asp?mode=Member&MEMBER_ID=" & Members_MemberID & "')""" & dWStatus("Lock Member") & ">" & getCurrentIcon(strIconLock,"Lock Member","hspace=""0""") & "</a>" & vbNewLine
               Response.Write "                <a href=""JavaScript:openWindow('pop_lock.asp?mode=Zap&MEMBER_ID=" & Members_MemberID & "')""" & dWStatus("Zap Member") & ">" & getCurrentIcon(strIconZap,"Zap Member Profile","hspace=""0""") & "</a>" & vbNewLine
            else
               Response.Write "                <a href=""JavaScript:openWindow('pop_open.asp?mode=Member&MEMBER_ID=" & Members_MemberID & "')""" & dWStatus("Un-Lock Member") & ">" & getCurrentIcon(strIconUnlock,"Un-Lock Member","hspace=""0""") & "</a>" & vbNewLine
            end if
         end if
         if (Members_MemberID = intAdminMemberID and MemberID <> intAdminMemberID) OR (Members_MemberLevel = 3 AND MemberID <> intAdminMemberID AND MemberID <> Members_MemberID) then
            Response.Write "                -" & vbNewLine
         else
            if strUseExtendedProfile then
               Response.Write "                <a href=""pop_profile.asp?mode=Modify&ID=" & Members_MemberID & """" & dWStatus("Edit Member") & ">" & getCurrentIcon(strIconPencil,"Edit Member","hspace=""0""") & "</a>" & vbNewLine
            else
               Response.Write "                <a href=""JavaScript:openWindow3('pop_profile.asp?mode=Modify&ID=" & Members_MemberID & "')""" & dWStatus("Edit Member") & ">" & getCurrentIcon(strIconPencil,"Edit Member","hspace=""0""") & "</a>" & vbNewLine
            end if
         end if
'##User Space Mod ## ADD the code below #############################

                        if Members_MemberID = intAdminMemberID OR (Members_MemberLevel = 3 AND MemberID <> intAdminMemberID) then
            '## Do Nothing
         else
            Response.Write "                <a href=""user_space.asp?memid=" & Members_MemberID & """" & dWStatus("Delete Member") & ">" & getCurrentIcon(strIconFolderUserspace,"View Members User Space","hspace=""0""") & "</a>" & vbNewLine
         end if

'## End code addon ## Thats all for this file ##########################
         if Members_MemberID = intAdminMemberID OR (Members_MemberLevel = 3 AND MemberID <> intAdminMemberID) then
            '## Do Nothing
         else
'  ################ Ban IP Mod ##################
            Response.Write "                <a href=""Javascript:openWindow('pop_ban_ip.asp?mode=Member&MEMBER_ID=" & Members_MemberID & "')""" & dWStatus("Un/Ban Member") & ">" & getCurrentIcon("icon_ban.gif|15|15","Un/Ban Member","hspace=""0""") & "</a>" & vbNewLine
' ##############################################
            Response.Write "                <a href=""JavaScript:openWindow('pop_delete.asp?mode=Member&MEMBER_ID=" & Members_MemberID & "')""" & dWStatus("Delete Member") & ">" & getCurrentIcon(strIconTrashcan,"Delete Member","hspace=""0""") & "</a>" & vbNewLine
         end if
         Response.Write "                </font></b></td>" & vbNewLine
      end if
      Response.Write "              </tr>" & vbNewLine

      rec = rec + 1
      intI = intI + 1
      if intI = 2 then intI = 0
   next
end if
Response.Write "            </table>" & vbNewLine & _
      "          </td>" & vbNewLine & _
      "        </tr>" & vbNewLine & _
      "        <tr>" & vbNewLine & _
      "          <td colspan=""2"">" & vbNewLine
if maxpages > 1 then
   Response.Write "            <table border=""0"">" & vbNewLine & _
         "              <tr>" & vbNewLine
   Call Paging2(2)
   Response.Write "              </tr>" & vbNewLine & _
         "            </table>" & vbNewLine
end if
Response.Write "          </td>" & vbNewLine & _
      "        </tr>" & vbNewLine & _
      "      </table>" & vbNewLine & _
      "    <br />" & vbNewLine
WriteFooter
Response.End

sub Paging2(fnum)
   if maxpages > 1 then
      if mypage = "" then
         sPageNumber = 1
      else
         sPageNumber = mypage
      end if
      if SortMethod = "" then
         sMethod = "postsdesc"
      else
         sMethod = SortMethod
      end if

      Response.Write("              <form name=""PageNum" & fnum & """ action=""members.asp"">" & vbNewLine)
      if fnum = 1 then
         Response.Write("                <td align=""right"" valign=""bottom""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine)
      else
         Response.Write("                <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine)
      end if
      if srchInitial <> "" then Response.Write("                <input type=""hidden"" name=""initial"" value=""" & srchInitial & """>" & vbNewLine)
      if sMethod <> "" then Response.Write("                <input type=""hidden"" name=""method"" value=""" & sMethod & """>" & vbNewLine)
      if strMode <> "" then Response.Write("                <input type=""hidden"" name=""mode"" value=""" & strMode & """>" & vbNewLine)
      if searchName <> "" then Response.Write("                <input type=""hidden"" name=""M_NAME"" value=""" & searchName & """>" & vbNewLine)
      if srchUName <> "" then Response.write("                <input type=""hidden"" name=""UserName"" value=""" & srchUName & """>" & vbNewLine)
      if srchFName <> "" then Response.write("                <input type=""hidden"" name=""FirstName"" value=""" & srchFName & """>" & vbNewLine)
      if srchLName <> "" then Response.write("                <input type=""hidden"" name=""LastName"" value=""" & srchLName & """>" & vbNewLine)
      if fnum = 1 then
         Response.Write("                <b>Page: </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine)
         else
         Response.Write("                <b>Members are " & maxpages & " Pages Long: </b><select name=""whichpage"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine)
      end if
      for counter = 1 to maxpages
         if counter <> cLng(sPageNumber) then
            Response.Write "                <option value=""" & counter &  """>" & counter & "</option>" & vbNewLine
         else
            Response.Write "                <option selected value=""" & counter &  """>" & counter & "</option>" & vbNewLine
         end if
      next
      if fnum = 1 then
         Response.Write("                </select><b> of " & maxPages & "</b>" & vbNewLine)
      else
         Response.Write("                </select>" & vbNewLine)
      end if
      Response.Write("                </font></td>" & vbNewLine)
      Response.Write("              </form>" & vbNewLine)
   end if
end sub

Function sGetColspan(lIN, lOUT)
   if (mlev = "4" or mlev = "3") then lOut = lOut + 2
   If lOut > lIn then
      sGetColspan = lIN
   Else
      sGetColspan = lOUT
   End If
end Function
%>
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 15 December 2013 :  00:46:21  Show Profile

That worked PERFECT!

Thank you so much, Carefree!

Sure do appreciate you!



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 2.96 seconds. Powered By: Snitz Forums 2000 Version 3.4.07