<% '################################################################################# '## Copyright (C) 2000 Michael Anderson and Pierre Gorissen '## '## 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 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 support forums at: '## http://forum.snitz.com '## '## Correspondence and Marketing Questions can be sent to: '## reinhold@bigfoot.com '## '## or '## '## Snitz Communications '## C/O: Michael Anderson '## PO Box 200 '## Harpswell, ME 04079 '################################################################################# if Request.QueryString("TOPIC_ID") = "" and Request.QueryString("mode") <> "getIP" and Request.Form("Method_Type") <> "login" and Request.Form("Method_Type") <> "logout" then Response.Redirect "default.asp" Response.End end if %> <% select case Request.QueryString("mode") case "getIP" %> <% DisplayIP IP = "" Title = "" %> <% Response.End case else '## Do Nothing - Continue end select Member_ID = getNewMemberNumber() if (strAuthType = "nt") then set my_Conn = Server.CreateObject("ADODB.Connection") my_Conn.Open strConnString call NTauthenticate() if (ChkAccountReg() = "1") then call NTUser() end if end if %> <% if strPrivateForums = "1" then if Request("Method_Type") = "" then chkUser4() end if end if if (mLev = 4) or (chkForumModerator(Request.QueryString("FORUM_ID"), ChkString(STRdbntUserName, "decode"))= "1") or (lcase(strNoCookies) = "1") then AdminAllowed = 1 else AdminAllowed = 0 end if ' ############################### Poll Mod ############################# if Request.QueryString("pollresults") <> "1" and (Request.QueryString("whichpage") = "" or Request.QueryString("whichpage") = "1") and Request.Cookies("poll")(""&Request.QueryString("TOPIC_ID")&"") = Request.QueryString("TOPIC_ID") and Request.Form("Method_Type") <> "Vote" then Response.Redirect "topic.asp?TOPIC_ID=" & Request.QueryString("TOPIC_ID") & "&FORUM_ID=" & Request.QueryString("FORUM_ID") & "&CAT_ID=" & Request.QueryString("CAT_ID") & "&Topic_Title=" & ChkString(Request.QueryString("Topic_Title"),"urlpath") & "&Forum_Title=" & ChkString(Request.QueryString("Forum_Title"),"urlpath") & "&pollresults=1" end if ' ###################################################################### '## Forum_SQL - Find out if the Category is Locked or Un-Locked and if it Exists strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS " strSql = strSql & " FROM " & strTablePrefix & "CATEGORY " strSql = strSql & " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & Request.QueryString("CAT_ID") set rsCStatus = my_Conn.Execute (StrSql) '## Forum_SQL - Find out if the Forum is Locked or Un-Locked and if it Exists strSql = "SELECT " & strTablePrefix & "FORUM.F_STATUS " strSql = strSql & " FROM " & strTablePrefix & "FORUM " strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & Request.QueryString("FORUM_ID") set rsFStatus = my_Conn.Execute (StrSql) '## Forum_SQL - Find out if the Topic is Locked or Un-Locked and if it Exists strSql = "SELECT " & strTablePrefix & "TOPICS.T_STATUS " strSql = strSql & " FROM " & strTablePrefix & "TOPICS " strSql = strSql & " WHERE " & strTablePrefix & "TOPICS.TOPIC_ID = " & Request.QueryString("TOPIC_ID") set rsTStatus = my_Conn.Execute (StrSql) if rsCStatus.EOF or rsCStatus.BOF or rsFStatus.EOF or rsFStatus.BOF or rsTStatus.EOF or rsTStatus.BOF then Response.Redirect(strForumURL) else mypage = request("whichpage") if mypage = "" then mypage = 1 end if mySQL = request("strSql") if mySQL = "" then mySQL = SQLtemp end if '## Forum_SQL - Get all Forum Categories From DB strSql = "SELECT CAT_ID " strSql = strSql & " FROM " & strTablePrefix & "CATEGORY" set rsCat = my_Conn.Execute (StrSql) %> <% '## Forum_SQL strSql ="SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.M_ICQ, " & strMemberTablePrefix & "MEMBERS.M_YAHOO, " & strMemberTablePrefix & "MEMBERS.M_AIM, " & strMemberTablePrefix & "MEMBERS.M_TITLE, " & strMemberTablePrefix & "MEMBERS.M_Homepage, " & strMemberTablePrefix & "MEMBERS.M_LEVEL, " & strMemberTablePrefix & "MEMBERS.M_POSTS, " & strMemberTablePrefix & "MEMBERS.M_COUNTRY, " & strTablePrefix & "REPLY.REPLY_ID, " & strTablePrefix & "REPLY.R_AUTHOR, " & strTablePrefix & "REPLY.TOPIC_ID, " & strTablePrefix & "REPLY.R_MESSAGE, " & strTablePrefix & "REPLY.R_DATE " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "REPLY " strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "REPLY.R_AUTHOR " strSql = strSql & " AND TOPIC_ID = " & Request.QueryString("TOPIC_ID") & " " strSql = strSql & " ORDER BY " & strTablePrefix & "REPLY.R_DATE" if strDBType = "mysql" then 'MySql specific code '## Forum_SQL - Get the total pagecount strSql2 = "SELECT COUNT(" & strTablePrefix & "REPLY.TOPIC_ID) AS REPLYCOUNT " strSql2 = strSql2 & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "REPLY " strSql2 = strSql2 & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "REPLY.R_AUTHOR " strSql2 = strSql2 & " AND TOPIC_ID = " & Request.QueryString("TOPIC_ID") & " " set rsCount = my_Conn.Execute(strSql2) if not rsCount.eof then maxpages = (rsCount("REPLYCOUNT") \ strPageSize ) if rsCount("REPLYCOUNT") mod strPageSize <> 0 then maxpages = maxpages + 1 end if else maxpages = 1 end if set rs = Server.CreateObject("ADODB.Recordset") ' rs.cachesize= strPageSize rs.open strSql, my_Conn, 3 if not(rs.EOF) then rs.movefirst end if else 'end MySql specific code set rs = Server.CreateObject("ADODB.Recordset") rs.cachesize = strPageSize rs.open strSql, my_Conn, 3 If not (rs.EOF or rs.BOF) then '## No replies found in DB rs.movefirst rs.pagesize = strPageSize rs.absolutepage = mypage '** maxpages = cint(rs.pagecount) end if end if i = 0 ' ############################## Poll Mod ############################# if Request.Form("Method_Type") = "Vote" and Request.Form("R1") = "" then %>

 

    You must choose an answer in order for your vote to be counted!

