<% '################################################################################# '## Copyright (C) 2000-02 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 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 '################################################################################# %> <% '################################################################################# '## Variable declaration '################################################################################# dim strSelectSize dim intCols, intRows '################################################################################# '## Initialise variables '################################################################################# strRqMethod = chkString(Request.QueryString("method"), "SQLString") if Request.QueryString("TOPIC_ID") <> "" then if IsNumeric(Request.QueryString("TOPIC_ID")) = True then strRqTopicID = cLng(Request.QueryString("TOPIC_ID")) else Response.Redirect("default.asp") end if end if if Request.QueryString("FORUM_ID") <> "" then if IsNumeric(Request.QueryString("FORUM_ID")) = True then strRqForumID = cLng(Request.QueryString("FORUM_ID")) else Response.Redirect("default.asp") end if end if if Request.QueryString("CAT_ID") <> "" then if IsNumeric(Request.QueryString("CAT_ID")) = True then strRqCatID = cLng(Request.QueryString("CAT_ID")) else Response.Redirect("default.asp") end if end if if Request.QueryString("REPLY_ID") <> "" then if IsNumeric(Request.QueryString("REPLY_ID")) = True then strRqReplyID = cLng(Request.QueryString("REPLY_ID")) else Response.Redirect("default.asp") end if end if strCkPassWord = Request.Cookies(strUniqueID & "User")("Pword") if strSelectSize = "" or IsNull(strSelectSize) then strSelectSize = Request.Cookies(strUniqueID & "strSelectSize") end if if not(IsNull(strSelectSize)) and strSelectSize <> "" then if strSetCookieToForum = 1 then Response.Cookies(strUniqueID & "strSelectSize").Path = strCookieURL else Response.Cookies(strUniqueID & "strSelectSize").Path = "/" end if Response.Cookies(strUniqueID & "strSelectSize") = strSelectSize Response.Cookies(strUniqueID & "strSelectSize").expires = dateAdd("yyyy", 1, strForumTimeAdjust) end if %> <% '################################################################################# '## Page-code start '################################################################################# if request("ARCHIVE") = "true" then strActivePrefix = strTablePrefix & "A_" ArchiveView = "true" else strActivePrefix = strTablePrefix ArchiveView = "" end if if strRqMethod = "Edit" or _ strRqMethod = "EditTopic" or _ strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "TopicQuote" then '## check if topic exists in TOPICS table set rsTCheck = my_Conn.Execute ("SELECT TOPIC_ID FROM " & strActivePrefix & "TOPICS WHERE TOPIC_ID = " & strRqTopicID) if rsTCheck.EOF or rsTCheck.BOF then Go_Result "Sorry, that Topic no longer exists in the Database" end if set rsTCheck = nothing end if if strRqMethod = "" then Response.Redirect "default.asp" end if if ArchiveView <> "" then if MethodType = "Reply" or _ MethodType = "ReplyQuote" or _ MethodType = "TopicQuote" then Go_Result "This is not allowed in the Archives." end if end if if strRqMethod = "Edit" or _ strRqMethod = "EditTopic" or _ strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or _ strRqMethod = "TopicQuote" then if strRqMethod <> "Topic" then '## Forum_SQL - Find out if the Category, Forum or Topic is Locked or Un-Locked and if it Exists strSql = "SELECT C.CAT_ID, C.CAT_NAME, C.CAT_STATUS, C.CAT_SUBSCRIPTION, " &_ "F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT, F.F_SUBSCRIPTION, "&_ "T.T_STATUS, T.T_SUBJECT " &_ " FROM " & strTablePrefix & "CATEGORY C, " &_ strTablePrefix & "FORUM F, " &_ strActivePrefix & "TOPICS T" &_ " WHERE C.CAT_ID = T.CAT_ID " &_ " AND F.FORUM_ID = T.FORUM_ID " &_ " AND T.TOPIC_ID = " & strRqTopicID & "" else '## Forum_SQL - Find out if the Category or Forum is Locked or Un-Locked and if it Exists strSql = "SELECT C.CAT_ID, C.CAT_NAME, C.CAT_STATUS, C.CAT_SUBSCRIPTION, " &_ "F.FORUM_ID, F.F_STATUS, F.F_TYPE, F.F_SUBJECT, F.F_SUBSCRIPTION "&_ " FROM " & strTablePrefix & "CATEGORY C, " &_ strTablePrefix & "FORUM F" &_ " WHERE C.CAT_ID = F.CAT_ID " &_ " AND F.FORUM_ID = " & strRqForumID & "" end if set rsStatus = my_Conn.Execute(strSql) if rsStatus.EOF or rsStatus.BOF then Go_Result "Please don't attempt to edit the URL
to gain access to locked Forums/Categories." else '## Subscribe checkbox start ## PostCat_subscription = rsStatus("CAT_SUBSCRIPTION") PostForum_subscription = rsStatus("F_SUBSCRIPTION") '## Subscribe checkbox end ## blnCStatus = rsStatus("CAT_STATUS") blnFStatus = rsStatus("F_STATUS") strRqForumID = rsStatus("FORUM_ID") strRqCatID = rsStatus("CAT_ID") Cat_Name = rsStatus("CAT_NAME") Forum_Type = rsStatus("F_TYPE") Forum_Subject = rsStatus("F_SUBJECT") if strRqMethod <> "Topic" then blnTStatus = rsStatus("T_STATUS") Topic_Title = rsStatus("T_SUBJECT") else blnTStatus = 1 end if rsStatus.close set rsStatus = nothing end if if mLev = 4 then AdminAllowed = 1 ForumChkSkipAllowed = 1 elseif mLev = 3 then if chkForumModerator(strRqForumID, 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 select case strRqMethod case "Topic" if (Forum_Type = 1) then Go_Result "You have attempted to post a New Topic to a Forum designated as a Web Link" end if if (blnCStatus = 0) and (AdminAllowed = 0) then Go_Result "You have attempted to post a New Topic to a Locked Category" end if if (blnFStatus = 0) and (AdminAllowed = 0) then Go_Result "You have attempted to post a New Topic to a Locked Forum" end if case "EditTopic" if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (AdminAllowed = 0) then Go_Result "You have attempted to edit a Locked Topic" end if case "Reply", "ReplyQuote", "TopicQuote" if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (AdminAllowed = 0) then Go_Result "You have attempted to Reply to a Locked Topic" end if case "Edit" if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (AdminAllowed = 0) then Go_Result "You have attempted to Edit a Reply to a Locked Topic" end if end select if strPrivateForums = "1" and ForumChkSkipAllowed = 0 then if not(chkForumAccess(strRqForumID,MemberID,false)) then Go_Result "You do not have access to this forum" end if end if end if select case strSelectSize case "1" intCols = 45 intRows = 11 case "2" intCols = 70 intRows = 12 case "3" intCols = 90 intRows = 12 case "4" intCols = 130 intRows = 15 case else intCols = 70 intRows = 12 end select Response.Write " " & vbNewLine & _ " " & vbNewLine if strRqMethod = "EditForum" then if (mLev = 4) or (chkForumModerator(strRqForumId, strDBNTUserName) = "1") then '## Do Nothing else Go_Result "Only moderators and administrators can edit forums" end if end if Msg = "" select case strRqMethod case "Reply", "ReplyQuote", "TopicQuote" if (strNoCookies = 1) or (strDBNTUserName = "") then Msg = Msg & "Note: You must be registered in order to post a reply.
" if strProhibitNewMembers <> "1" then Msg = Msg & "To register, click here. Registration is FREE!
" end if end if case "Topic" if (strNoCookies = 1) or (strDBNTUserName = "") then Msg = Msg & "Note: You must be registered in order to post a Topic.
" if strProhibitNewMembers <> "1" then Msg = Msg & "To register, click here. Registration is FREE!
" end if end if case "Category" Msg = Msg & "Note: You must be an Administrator to create a new Category.
" case "Forum" Msg = Msg & "Note: You must be an Administrator to create a new Forum.
" case "URL" Msg = Msg & "Note: You must be an Administrator to create a new Web Link.
" case "Edit", "EditTopic" Msg = Msg & "Note: Only the poster of this message, and the Moderator can edit the message." case "EditForum" Msg = Msg & "Note: Only the Moderator or an Administrator can edit a Forum." case "EditURL" Msg = Msg & "Note: Only the Moderator or an Administrator can edit a Web Link." case "EditCategory" Msg = Msg & "Note: Only an Administrator can edit a Category." case else Response.Redirect "default.asp" end select if strRqMethod = "Edit" or _ strRqMethod = "ReplyQuote" then '## Forum_SQL strSql = "SELECT M.M_NAME, R.R_AUTHOR, R.R_SIG, R.R_MESSAGE " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strActivePrefix & "REPLY R " strSql = strSql & " WHERE M.MEMBER_ID = R.R_AUTHOR AND R.REPLY_ID = " & strRqReplyID set rs = my_Conn.Execute (strSql) strAuthor = rs("R_AUTHOR") if strRqMethod = "Edit" then TxtMsg = rs("R_MESSAGE") else if strRqMethod = "ReplyQuote" then TxtMsg = "[quote][i]Originally posted by " & chkString(rs("M_NAME"),"display") & "[/i]" & vbNewline TxtMsg = TxtMsg & "[br]" & rs("R_MESSAGE") & vbNewline TxtMsg = TxtMsg & "[/quote]" end if end if end if if strRqMethod = "EditTopic" or strRqMethod = "TopicQuote" then '## Forum_SQL strSql = "SELECT M.M_NAME, T.CAT_ID, T.FORUM_ID, T.TOPIC_ID, T.T_SUBJECT, T.T_AUTHOR, T.T_STICKY, T.T_SIG, T.T_MESSAGE " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strActivePrefix & "TOPICS T " strSql = strSql & " WHERE M.MEMBER_ID = T.T_AUTHOR AND T.TOPIC_ID = " & strRqTopicID set rs = my_Conn.Execute (strSql) TxtSub = rs("T_SUBJECT") strAuthor = rs("T_AUTHOR") if strStickyTopic = "1" then strTopicSticky = rs("T_STICKY") end if if strRqMethod = "EditTopic" then TxtMsg = rs("T_MESSAGE") else if strRqMethod = "TopicQuote" then TxtMsg = "[quote][i]Originally posted by " & chkString(rs("M_NAME"),"display") & "[/i]" & vbNewline TxtMsg = TxtMsg & "[br]" & rs("T_MESSAGE") & vbNewline TxtMsg = TxtMsg & "[/quote]" end if end if end if if strRqMethod = "EditForum" or _ strRqMethod = "EditURL" then '## Forum_SQL ' DEM --> Added F_SUBSCRIPTION, F_MODERATION to the end of this select strSql = "SELECT F_SUBJECT, F_URL, F_PRIVATEFORUMS, F_PASSWORD_NEW, " & _ "F_DEFAULTDAYS, F_COUNT_M_POSTS, F_SUBSCRIPTION, F_MODERATION, F_DESCRIPTION " & _ " FROM " & strTablePrefix & "FORUM " & _ " WHERE FORUM_ID = " & strRqForumId set rs = my_Conn.Execute (strSql) if strRqMethod = "EditURL" then TxtUrl = rs("F_URL") end if if strRqMethod = "EditForum" then fDefaultDays = rs("F_DEFAULTDAYS") fForumCntMPosts = rs("F_COUNT_M_POSTS") end if if strRqMethod = "EditForum" or _ strRqMethod = "EditURL" then TxtSub = rs("F_SUBJECT") ' DEM --> Added fields to get them into local variables which is a faster run ForumSubscription = rs("F_SUBSCRIPTION") ForumModeration = rs("F_MODERATION") TxtMsg = rs("F_DESCRIPTION") end if end if ' DEM --> Added editforum and forum to get the cat_subscription and cat_moderation for later use. if strRqMethod = "EditCategory" or strRqMethod = "EditForum" or strRqMethod = "EditURL" or strRqMethod = "Forum" then '## Forum_SQL ' DEM --> Added CAT_SUBSCRIPTION for subscription services ' DEM --> Added CAT_MODERATION for moderation processing strSql = "SELECT CAT_NAME, CAT_SUBSCRIPTION, CAT_MODERATION " strSql = strSql & " FROM " & strTablePrefix & "CATEGORY " strSql = strSql & " WHERE CAT_ID = " & strRqCatID ' DEM --> Added if statement to use a different connection and to move the database fields to local variables if strRqMethod = "EditForum" or strRqMethod = "EditURL" or strRqMethod = "Forum" then set rs1 = my_Conn.Execute (strSql) CatSubscription = rs1("CAT_SUBSCRIPTION") CatModeration = rs1("CAT_MODERATION") strCatName = rs1("CAT_NAME") set rs1 = nothing else set rs = my_Conn.Execute (strSql) CatSubscription = rs("CAT_SUBSCRIPTION") CatModeration = rs("CAT_MODERATION") end if if strRqMethod = "EditCategory" then TxtSub = rs("CAT_NAME") end if end if select case strRqMethod case "Category" btn = "Post New Category" case "Edit", "EditCategory", "EditForum", "EditTopic", "EditURL" btn = "Post Changes" case "Forum" btn = "Post New Forum" case "Reply", "ReplyQuote", "TopicQuote" btn = "Post New Reply" case "Topic" btn = "Post New Topic" case "URL" btn = "Post New URL" case else btn = "Post" end select Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " All Forums
" & vbNewLine if strRqMethod = "EditCategory" then Response.Write " " & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " " & ChkString(TxtSub,"display") & "
" & vbNewLine elseif strRqMethod = "EditForum" or strRqMethod = "EditURL" then Response.Write " " & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " " & ChkString(strCatName,"display") & "
" & vbNewLine Response.Write " " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " " & ChkString(TxtSub,"display") & "
" & vbNewLine else if strRqMethod = "Edit" or strRqMethod = "EditTopic" or _ strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or strRqMethod = "TopicQuote" then Response.Write " " & getCurrentIcon(strIconBar,"","align=""absmiddle""") if blnCStatus <> 0 then Response.Write getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") else Response.Write getCurrentIcon(strIconFolderClosed,"","align=""absmiddle""") end if Response.Write " " & ChkString(Cat_Name,"display") & "
" & vbNewLine Response.Write " " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""") if blnFStatus <> 0 and blnCStatus <> 0 then Response.Write getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") else if strRqMethod <> "Topic" then Response.Write getCurrentIcon(strIconFolderClosed,"","align=""absmiddle""") else Response.Write getCurrentIcon(strIconFolderClosedTopic,"","align=""absmiddle""") end if end if Response.Write " " & ChkString(Forum_Subject,"display") & "
" & vbNewLine end if end if if strRqMethod = "Edit" or strRqMethod = "EditTopic" or _ strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _ strRqMethod = "TopicQuote" then Response.Write " " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""") if blnTStatus <> 0 and blnFStatus <> 0 and blnCStatus <> 0 then Response.Write getCurrentIcon(strIconFolderOpenTopic,"","align=""absmiddle""") else Response.Write getCurrentIcon(strIconFolderClosedTopic,"","align=""absmiddle""") end if Response.Write " " & ChkString(Topic_Title,"title") & "" & vbNewLine end if Response.Write "
" & vbNewLine & _ "