>Go Back To Vote

<% Response.End end if if Request.Form("Method_Type") = "Vote" and request.cookies("poll")(""&Request.QueryString("TOPIC_ID")&"") = Request.QueryString("TOPIC_ID") then %>

 

    You may only vote once per poll!

>Go Back and click on "View Results" to see the totals.

<% Response.End end if if Request.Form("Method_Type") = "Vote" and trim(Request.Form("R1")) <> "" then nNumber = Request.Form("R1") '## Forum_SQL - strSql = "UPDATE " & strTablePrefix & "TOPICS " strSql = strSql & " SET count" & nNumber & " = count" & nNumber & " +1" strSql = strSql & ", T_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'" strSql = strSql & " WHERE TOPIC_ID = " & Request.Form("TOPIC_ID") my_Conn.Execute (strSql) if Request.Form("Method_Type") = "Vote" and trim(Request.Form("R1")) <> "" then Response.Cookies("poll")(""&Request.QueryString("TOPIC_ID")&"") = (""&Request.QueryString("TOPIC_ID")&"") Response.Cookies("poll").Expires = Date + 365 end if end if ' ################################################################## %>   <% end if %>
 All Forums
 &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"><% =ChkString(Request.QueryString("FORUM_Title"),"display") %>
<% if rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0 and rsTStatus("T_STATUS") <> 0 then %>  <% =ChkString(Request.QueryString("Topic_Title"),"display") %> <% else %>  <% =ChkString(Request.QueryString("Topic_Title"),"display") %> <% end if %>
<% call PostingOptions() %>
<% if maxpages > 1 then %>
Pages: <% Call Paging() %>
<% else %>
 