" & Msg & "

" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewline & _ " " & vbNewline & _ "
" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine if strRqMethod = "Edit" or strRqMethod = "EditTopic" or strRqMethod = "Forum" or strRqMethod = "EditForum" or _ strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or strRqMethod = "TopicQuote" then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine end if if mlev = 4 or _ mlev = 3 or _ mlev = 2 or _ mlev = 1 then Response.Write " " & vbNewLine & _ " " & vbNewLine else if (lcase(strNoCookies) = "1") or _ (strDBNTUserName = "" or _ strCkPassWord = "") then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine end if end if if strAllowForumCode = "1" and strShowFormatButtons = "1" then if strRqMethod = "Edit" or strRqMethod = "EditTopic" or _ strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or strRqMethod = "TopicQuote" then %> <% end if end if if strRqMethod = "Forum" or _ strRqMethod = "URL" or _ strRqMethod = "EditURL" or _ strRqMethod = "EditForum" then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine end if if (strRqMethod = "EditTopic") then Dim MoveTopicAllowed if (mLev = 4) or (mLev = 3 and strMoveTopicMode = "0") or ((mLev = 3) and (strMoveTopicMode = "1") and (strAuthor = MemberID)) then MoveTopicAllowed = "1" else MoveTopicAllowed = "0" end if Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewline & _ " " & vbNewLine end if if strRqMethod = "Forum" or _ strRqMethod = "EditForum" then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine end if if strRqMethod = "Forum" or _ strRqMethod = "EditForum" then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine end if if strRqMethod = "Category" or _ strRqMethod = "EditCategory" or _ strRqMethod = "URL" or _ strRqMethod = "EditURL" or _ strRqMethod = "Forum" or _ strRqMethod = "EditForum" or _ strRqMethod = "EditTopic" or _ strRqMethod = "Topic" then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine end if if strRqMethod = "URL" or _ strRqMethod = "EditURL" then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine end if if strRqMethod = "Edit" or strRqMethod = "URL" or strRqMethod = "EditURL" or _ strRqMethod = "Forum" or strRqMethod = "EditForum" or _ strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _ strRqMethod = "EditTopic" or strRqMethod = "Topic" or strRqMethod = "TopicQuote" then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine end if select case strRqMethod case "Reply", "ReplyQuote", "TopicQuote" Response.Write " " & vbNewLine end select '################################################################################# '## Forum Moderators - listbox Code '################################################################################# if (strRqMethod = "Forum" or _ strRqMethod = "URL" or _ strRqMethod = "EditURL" or _ strRqMethod = "EditForum") and (mLev > 3 or lcase(strNoCookies) = "1") then Response.Write " " & vbNewLine & _ " " & vbNewLine strSql = "SELECT MEMBER_ID, M_NAME " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE M_LEVEL > 1 " strSql = strSql & " AND M_STATUS = " & 1 strSql = strSql & " ORDER BY M_NAME ASC " set rsModerators = Server.CreateObject("ADODB.Recordset") rsModerators.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText if rsModerators.EOF then recModeratorsCount = "" else allModeratorsData = rsModerators.GetRows(adGetRowsRest) recModeratorsCount = UBound(allModeratorsData,2) meMEMBER_ID = 0 meM_NAME = 1 end if rsModerators.close set rsModerators = nothing tmpStrUserList = "" if strRqMethod = "EditForum" or strRqMethod = "EditURL" then strSql = "SELECT MEMBER_ID " strSql = strSql & " FROM " & strTablePrefix & "MODERATOR " strSql = strSql & " WHERE FORUM_ID = " & strRqForumID set rsForumModerator = Server.CreateObject("ADODB.Recordset") rsForumModerator.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText if rsForumModerator.EOF then recForumModeratorCount = "" else allForumModeratorData = rsForumModerator.GetRows(adGetRowsRest) recForumModeratorCount = UBound(allForumModeratorData,2) moMEMBER_ID = 0 end if rsForumModerator.close set rsForumModerator = nothing if recForumModeratorCount <> "" then for iForumModerator = 0 to recForumModeratorCount ForumModeratorMemberID = allForumModeratorData(moMEMBER_ID, iForumModerator) if tmpStrUserList = "" then tmpStrUserList = ForumModeratorMemberID else tmpStrUserList = tmpStrUserList & "," & ForumModeratorMemberID end if next end if end if SelectSize = 6 Response.Write " " & vbNewLine & _ " " & vbNewLine end if '################################################################################# '## Forum Moderators - End of listbox code '################################################################################# ' DEM --> Start of Code added for full moderation and subscription services if strRqMethod = "Forum" or strRqMethod = "EditForum" or _ strRqMethod = "Category" or strRqMethod = "EditCategory" then if strSubscription > 0 and strEmail = "1" and _ ((strRqMethod = "Category" or strRqMethod = "EditCategory") or _ ((strRqMethod = "Forum" or strRqMethod = "EditForum") and (CatSubscription > 0))) then ' Subscription service first..... Response.Write " " & vbNewline Response.Write " " & vbNewLine Response.Write " " & vbNewline Response.Write " " & vbNewLine end if ' Topic Moderation Code - Check if Moderation is allowed over the entire board, then ' check if Moderation is allowed for the next level up. if strModeration > 0 and _ ((strRqMethod = "Category" or strRqMethod = "EditCategory") or _ ((strRqMethod = "Forum" or strRqMethod = "EditForum") and CatModeration > 0)) then Response.Write " " & vbNewline Response.Write " " & vbNewLine Response.Write " " & vbNewline Response.Write " " & vbNewline end if end if ' DEM --> End of Code Added for Moderation and Subscription if strRqMethod = "Edit" or _ strRqMethod = "URL" or strRqMethod = "EditURL" or _ strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _ strRqMethod = "EditTopic" or strRqMethod = "Topic" or strRqMethod = "TopicQuote" then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewline Response.Write " " & vbNewline end if if strPrivateForums <> "0" then if strRqMethod = "Forum" or _ strRqMethod = "URL" or _ strRqMethod = "EditURL" or _ strRqMethod = "EditForum" then if strRqMethod = "EditForum" or _ strRqMethod = "EditURL" then ForumAuthType = rs("F_PRIVATEFORUMS") else ForumAuthType = 0 end if Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine '################################################################################# '## Allowed User - listbox Code '################################################################################# strSql = "SELECT MEMBER_ID, M_NAME " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE M_STATUS = " & 1 strSql = strSql & " ORDER BY M_NAME ASC " set rsMember = Server.CreateObject("ADODB.Recordset") rsMember.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText if rsMember.EOF then recMemberCount = "" else allMemberData = rsMember.GetRows(adGetRowsRest) recMemberCount = UBound(allMemberData,2) meMEMBER_ID = 0 meM_NAME = 1 end if rsMember.close set rsMember = nothing tmpStrUserList = "" if strRqMethod = "EditForum" or strRqMethod = "EditURL" then strSql = "SELECT MEMBER_ID " strSql = strSql & " FROM " & strTablePrefix & "ALLOWED_MEMBERS " strSql = strSql & " WHERE FORUM_ID = " & strRqForumID set rsAllowedMember = Server.CreateObject("ADODB.Recordset") rsAllowedMember.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText if rsAllowedMember.EOF then recAllowedMemberCount = "" else allAllowedMemberData = rsAllowedMember.GetRows(adGetRowsRest) recAllowedMemberCount = UBound(allAllowedMemberData,2) amMEMBER_ID = 0 end if rsAllowedMember.close set rsAllowedMember = nothing if recAllowedMemberCount <> "" then for iAllowedMember = 0 to recAllowedMemberCount AllowedMembersMemberID = allAllowedMemberData(amMEMBER_ID, iAllowedMember) if tmpStrUserList = "" then tmpStrUserList = AllowedMembersMemberID else tmpStrUserList = tmpStrUserList & "," & AllowedMembersMemberID end if next end if end if SelectSize = 6 Response.Write " " & vbNewLine & _ " " & vbNewLine '################################################################################# '## Allowed User - End of listbox code '################################################################################# end if end if Response.Write " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewLine & _ "
Screensize:" & vbNewLine & _ " " & vbNewLine & _ "
UserName:
Password:
Category:" & vbNewLine & _ " " & vbNewLine & _ " " & getCurrentIcon(strIconSmileQuestion,"Click here to get more help on this option","") & "
Forum:" & vbNewLine if mlev = 3 or mlev = 4 then Response.Write " " & vbNewLine end if set rsForum = nothing if mlev = 3 or mlev = 4 then Response.Write " " & vbNewline end if Response.Write "
Default Days:" & vbNewLine & _ " " & getCurrentIcon(strIconSmileQuestion,"Click here to get more help on this option","") & "
Increase Post Count:" & vbNewLine & _ " " & getCurrentIcon(strIconSmileQuestion,"Click here to get more help on this option","") & "
Subject:
Address: "") then Response.Write(TxtURL) else Response.Write("http://") Response.Write """ size=""40"">" & getCurrentIcon(strIconSmileQuestion,"Click here to get more help on this option","") & "
Message:
" & vbNewLine & _ "
" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine if strAllowHTML = "1" then Response.Write " * HTML is ON
" & vbNewLine else Response.Write " * HTML is OFF
" & vbNewLine end if if strAllowForumCode = "1" then Response.Write " * Forum Code is ON
" & vbNewLine else Response.Write " * Forum Code is OFF
" & vbNewLine end if if strIcons = "1" and strShowSmiliesTable = "1" then if strRqMethod = "Edit" or strRqMethod = "EditTopic" or _ strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or strRqMethod = "TopicQuote" then %> <% end if end if Response.Write "
" & vbNewLine & _ "

Moderators:" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
Available
" & vbNewLine & _ " " & vbNewLine & _ "

" & vbNewLine & _ " " & getCurrentIcon(strIconPrivateRemAll,"","") & "" & vbNewLine & _ " " & getCurrentIcon(strIconPrivateRemove,"","") & "" & vbNewLine & _ " " & getCurrentIcon(strIconPrivateAdd,"","") & "" & vbNewLine & _ " " & getCurrentIcon(strIconPrivateAddAll,"","") & "" & vbNewLine & _ "
Selected
" & vbNewLine & _ " " & vbNewLine & _ "
 " & getCurrentIcon(strIconSmileQuestion,"Click here to get more help on this option","") & "
" & vbNewLine & _ "
Subscription:" & vbNewLine Response.Write " " & vbNewline Response.Write " " & getCurrentIcon(strIconSmileQuestion,"Click here to get more help on this option","") & "
Moderation:" & vbNewLine Response.Write " " & vbNewline Response.Write " " & getCurrentIcon(strIconSmileQuestion,"Click here to get more help on this option","") & " 
 " & vbNewLine if strRqMethod = "Edit" or strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or strRqMethod = "EditTopic" or strRqMethod = "TopicQuote" then if (strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _ strRqMethod = "Topic" or strRqMethod = "TopicQuote") and strSignatures = "1" and strDSignatures <> "1" then Response.Write " " & vbNewLine & _ " Check here to include your profile signature.
" & vbNewLine end if if strSignatures = "1" and strDSignatures = "1" then Response.Write " " if strRqMethod = "Edit" then Response.Write "Check here to include your profile signature.
" & vbNewLine elseif strRqMethod = "EditTopic" then Response.Write "Check here to include your profile signature.
" & vbNewLine else intSigDefault = getSigDefault(MemberID) Response.Write "Check here to include your profile signature.
" & vbNewLine end if end if '## Subscribe checkbox start ## if strSubscription > 0 and postCat_Subscription > 0 and postForum_Subscription > 0 and strEmail = 1 then ' -- Check for a topic subscription 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 SubLinkFontStart = " " SubLinkFontEnd = "
" & vbNewLine if InArray(strTopicSubs, strRqTopicID) and strRqMethod <> "Topic" then Response.Write SubLinkFontStart & ShowSubLink ("U", strRqCatID, strRqForumID, strRqTopicID, "Y") & SubLinkFontEnd elseif strBoardSubs <> "Y" and not(InArray(strForumSubs,strRqForumID) or InArray(strCatSubs,strRqCatID)) then Response.Write SubLinkFontStart & ShowSubLink ("S", strRqCatID, strRqForumID, strRqTopicID, "Y") & SubLinkFontEnd end if end if '# Subscribe checkbox end ## if ((mLev = 4) or (chkForumModerator(strRqForumId, strDBNTUserName) = "1")) _ and (strRqMethod = "Topic" or strRqMethod = "EditTopic" or strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or strRqMethod = "TopicQuote") then if strStickyTopic = "1" then if strRqMethod = "Topic" then Response.Write " Check here to make this topic sticky.
" & vbNewLine elseif strRqMethod = "EditTopic" then Response.Write " Check here to make this topic sticky.
" & vbNewLine end if end if if blnTStatus = 1 then if strRqMethod <> "EditTopic" then Response.Write " Check here to lock the topic after this post.
" & vbNewLine end if end if end if if (strDBNTUserName = "" and strSignatures <> "1") or (strRqMethod = "EditTopic" and strDSignatures <> "1") then Response.Write "  " & vbNewLine end if end if Response.Write "
Auth Type:" & vbNewLine & _ "  " & getCurrentIcon(strIconSmileQuestion,"Click here to get more help on this option","") & "" & vbNewLine if strRqMethod = "Forum" or _ strRqMethod = "EditForum" then if strRqMethod = "EditForum" then If rs("F_PASSWORD_NEW") <> " " Then strPassword = rs("F_PASSWORD_NEW") else strPassword = " " end if else strPassword = " " end if Response.Write "
Password" if strNTGroups = "1" then Response.Write(" or Global Groups") Response.Write ":
" & vbNewLine & _ " " end if Response.Write "
Allowed Member List:" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ "
Available
" & vbNewLine & _ " " & vbNewLine & _ "

" & vbNewLine & _ " " & getCurrentIcon(strIconPrivateRemAll,"","") & "" & vbNewLine & _ " " & getCurrentIcon(strIconPrivateRemove,"","") & "" & vbNewLine & _ " " & getCurrentIcon(strIconPrivateAdd,"","") & "" & vbNewLine & _ " " & getCurrentIcon(strIconPrivateAddAll,"","") & "" & vbNewLine & _ "
Selected
" & vbNewLine & _ " " & vbNewLine & _ "
 " & getCurrentIcon(strIconSmileQuestion,"Click here to get more help on this option","") & "
" & vbNewLine & _ "
  "0" then if mLev = 3 then Response.Write " onclick=""selectAllOptions(document.PostTopic.AuthUsers);""" else Response.Write " onclick=""selectAllOptions(document.PostTopic.AuthUsers);selectAllOptions(document.PostTopic.ForumMod);""" end if else if mLev > 3 then Response.Write " onclick=""selectAllOptions(document.PostTopic.ForumMod);""" end if end if Response.Write ">" if strAllowForumCode = "1" or strAllowHTML = "1" then if strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "Edit" or _ strRqMethod = "EditTopic" or _ strRqMethod = "Topic" or _ strRqMethod = "TopicQuote" then Response.Write " " end if end if Response.Write " 