<% if (AdminAllowed = 1) then %> <% else %> <% end if %> <% if mypage = 1 then Call GetFirst() end if %> <% '## Forum_SQL - Get all topicsFrom DB strSql ="SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " strSql = strSql & strMemberTablePrefix & "MEMBERS.M_ICQ, " strSql = strSql & strMemberTablePrefix & "MEMBERS.M_YAHOO, " strSql = strSql & strMemberTablePrefix & "MEMBERS.M_AIM, " strSql = strSql & strMemberTablePrefix & "MEMBERS.M_TITLE, " strSql = strSql & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " strSql = strSql & strMemberTablePrefix & "MEMBERS.M_Homepage, " strSql = strSql & strMemberTablePrefix & "MEMBERS.M_LEVEL, " strSql = strSql & strMemberTablePrefix & "MEMBERS.M_POSTS, " strSql = strSql & strMemberTablePrefix & "MEMBERS.M_COUNTRY, " strSql = strSql & strMemberTablePrefix & "MEMBERS.M_AVATAR_URL, " strSql = strSql & strTablePrefix & "REPLY.REPLY_ID, " strSql = strSql & strTablePrefix & "REPLY.R_AUTHOR, " strSql = strSql & strTablePrefix & "REPLY.TOPIC_ID, " strSql = strSql & strTablePrefix & "REPLY.R_MESSAGE, " strSql = strSql & strTablePrefix & "REPLY.R_DATE " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "REPLY " strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "REPLY.R_AUTHOR " strSql = strSql & " AND TOPIC_ID = " & Request.QueryString("TOPIC_ID") & " " strSql = strSql & " ORDER BY " & strTablePrefix & "REPLY.R_DATE" if strDBType = "mysql" then 'MySql specific code if mypage > 1 then intOffSet = CInt((mypage - 1) * strPageSize) - 1 strSql = strSql & " LIMIT " & intOffSet & ", " & CInt(strPageSize) & " " end if '## Forum_SQL - Get the total pagecount strSql2 = "SELECT COUNT(" & strTablePrefix & "REPLY.TOPIC_ID) AS REPLYCOUNT " strSql2 = strSql2 & " FROM " & strTablePrefix & "REPLY " strSql2 = strSql2 & " WHERE TOPIC_ID = " & Request.QueryString("TOPIC_ID") & " " set rsCount = my_Conn.Execute(strSql2) if not rsCount.eof then maxpages = (rsCount("REPLYCOUNT") \ strPageSize ) if rsCount("REPLYCOUNT") mod strPageSize <> 0 then maxpages = maxpages + 1 end if else maxpages = 1 end if set rs = Server.CreateObject("ADODB.Recordset") ' rs.cachesize = strPageSize rs.open strSql, my_Conn, 3 else 'end MySql specific code set rs = Server.CreateObject("ADODB.Recordset") rs.cachesize = 20 rs.open strSql, my_Conn, 3 if not(rs.EOF or rs.BOF) then '## Replies found in DB rs.movefirst rs.pagesize = strPageSize maxpages = cint(rs.pagecount) rs.absolutepage = mypage end if end if if rs.EOF or rs.BOF then '## No replies found in DB Response.Write "" else 'rs.movefirst intI = 0 howmanyrecs = 0 rec = 1 do until rs.EOF or (mypage = 1 and rec > strPageSize) or (mypage > 1 and rec > strPageSize) '** if intI = 0 then CColor = strAltForumCellColor else CColor = strForumCellColor end if %> <% rs.MoveNext intI = intI + 1 if intI = 2 then intI = 0 end if rec = rec + 1 loop end if %>
>Author ><% if strShowTopicNav = "1" then Call Topic_nav() else Response.Write("Topic") end if%><% call AdminOptions() %> 
<% if strUseExtendedProfile then %> "> <% else %> ')"> <% end if %> <% =ChkString(rs("M_NAME"),"display") %> <% if strShowRank = 1 or strShowRank = 3 then %>
<% = ChkString(getMember_Level(rs("M_TITLE"), rs("M_LEVEL"), rs("M_POSTS")),"display") %> <% end if %> <% if strShowRank = 2 or strShowRank = 3 then %>
<% = getStar_Level(rs("M_LEVEL"), rs("M_POSTS")) %> <% end if %>
<% if Trim(rs("M_AVATAR_URL")) <> "" and lcase(rs("M_AVATAR_URL")) <> "noavatar.gif" and (IsNull(rs("M_AVATAR_URL")) = false) then %> <% '## Forum_SQL - Get Avatar Settings from DB strSql = "SELECT " & strTablePrefix & "AVATAR2.A_WSIZE" strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_HSIZE" strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_BORDER" strSql = strSql & " FROM " & strTablePrefix & "AVATAR2" set rsav = my_Conn.Execute (strSql) %> " align="absmiddle" width=<% =rsav("A_WSIZE") %> height=<% =rsav("A_HSIZE") %> border=<% =rsav("A_BORDER") %> hspace="0" ><% set rsav = nothing %><% end if %>
<% =rs("M_COUNTRY") %>
<% =rs("M_POSTS") %> Posts
colspan="3"<% else %>colspan="2"<% end if %> valign="top">Posted - <% =ChkDate(rs("R_DATE")) %> : <% =ChkTime(rs("R_DATE")) %> <% if strUseExtendedProfile then %>  ">Show Profile <% else %>  ')">Show Profile <% end if %> <% if (lcase(strEmail) = "1") then if (mlev <> 0) or (mlev = 0 and strLogonForMail <> "1") then %>  ')">Email Poster <% end if else %>  ')">Email Poster <% end if %> <% if strHomepage = "1" then %> <% if rs("M_Homepage") <> " " then %>  ">Visit <% = ChkString(rs('s Homepage" border="0" align="absmiddle" hspace="6"> <% end if %> <% end if %> <% if (AdminAllowed = 1 or rs("MEMBER_ID") = Member_ID) or (strNoCookies = "1") then %> <% if (rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0 and rsTStatus("T_STATUS") <> 0) or (AdminAllowed = 1) then %>  &TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&auth=<% =ChkString(rs("R_AUTHOR"),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>">Edit Message <% end if %> <% end if %> <% if strICQ = "1" then %> <% if Trim(rs("M_ICQ")) <> "" then %>  &M_NAME=<% =ChkString(rs("M_NAME"),"JSurlpath") %>')">&img=5" height=15 width=15 alt="Send <% = ChkString(rs("M_NAME"),"display") %> an ICQ Message" border="0" align="absmiddle" hspace="6"> <% end if %> <% end if %> <% if strYAHOO = "1" then %> <% if Trim(rs("M_YAHOO")) <> "" then %>  &.src=pg')">Send <% =ChkString(rs( a Yahoo! Message" border="0" align="absmiddle" hspace="6"> <% end if %> <% end if %> <% if (strAIM = "1") then %> <% if Trim(rs("M_AIM")) <> "" then %>  &M_NAME=<% =ChkString(rs("M_NAME"),"urlpath") %>')">Send <% =ChkString(rs( an instant message" border="0" align="absmiddle" hspace="6"> <% end if %> <% end if %> <% if (rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0 and rsTStatus("T_STATUS") <> 0) or (AdminAllowed = 1) then %>  &TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>&M=<% =Request.QueryString("M") %>">Reply with Quote <% end if %> <% if (strIPLogging = "1") then %> <% if (AdminAllowed = 1) or (strNoCookies = "1") then %>  &FORUM_ID=<% =Request.QueryString("FORUM_ID") %>')">View user's IP address <% end if %> <% end if %> <% if (AdminAllowed = 1 or rs("MEMBER_ID") = Member_ID) or (strNoCookies = "1") then %> <% if (rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0 and rsTStatus("T_STATUS") <> 0) or (AdminAllowed = 1) then %>  &TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>')">Delete Reply <% end if %> <% end if %>
<% =formatStr(rs("R_MESSAGE")) %>Go to Top of Page
<% end if %>
<% if maxpages > 1 then %>
Topic is <% =maxpages %> Pages Long: <% Call Paging() %>
<% else %>
  <% if (AdminAllowed = 1) then %> <% call AdminOptions() %> <% else %>   <% end if %>