" & vbNewline & _ "
" & vbNewline & _ "
" & vbNewline if strRqMethod = "Reply" or _ strRqMethod = "TopicQuote" or _ strRqMethod = "ReplyQuote" then Response.Write " " & vbNewLine & _ " " & vbNewLine & _ "" & vbNewLine & _ "" & vbNewLine & _ " " & vbNewLine & _ "
" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewline & _ " " & vbNewline & _ "
" & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine ' DEM --> Added Select of Moderation Fields strSQL = "SELECT C.CAT_MODERATION, F.F_MODERATION " strSQL = strSQL & "FROM " & strTablePrefix & "CATEGORY C, " & strTablePrefix & "FORUM F " strSQL = strSQL & " WHERE C.CAT_ID = " & strRqCatID strSQL = strSQL & " AND F.FORUM_ID = " & strRqForumID set rsa = my_Conn.Execute (strSql) ' ## Moderators and Admins can see unmoderated posts. if (mLev = 4) or (chkForumModerator(strRqForumId, strDBNTUserName) = "1") then Moderation = "N" else if strModeration = 1 and rsa("CAT_MODERATION") = 1 and (rsa("F_MODERATION") = 1 or rsa("F_MODERATION") = 3) then Moderation = "Y" else Moderation = "N" end if end if ' DEM --> End of Moderation Code '## Forum_SQL strSql = "SELECT M.M_NAME, T.T_DATE, T.T_MESSAGE " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strActivePrefix & "TOPICS T " strSql = strSql & " WHERE M.MEMBER_ID = T.T_AUTHOR AND T.TOPIC_ID = " & strRqTopicID set rs = my_Conn.Execute (strSql) Response.Write " " & vbNewline Response.Write " " & vbNewline Response.Write " " & vbNewline Response.Write " " & vbNewline rs.close set rs = nothing '## Forum_SQL - Get all replies to Topic from the DB strSql ="SELECT M.M_NAME, R.R_DATE, R.R_MESSAGE " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strActivePrefix & "REPLY R " strSql = strSql & " WHERE M.MEMBER_ID = R.R_AUTHOR AND R.TOPIC_ID = " & strRqTopicID ' DEM --> Added check for moderation so that only admins and moderators can see the unapproved posts. if Moderation = "Y" then strSql = strSql & " AND R.R_STATUS < 2 " ' Ignore unapproved and rejected posts... else strSql = strSql & " AND R.R_STATUS < 3 " ' Ignore all rejected posts.... end if strSql = strSql & " ORDER BY R.R_DATE DESC;" set rs = Server.CreateObject("ADODB.Recordset") rs.open TopSQL(strSql,strPageSize), my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText if rs.EOF then recReplyCount = "" else allReplyData = rs.GetRows(adGetRowsRest) recReplyCount = UBound(allReplyData,2) end if rs.close set rs = nothing strI = 0 if recReplyCount = "" then Response.Write "" else Response.Write " " & vbNewLine & _ " " & vbNewLine & _ " " & vbNewLine mM_NAME = 0 rR_DATE = 1 rR_MESSAGE = 2 for iReply = 0 to recReplyCount ReplyMemberName = allReplyData(mM_NAME, iReply) ReplyDate = allReplyData(rR_DATE, iReply) ReplyMessage = allReplyData(rR_MESSAGE, iReply) if strI = 0 then CColor = strAltForumCellColor else CColor = strForumCellColor end if Response.Write " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline & _ " " & vbNewline strI = strI + 1 if strI = 2 then strI = 0 end if next end if Response.Write "
T O P I C    R E V I E W
" & ChkString(rs("M_NAME"),"display") & "Posted - " & ChkDate(rs("T_DATE"), " :" ,true) & "
" & formatStr(rs("T_MESSAGE")) & "
" & recReplyCount+1 & "   L A T E S T    R E P L I E S    (Newest First)
" & ChkString(ReplyMemberName,"display") & "Posted - " & ChkDate(ReplyDate, " :" ,true) & "
" & formatStr(ReplyMessage) & "
" & vbNewline & _ "
" & vbNewline & _ "
" & vbNewline end if WriteFooter function Go_Result(message) Response.write "
" & message & "
" &_ "
" &_ " " WriteFooter Response.end end function %>