<% Call PostingOptions() %>
<% end if sub GetFirst() '## Forum_SQL - Get Original Posting strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.M_ICQ, " strSql = strSql & strMemberTablePrefix & "MEMBERS.M_YAHOO, " & strMemberTablePrefix & "MEMBERS.M_AIM, " strSql = strSql & strMemberTablePrefix & "MEMBERS.M_TITLE, " & strMemberTablePrefix & "MEMBERS.M_HOMEPAGE, " strSql = strSql & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_LEVEL, " strSql = strSql & strMemberTablePrefix & "MEMBERS.M_POSTS, " & strMemberTablePrefix & "MEMBERS.M_COUNTRY, " strSql = strSql & strMemberTablePrefix & "MEMBERS.M_AVATAR_URL, " strSql = strSql & strTablePrefix & "TOPICS.T_DATE, " & strTablePrefix & "TOPICS.T_SUBJECT, " & strTablePrefix & "TOPICS.T_AUTHOR, " ' ############################### Poll Mod - 1 line ############################## strSql = strSql & strTablePrefix & "TOPICS.answer1, " & strTablePrefix & "TOPICS.count1, " & strTablePrefix & "TOPICS.answer2, " & strTablePrefix & "TOPICS.count2, " & strTablePrefix & "TOPICS.answer3, " & strTablePrefix & "TOPICS.count3, " & strTablePrefix & "TOPICS.answer4, " & strTablePrefix & "TOPICS.count4, " & strTablePrefix & "TOPICS.answer5, " & strTablePrefix & "TOPICS.count5, " & strTablePrefix & "TOPICS.answer6, " & strTablePrefix & "TOPICS.count6, " & strTablePrefix & "TOPICS.answer7, " & strTablePrefix & "TOPICS.count7, " & strTablePrefix & "TOPICS.answer8, " & strTablePrefix & "TOPICS.count8, " strSql = strSql & strTablePrefix & "TOPICS.TOPIC_ID, " & strTablePrefix & "TOPICS.T_MESSAGE " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "TOPICS " strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "TOPICS.T_AUTHOR " strSql = strSql & " AND " & strTablePrefix & "TOPICS.TOPIC_ID = " & Request.QueryString("TOPIC_ID") set rs = my_Conn.Execute (strSql) if rs.EOF or rs.BOF then '## No categories found in DB Response.Write " " & vbCrLf Response.Write " No Topics Found" & vbCrLf Response.Write " " & vbCrLf else %> <% if strUseExtendedProfile then %> "> <% else %> ')"> <% end if %> <% =ChkString(rs("M_NAME"),"display") %> <% if strShowRank = 1 or strShowRank = 3 then %>
<% = ChkString(getMember_Level(rs("M_TITLE"), rs("M_LEVEL"), rs("M_POSTS")),"display") %> <% end if %> <% if strShowRank = 2 or strShowRank = 3 then %>
<% = getStar_Level(rs("M_LEVEL"), rs("M_POSTS")) %> <% end if %>
<% if Trim(rs("M_AVATAR_URL")) <> "" and lcase(rs("M_AVATAR_URL")) <> "noavatar.gif" and (IsNull(rs("M_AVATAR_URL")) = false) then %> <% '## Forum_SQL - Get Avatar Settings from DB strSql = "SELECT " & strTablePrefix & "AVATAR2.A_WSIZE" strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_HSIZE" strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_BORDER" strSql = strSql & " FROM " & strTablePrefix & "AVATAR2" set rsav = my_Conn.Execute (strSql) %> " align="absmiddle" width=<% =rsav("A_WSIZE") %> height=<% =rsav("A_HSIZE") %> border=<% =rsav("A_BORDER") %> hspace="0" ><% set rsav = nothing %><% end if %>
<% =rs("M_COUNTRY") %>
<% =rs("M_POSTS") %> Posts colspan="3"<% else %>colspan="2"<% end if %> valign="top">Posted - <% =ChkDate(rs("T_DATE")) %> : <% =ChkTime(rs("T_DATE")) %> <% if strUseExtendedProfile then %>  ">Show Profile <% else %>  ')">Show Profile <% end if %> <% if (lcase(strEmail) = "1") then if (mlev <> 0) or (mlev = 0 and strLogonForMail <> "1") then %>  ')">Email Poster <% end if else %>  ')">Email Poster <% end if %> <% if (strHomepage = "1") then %> <% if rs("M_Homepage") <> " " then %>  ">Visit <% =ChkString(rs('s Homepage" border="0" align="absmiddle" hspace="6"> <% end if %> <% end if %> <% ' ############ Poll Mod - 1 line ########### if trim(rs("answer1")) = "" then if (AdminAllowed = 1 or rs("MEMBER_ID") = Member_ID) or (strNoCookies = "1") then %> <% ' ############ Poll Mod - 1 line ########### if ((rsCStatus("CAT_STATUS") <> 0) and (rsFStatus("F_STATUS") <> 0) and (rsTStatus("T_STATUS") <> 0)) or (mlev = 4 or mlev = 3) then %>  &TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&auth=<% =rs("T_AUTHOR") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>">Edit Message <% end if %> <% end if %> <% ' ############ Poll Mod ################### end if %> <% if trim(rs("answer1")) <> "" then %> <% if (AdminAllowed = 1 or rs("MEMBER_ID") = Member_ID) or (strNoCookies = "1") then %> <% if ((rsCStatus("CAT_STATUS") <> 0) and (rsFStatus("F_STATUS") <> 0) and (rsTStatus("T_STATUS") <> 0)) or (mlev = 4 or mlev = 3) then %>  &TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&auth=<% =rs("T_AUTHOR") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>">Edit Message <% end if %> <% end if %> <% end if ' ########################################### if (strICQ = "1") then %> <% if Trim(rs("M_ICQ")) <> "" then %>  &M_NAME=<% =ChkString(rs("M_NAME"), "JSurlpath") %>')">&img=5" height=15 width=15 alt="Send <% =ChkString(rs("M_NAME"),"display") %> an ICQ Message" border="0" align="absmiddle" hspace="6"> <% end if %> <% end if %> <% if (strYAHOO = "1") then %> <% if Trim(rs("M_YAHOO")) <> "" then %>  &.src=pg')">Send <% =ChkString(rs( a Yahoo! Message" border="0" align="absmiddle" hspace="6"> <% end if %> <% end if %> <% if (strAIM = "1") then %> <% if Trim(rs("M_AIM")) <> "" then %>  &M_NAME=<% =ChkString(rs("M_NAME"), "JSurlpath") %>')">Send <% =ChkString(rs( an instant message" border="0" align="absmiddle" hspace="6"> <% end if %> <% end if %> <% if (rsCStatus("CAT_STATUS") <> 0 and rsFStatus("F_STATUS") <> 0 and rsTStatus("T_STATUS") <> 0) or (AdminAllowed = 1) then %>  &FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>">Reply with Quote <% end if %> <% if (strIPLogging = "1") then %> <% if (AdminAllowed = 1) or (strNoCookies = "1") then %>  &FORUM_ID=<% =Request.QueryString("FORUM_ID") %>')">View user's IP address <% end if %> <% end if %>
<% ' ###################### Poll Mod ######################## Dim vAnswers(8) Dim vCount(8) Dim nCount if trim(rs("answer1")) <> "" then %> <% if (Request.Querystring("pollresults") <> "1") and ((rsCStatus("CAT_STATUS") <> 0) and (rsFStatus("F_STATUS") <> 0) and (rsTStatus("T_STATUS") <> 0)) then%>
Poll Question:
<% =formatStr(rs("T_MESSAGE")) %> &FORUM_ID=<%=Request.QueryString("FORUM_ID")%>&CAT_ID=<%=Request.QueryString("CAT_ID")%>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("Forum_Title"),"urlpath") %>&pollresults=1" name="Vote"> <% if trim(rs("answer1")) <> "" then %> <% end if %>

Choices:

<% Dim nDef Dim nTotal For nCount=1 To 8 vAnswers(nCount)=RS("answer" & CStr(nCount)) vCount(nCount)=RS("count" & CStr(nCount)) Next GetPollInfo = True nTotal = 0 For nCount=1 To 8 If trim(vAnswers(nCount)) <> "" Then nTotal = nTotal + vCount(nCount) %> <%=vAnswers(nCount)%>
<% End If Next%>

"> &FORUM_ID=<%=Request.QueryString("FORUM_ID")%>&CAT_ID=<%=Request.QueryString("CAT_ID")%>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>&Forum_Title=<% =ChkString(Request.QueryString("Forum_Title"),"urlpath") %>&pollresults=1">View Results
<% end if else %> <% =formatStr(rs("T_MESSAGE")) %> <% end if %> <% if trim(rs("answer1")) <> "" then if (Request.Querystring("pollresults") = "1") or ((rsCStatus("CAT_STATUS") = 0) or (rsFStatus("F_STATUS") = 0) or (rsTStatus("T_STATUS") = 0)) then %>
Poll Question:
<% =formatStr(rs("T_MESSAGE")) %> <% Dim nMaxValue, nLowValue For nCount=1 To 8 vAnswers(nCount)=RS("answer" & CStr(nCount)) vCount(nCount)=RS("count" & CStr(nCount)) Next 'First of all get max value and nLowValue nMaxValue = 0 For nCount=1 To 8 If trim(vAnswers(nCount)) <> "" and vCount(nCount) > nMaxValue Then nMaxValue = vCount(nCount) End If Next GetPollInfo = True If nMaxValue = 0 Then nMaxValue = 1 End If Dim nMaxWidth Dim vPercent(100) nMaxWidth = 200 'This is number of pixels for maxvalue Dim nThisVal, nPercent nTotal = 0 '1. Go through all and get total For nCount = 1 To 8 If trim(vAnswers(nCount)) <> "" Then nTotal = nTotal + vCount(nCount) End If Next If nTotal = 0 Then nTotal = 1 End If '2. Go through all and get percent For nCount = 1 To 8 If trim(vAnswers(nCount)) <> "" Then vPercent(nCount) = FormatNumber(vCount(nCount)/nTotal*100,1) End If Next For nCount=1 To 8 If trim(vAnswers(nCount)) <> "" Then nThisVal = FormatNumber(vCount(nCount)/nMaxValue * nMaxWidth,0) %> <% End If Next %>


Results:

<%=vAnswers(nCount)%>   (<%=vPercent(nCount)%> %) <%=vCount(nCount)%> votes

Total of <%=nTotal%> votes counted so far
<% end if end if ' ##################################################################################### %> <% end if '## Forum_SQL strSql = "UPDATE " & strTablePrefix & "TOPICS " strSql = strSql & " SET " & strTablePrefix & "TOPICS.T_VIEW_COUNT = (" & strTablePrefix & "TOPICS.T_VIEW_COUNT + 1) " strSql = strSql & " WHERE (" & strTablePrefix & "TOPICS.TOPIC_ID = " & Request.QueryString("TOPIC_ID") & ");" my_conn.Execute (strSql) set rs = nothing End Sub sub DisplayIP() usr = (chkForumModerator(Request.QueryString("FORUM_ID"), STRdbntUserName)) if (chkUser((STRdbntUserName), (Request.Cookies(strUniqueID & "User")("Pword"))) = 4) then usr = 1 end if if usr then if Request.QueryString("TOPIC_ID") <> "" then '## Forum_SQL strSql = "SELECT " & strTablePrefix & "TOPICS.T_IP, " & strTablePrefix & "TOPICS.T_SUBJECT " strSql = strSql & " FROM " & strTablePrefix & "TOPICS " strSql = strSql & " WHERE TOPIC_ID = " & Request.QueryString("TOPIC_ID") rsIP = my_Conn.Execute(strSql) IP = rsIP("T_IP") Title = rsIP("T_Subject") else if Request.QueryString("REPLY_ID") <> "" then '## Forum_SQL strSql = "SELECT " & strTablePrefix & "REPLY.R_IP " strSql = strSql & " FROM " & strTablePrefix & "REPLY " strSql = strSql & " WHERE REPLY_ID = " & Request.QueryString("REPLY_ID") rsIP = my_Conn.Execute(strSql) IP = rsIP("R_IP") end if end if set rsIP = nothing %>

User's IP address:
<% =ip %>

<% else %>

Only moderators and administrators can perform this action.

<% end If end sub sub PostingOptions() %> <% if (mlev = 4 or mlev = 3 or mlev = 2 or mlev = 1) or (lcase(strNoCookies) = "1") or (STRdbntUserName = "") then if ((rsCStatus("CAT_STATUS") = 1) and (rsFStatus("F_STATUS") = 1)) then %> &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"> &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">New Topic <% ' ################ Poll Mod ################### if (strUserPolls = "1") or (mlev = 4 or mlev = 3) then %>  &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">Add Poll &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">Add Poll
<% end if ' ############################################ else if (AdminAllowed = 1) then %> &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>"> &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">New Topic <% ' ################ Poll Mod ################### %>  &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">Add Poll &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">Add Poll
<% ' ############################################ else %>  Forum Locked <% end if end if if (rsCStatus("CAT_STATUS") = 1) and (rsFStatus("F_STATUS") = 1) and (rsTStatus("T_STATUS") = 1) then %> &FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>"> &FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>">Reply to Topic <% Else if (AdminAllowed = 1) then %> &FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>"> &FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>">Reply to Topic <% Else %>  Topic Locked <% end if end if if (lcase(strEmail) = "1") then if (mlev <> 0) or (mlev = 0 and strLogonForMail <> "1") then ' ################ Poll Mod ################### if (strUserPolls = "1") or (AdminAllowed = 1) then %>  ')"> ')">Send Topic to a Friend <% else ' ############################################ %>
')"> ')">Send Topic to a Friend <% end if end if end if end if %>
<% end sub sub AdminOptions() %> <% if (AdminAllowed = 1) or (lcase(strNoCookies) = "1") then if (rsCStatus("CAT_STATUS") = 0) then if (mlev = 4) then %> ')">Un-Lock Category <% else %> Cateogry Locked <% end if else if (rsFStatus("F_STATUS") = 0) then %> &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"JSurlpath") %>')">Un-Lock Forum <% else if (rsTStatus("T_STATUS") <> 0) then %> &FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"JSurlpath") %>')">Lock Topic <% else %> &FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"JSurlpath") %>')">Un-Lock Topic <% end if end if end if %> <% if ((rsCStatus("CAT_STATUS") <> 0) and (rsFStatus("F_STATUS") <> 0) and (rsTStatus("T_STATUS") <> 0)) or (AdminAllowed = 1) then %> &TOPIC_ID=<% =Request.QueryString("TOPIC_ID") %>&FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>">Edit Topic <% end if %> &FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"JSurlpath") %>')">Delete Topic &CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>">New Topic &FORUM_ID=<% =Request.QueryString("FORUM_ID") %>&CAT_ID=<% =Request.QueryString("CAT_ID") %>&Forum_Title=<% =ChkString(Request.QueryString("FORUM_Title"),"urlpath") %>&Topic_Title=<% =ChkString(Request.QueryString("Topic_Title"),"urlpath") %>">Reply to Topic <% end if %> <% end sub sub Paging() if maxpages > 1 then if Request.QueryString("whichpage") = "" then pge = 1 else pge = Request.QueryString("whichpage") end if scriptname = request.servervariables("script_name") Response.Write("") for counter = 1 to maxpages if counter <> cint(pge) then ref = "" Response.Write ref else ref = ref & "'>" & counter & "" Response.Write ref end if else Response.Write("") end if if counter mod strPageNumberSize = 0 then Response.Write("") end if next Response.Write("
" & " " & widenum(counter) & "" ref = ref & "" & counter & "" & " " & widenum(counter) & "" & counter & "
") end if top = "0" end sub Sub Topic_nav() set rsLastPost = Server.CreateObject("ADODB.Recordset") strSql = "SELECT T_LAST_POST FROM " & strTablePrefix & "TOPICS " strSql = strSql & "WHERE TOPIC_ID = " & Request.QueryString("TOPIC_ID") set rsLastPost = my_Conn.Execute (StrSql) T_LAST_POST = rsLastPost("T_LAST_POST") strSQL = "SELECT T_SUBJECT, TOPIC_ID " strSql = strSql & "FROM " & strTablePrefix & "TOPICS " strSql = strSql & "WHERE T_LAST_POST > '" & T_LAST_POST strSql = strSql & "' AND FORUM_ID=" & Request.QueryString("Forum_ID") strSql = strSql & " ORDER BY T_LAST_POST;" set rsPrevTopic = my_conn.Execute (strSQL) strSQL = "SELECT T_SUBJECT, TOPIC_ID " strSql = strSql & "FROM " & strTablePrefix & "TOPICS " strSql = strSql & "WHERE T_LAST_POST < '" & T_LAST_POST strSql = strSql & "' AND FORUM_ID=" & Request.QueryString("Forum_ID") strSql = strSql & " ORDER BY T_LAST_POST DESC;" set rsNextTopic = my_conn.Execute (strSQL) if rsPrevTopic.EOF then prevTopic = "" else prevTopic = "" end if if rsNextTopic.EOF then NextTopic = "" else NextTopic = "" end if Response.Write (prevTopic & " Topic " & nextTopic) rsLastPost.close rsPrevTopic.close rsNextTopic.close set rsLastPost = nothing set rsPrevTopic = nothing set rsNextTopic = nothing end sub %>