% '################################################################################# '## Copyright (C) 2000-01 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("ARCHIVE") = "true" then strActivePrefix = strTablePrefix & "A_" ArchiveView = "true" else strActivePrefix = strTablePrefix ArchiveView = "" end if 'Topic Move Check Dim blnTopicMoved Dim fSubscription fsubscription = 1 blnTopicMoved = false if strAuthType = "db" then strDBNTUserName = Request.Form("UserName") end if MethodType = chkString(Request.Form("Method_Type"),"SQLString") if Request.Form("CAT_ID") <> "" then if IsNumeric(Request.Form("CAT_ID")) = True then Cat_ID = cLng(Request.Form("CAT_ID")) else Response.Redirect("default.asp") end if end if if Request.Form("FORUM_ID") <> "" then if IsNumeric(Request.Form("FORUM_ID")) = True then Forum_ID = cLng(Request.Form("FORUM_ID")) else Response.Redirect("default.asp") end if end if if Request.Form("TOPIC_ID") <> "" then if IsNumeric(Request.Form("TOPIC_ID")) = True then Topic_ID = cLng(Request.Form("TOPIC_ID")) else Response.Redirect("default.asp") end if end if if Request.Form("REPLY_ID") <> "" then if IsNumeric(Request.Form("REPLY_ID")) = True then Reply_ID = cLng(Request.Form("REPLY_ID")) else Response.Redirect("default.asp") end if end if fSubscription = Request("Subscription") if Request("Subscription") = "" then fSubscription = 0 end if set rs = Server.CreateObject("ADODB.RecordSet") err_Msg = "" ok = "" if ArchiveView <> "" then if MethodType = "Reply" or _ MethodType = "ReplyQuote" or _ MethodType = "TopicQuote" then Go_Result fLang(strLangPost_Info00010), 0 end if end if if MethodType = "Edit" then '## Forum_SQL - Get the author of the reply strSql = "SELECT " & strTablePrefix & "REPLY.R_AUTHOR " strSql = strSql & " FROM " & strTablePrefix & "REPLY " strSql = strSql & " WHERE " & strTablePrefix & "REPLY.REPLY_ID = " & REPLY_ID set rsStatus = my_Conn.Execute(strSql) if rsStatus.EOF or rsStatus.BOF then Go_Result fLang(strLangPost_Info00020), 0 else strReplyAuthor = rsStatus("R_AUTHOR") rsStatus.close set rsStatus = nothing end if end if if MethodType = "Edit" or _ MethodType = "EditTopic" or _ MethodType = "Reply" or _ MethodType = "ReplyQuote" or _ MethodType = "Topic" or _ MethodType = "TopicQuote" then if MethodType <> "Topic" then '## Forum_SQL - Find out if the Category, Forum or Topic is Locked or Un-Locked and if it Exists strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS, " &_ strTablePrefix & "FORUM.F_STATUS, " &_ strActivePrefix & "TOPICS.T_STATUS, " &_ strActivePrefix & "TOPICS.T_AUTHOR " &_ " FROM " & strTablePrefix & "CATEGORY, " &_ strTablePrefix & "FORUM, " &_ strActivePrefix & "TOPICS " &_ " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & strActivePrefix & "TOPICS.CAT_ID " &_ " AND " & strTablePrefix & "FORUM.FORUM_ID = " & strActivePrefix & "TOPICS.FORUM_ID " &_ " AND " & strActivePrefix & "TOPICS.TOPIC_ID = " & Topic_ID & "" else '## Forum_SQL - Find out if the Category or Forum is Locked or Un-Locked and if it Exists strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS, " &_ strTablePrefix & "FORUM.F_STATUS " &_ " FROM " & strTablePrefix & "CATEGORY, " &_ strTablePrefix & "FORUM " &_ " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & strTablePrefix & "FORUM.CAT_ID " &_ " AND " & strTablePrefix & "FORUM.FORUM_ID = " & Forum_ID & "" end if set rsStatus = my_Conn.Execute(strSql) if rsStatus.EOF or rsStatus.BOF then Go_Result fLang(strLangPost_Info00020) else blnCStatus = rsStatus("CAT_STATUS") blnFStatus = rsStatus("F_STATUS") if MethodType <> "Topic" then blnTStatus = rsStatus("T_STATUS") strTopicAuthor = rsStatus("T_AUTHOR") else blnTStatus = 1 end if rsStatus.close set rsStatus = nothing end if if (mLev = 4) or (chkForumModerator(Forum_ID, ChkString(strDBNTUserName, "decode"))= "1") or (lcase(strNoCookies) = "1") then AdminAllowed = 1 else AdminAllowed = 0 end if select case MethodType case "Topic" if (blnCStatus = 0) and (AdminAllowed = 0) then Go_Result fLang(strLangPost_Info00030), 0 end if if (blnFStatus = 0) and (AdminAllowed = 0) then Go_Result fLang(strLangPost_Info00040), 0 end if case "EditTopic" if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (AdminAllowed = 0) then Go_Result fLang(strLangPost_Info00050), 0 end if case "Reply", "ReplyQuote", "TopicQuote" if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (AdminAllowed = 0) then Go_Result fLang(strLangPost_Info00060), 0 end if case "Edit" if ((blnCStatus = 0) or (blnFStatus = 0) or (blnTStatus = 0)) and (AdminAllowed = 0) then Go_Result fLang(strLangPost_Info00070), 0 end if end select end if ' If Creating a new topic or reply, the subscription and moderation capabilities will need to be checked. Moderation = "No" if MethodType = "Topic" or _ MethodType = "Reply" or _ MethodType = "ReplyQuote" or _ MethodType = "TopicQuote" or _ MethodType = "Forum" or _ MethodType = "EditForum" then if strModeration > 0 or strSubscription > 0 then '## Forum_SQL - Get the Cat_Subscription, Cat_Moderation, Forum_Subscription, Forum_Moderation strSql = "Select C.CAT_MODERATION, " & "C.CAT_SUBSCRIPTION, " & "C.CAT_NAME " if MethodType <> "Forum" then strSql = strSql & ", F.F_MODERATION, F.F_SUBSCRIPTION " end if strsql = strsql & " FROM " & strTablePrefix & "CATEGORY C" if MethodType <> "Forum" then strSql = strSql & ", " & strTablePrefix & "FORUM F" end if strSql = strSql & " WHERE C.CAT_ID = " & Cat_ID if MethodType <> "Forum" then strSql = strSql & " AND F.FORUM_ID = " & Forum_ID end if set rsCheck = my_Conn.Execute (strSql) CatName = rsCheck("CAT_NAME") CatSubscription = rsCheck("CAT_SUBSCRIPTION") CatModeration = rsCheck("CAT_MODERATION") if MethodType <> "Forum" then ForumSubscription = rsCheck("F_SUBSCRIPTION") ForumModeration = rsCheck("F_MODERATION") end if rsCheck.Close set rsCheck = nothing if MethodType <> "Forum" then '## Moderators and Admins are not subject to Moderation if strModeration = 0 or mlev = 4 or chkForumModerator(Forum_ID, STRdbntUserName) = "1" then Moderation = "No" '## Is Moderation allowed on the category? elseif CatModeration = 1 then '## if this is a topic, is forum moderation set to all posts or topic? if (ForumModeration = 1 or ForumModeration = 2) and (MethodType = "Topic") then Moderation = "Yes" '## if this is a reply, is forum moderation set to all posts or reply? elseif (ForumModeration = 1 or ForumModeration = 3) and (MethodType <> "Topic") then Moderation = "Yes" end if end if end if end if end if if MethodType = "Edit" then member = cint(ChkUser2(strDBNTUserName, Request.Form("Password"), strReplyAuthor)) Select Case Member case 0 '## Invalid Pword Go_Result fLang(strLangPost_Info00080), 0 Response.End case 1 '## Author of Post so OK '## Do Nothing case 2 '## Normal User - Not Authorised Go_Result fLang(strLangPost_Info00090), 0 Response.End case 3 '## Moderator so OK - check the Moderator of this forum if chkForumModerator(Forum_ID, STRdbntUserName) = "0" then Go_Result fLang(strLangPost_Info00090), 0 end if case 4 '## Admin so OK '## Do Nothing case else Go_Result cstr(Member), 0 Response.End end select txtMessage = ChkString(Request.Form("Message"),"message") Err_Msg = "" if txtMessage = " " then Err_Msg = Err_Msg & "
<% =fLang(strLangPost_Info00140) %>
|
><% =fLang(strLangPost_Info00150) %>
<% end if end if if MethodType = "EditTopic" then member = cint(ChkUser2(STRdbntUserName, Request.Form("Password"), strTopicAuthor)) select case Member case 0 '## Invalid Pword Go_Result fLang(strLangPost_Info00080), 0 Response.End case 1 '## Author of Post so OK '## Do Nothing case 2 '## Normal User - Not Authorised Go_Result fLang(strLangPost_Info00090), 0 Response.End case 3 '## Moderator so if chkForumModerator(Forum_ID, STRdbntUserName) = "0" then Go_Result fLang(strLangPost_Info00090), 0 end if case 4 '## Admin so OK '## Do Nothing case else Go_Result cstr(Member), 0 Response.End end select txtMessage = chkString(Request.Form("Message"),"message") txtSubject = chkString(Request.Form("Subject"),"SQLString") Err_Msg = "" if txtSubject = " " then Err_Msg = Err_Msg & "<% =fLang(strLangPost_Info00140) %>
|
><% =fLang(strLangPost_Info00150) %>
<% end if end if if MethodType = "Topic" then '## Forum_SQL strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, "&Strdbntsqlname if strAuthType = "db" then strSql = strSql & ", M_PASSWORD " end if strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE "&Strdbntsqlname&" = '" & ChkString(STRdbntUserName, "SQLString") & "'" strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1 if strAuthType = "db" then strSql = strSql & " AND M_PASSWORD = '" & ChkString(Request.Form("Password"), "SQLString") &"'" QuoteOk = (ChkQuoteOk(STRdbntUserName) and ChkQuoteOk(Request.Form("Password"))) else QuoteOk = ChkQuoteOk(Session(strCookieURL & "userid")) end if set rs = my_Conn.Execute (strSql) if rs.BOF or rs.EOF or not(QuoteOk) or not (ChkQuoteOk(Password))then '## Invalid Password Go_Result fLang(strLangPost_Info00080), 0 Response.End else if not(chkForumAccess(Forum_ID, getNewMemberNumber())) then Go_Result fLang(strLangPost_Info00200), 0 end if txtMessage = ChkString(Request.Form("Message"),"message") txtSubject = ChkString(Request.Form("Subject"),"SQLString") if txtMessage = " " then Go_Result fLang(strLangPost_Info00210), 0 Response.End end if if txtSubject = " " then Go_Result fLang(strLangPost_Info00220), 0 Response.End end if if Request.Form("sig") = "yes" and GetSig(STRdbntUserName) <> "" then txtMessage = txtMessage & vbNewline & vbNewline & ChkString(GetSig(STRdbntUserName), "signature" ) end if '## Forum_SQL - Add new post to Topics Table strSql = "INSERT INTO " & strTablePrefix & "TOPICS (FORUM_ID" strSql = strSql & ", CAT_ID" strSql = strSql & ", T_SUBJECT" strSql = strSql & ", T_MESSAGE" strSql = strSql & ", T_AUTHOR" strSql = strSql & ", T_LAST_POST" strSql = strSql & ", T_LAST_POST_AUTHOR" strSql = strSql & ", T_DATE" strSql = strSql & ", T_STATUS" if strIPLogging <> "0" then strSql = strSql & ", T_IP" end if strSql = strSql & ", T_ARCHIVE_FLAG" '## strSql = strSql & ", C_STRMOVENOTIFY" strSql = strSql & ") VALUES (" strSql = strSql & Forum_ID strSql = strSql & ", " & Cat_ID strSql = strSql & ", '" & txtSubject & "'" strSql = strSql & ", '" & txtMessage & "'" strSql = strSql & ", " & rs("MEMBER_ID") strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'" strSql = strSql & ", " & rs("MEMBER_ID") strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'" if Request.Form("lock") = 1 then strSql = strSql & ", 0 " else if Moderation = "Yes" then strSql = strSql & ", 2 " else strSql = strSql & ", 1 " end if end if if strIPLogging <> "0" then strSql = strSql & ", '" & Request.ServerVariables("REMOTE_ADDR") & "'" end if strSql = strSql & ", 1 " '## strSql = strSql & ", 1 " strSql = strSql & ")" my_Conn.Execute (strSql) if Err.description <> "" then err_Msg = fLang(strLangPost_Info00120) & " = " & Err.description else err_Msg = fLang(strLangPost_Info00130) end if ' DEM --> Do not update forum count if topic is moderated.... Added if and end if if Moderation = "No" then '## Forum_SQL - Increase count of topics and replies in Forum table by 1 strSql = "UPDATE " & strTablePrefix & "FORUM " strSql = strSql & " SET F_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'" strSql = strSql & ", F_TOPICS = F_TOPICS + 1" strSql = strSql & ", F_COUNT = F_COUNT + 1" strSql = strSql & ", F_LAST_POST_AUTHOR = " & rs("MEMBER_ID") & "" strSql = strSql & " WHERE FORUM_ID = " & Forum_ID my_Conn.Execute (strSql) strSql = "SELECT Max(TOPIC_ID) as NewTopicID " strSql = strSql & " FROM " & strActivePrefix & "TOPICS " strSql = strSql & " WHERE FORUM_ID = " & Forum_ID strSql = strSql & " and T_AUTHOR = " & rs("MEMBER_ID") set rs9 = my_Conn.Execute (strSql) NewTopicID = rs9("NewTopicId") rs9.close set rs9 = nothing ProcessSubscriptions rs("Member_ID"), Cat_ID, Forum_ID, NewTopicID end if Go_Result err_Msg, 1 Response.End end if end if if MethodType = "Reply" or MethodType = "ReplyQuote" or MethodType = "TopicQuote" then '## Forum_SQL strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, "&Strdbntsqlname if strAuthType = "db" then strSql = strSql & ", M_PASSWORD " end if strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE "&Strdbntsqlname&" = '" & ChkString(STRdbntUserName, "SQLString") & "'" strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1 if strAuthType = "db" then strSql = strSql & " AND M_PASSWORD = '" & ChkString(Request.Form("Password"), "SQLString") &"'" QuoteOk = (ChkQuoteOk(STRdbntUserName) and ChkQuoteOk(Request.Form("Password"))) else QuoteOk = ChkQuoteOk(STRdbntUserName) end if set rs = my_Conn.Execute (strSql) if rs.BOF or rs.EOF or not(QuoteOk) or not(ChkQuoteOk(Password)) then '## Invalid Password err_Msg = fLang(strLangPost_Info00080) Go_Result(err_Msg), 0 Response.End else if not(chkForumAccess(Forum_ID,getNewMemberNumber())) then Go_Result fLang(strLangPost_Info00200), 0 end if txtMessage = ChkString(Request.Form("Message"),"message") if txtMessage = " " then Go_Result fLang(strLangPost_Info00210), 0 Response.End end if if Request.Form("sig") = "yes" and GetSig(STRdbntUserName) <> "" then txtMessage = txtMessage & vbNewline & vbNewline & ChkString(GetSig(STRdbntUserName), "signature" ) end if '## Forum_SQL strSql = "INSERT INTO " & strTablePrefix & "REPLY " strSql = strSql & "(TOPIC_ID" strSql = strSql & ", FORUM_ID" strSql = strSql & ", CAT_ID" strSql = strSql & ", R_AUTHOR" strSql = strSql & ", R_DATE " if strIPLogging <> "0" then strSql = strSql & ", R_IP" end if strSql = strSql & ", R_STATUS" strSql = strSql & ", R_MESSAGE" strSql = strSql & ") VALUES (" strSql = strSql & Topic_ID strSql = strSql & ", " & Forum_ID strSql = strSql & ", " & Cat_ID strSql = strSql & ", " & rs("MEMBER_ID") strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'" if strIPLogging <> "0" then strSql = strSql & ", " & "'" & Request.ServerVariables("REMOTE_ADDR") & "'" end if ' DEM --> Added R_STATUS to allow for moderation of posts ' Used R_STATUS = 1 to match the topic status code. if Moderation = "Yes" then strSql = strSql & ", 2" else strSql = strSql & ", 1" end if ' DEM --> End of Code added strSql = strSql & ", " & "'" & txtMessage & "'" strSql = strSql & ")" my_Conn.Execute (strSql) ' DEM --> Do not update totals on topics and forums database if post is moderated...Added if and end if if Moderation = "No" then '## Forum_SQL - Update Last Post and count strSql = "UPDATE " & strActivePrefix & "TOPICS " strSql = strSql & " SET T_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'" strSql = strSql & ", T_REPLIES = T_REPLIES + 1 " strSql = strSql & ", T_LAST_POST_AUTHOR = " & rs("MEMBER_ID") if Request.Form("lock") = 1 then strSql = strSql & ", T_STATUS = 0 " end if strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID my_Conn.Execute (strSql) '## Forum_SQL strSql = "UPDATE " & strTablePrefix & "FORUM " strSql = strSql & " SET F_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'" strSql = strSql & ", F_LAST_POST_AUTHOR = " & rs("MEMBER_ID") strSql = strSql & ", F_COUNT = F_COUNT + 1 " strSql = strSql & " WHERE FORUM_ID = " & Forum_ID my_Conn.Execute (strSql) end if if Err.description <> "" then Go_Result fLang(strLangPost_Info00120) & " = " & Err.description, 0 Response.End else if Moderation = "No" then ProcessSubscriptions rs("Member_ID"), Cat_ID, Forum_ID, Topic_ID end if Go_Result fLang(strLangPost_Info00130), 1 Response.End end if end if end if if MethodType = "Forum" then member = cint(ChkUser(strDBNTUserName, Request.Form("Password"))) select case Member case 0 '## Invalid Pword Go_Result fLang(strLangPost_Info00080), 0 Response.End case 1 '## Author of Post '## Do Nothing case 2 '## Normal User - Not Authorised Go_Result fLang(strLangPost_Info00230), 0 Response.End case 3 '## Moderator if chkForumModerator(Forum_ID, STRdbntUserName) = "0" then Go_Result fLang(strLangPost_Info00230), 0 end if case 4 '## Admin '## Do Nothing case else Go_Result cstr(Member), 0 Response.End end select txtMessage = ChkString(Request.Form("Message"),"message") txtSubject = ChkString(Request.Form("Subject"),"SQLString") Err_Msg = "" if txtSubject = " " then Err_Msg = Err_Msg & "<% =fLang(strLangPost_Info00140) %>
|
><% =fLang(strLangPost_Info00150) %>
<% end if end if if MethodType = "URL" then member = cint(ChkUser(strDBNTUserName, Request.Form("Password"))) select case Member case 0'## Invalid Pword Go_Result fLang(strLangPost_Info00080), 0 Response.End case 1 '## Author of Post '## Do Nothing case 2 '## Normal User - Not Authorised Go_Result fLang(strLangPost_Info00250), 0 Response.End case 3 '## Moderator if chkForumModerator(Forum_ID, STRdbntUserName) = "0" then Go_Result fLang(strLangPost_Info00250), 0 end if case 4 '## Admin '## Do Nothing case else Go_Result cstr(Member), 0 Response.End end select txtMessage = ChkString(Request.Form("Message"),"message") txtAddress = ChkString(Request.Form("Address"),"url") txtSubject = ChkString(Request.Form("Subject"),"SQLString") Err_Msg = "" if txtSubject = " " then Err_Msg = Err_Msg & "<% =fLang(strLangPost_Info00140) %>
|
><% =fLang(strLangPost_Info00150) %>
<% end if end if if MethodType = "EditForum" then member = cint(ChkUser(STRdbntUserName, Request.Form("Password"))) select case Member case 0 '## Invalid Pword Go_Result fLang(strLangPost_Info00080), 0 Response.End case 1 '## Author of Post '## Do Nothing case 2 '## Normal User - Not Authorised Go_Result fLang(strLangPost_Info00290), 0 Response.End case 3 '## Moderator if chkForumModerator(Forum_ID, STRdbntUserName) = "0" then Go_Result fLang(strLangPost_Info00290), 0 end if case 4 '## Admin '## Do Nothing case else Go_Result cstr(Member), 0 Response.End end select txtMessage = ChkString(Request.Form("Message"),"message") txtSubject = ChkString(Request.Form("Subject"),"SQLString") Err_Msg = "" if txtSubject = " " then Err_Msg = Err_Msg & "<% =fLang(strLangPost_Info00140) %>
|
><% =fLang(strLangPost_Info00150) %>
<% end if end if if MethodType = "EditURL" then member = cint(ChkUser(strDBNTUserName, Request.Form("Password"))) select case Member case 0 '## Invalid Pword Go_Result "" & fLang(strLangPost_Info00080) & "", 0 Response.End case 1 '## Author of Post '## Do Nothing case 2 '## Normal User - Not Authorised Go_Result fLang(strLangPost_Info00290), 0 Response.End case 3 '## Moderator if chkForumModerator(Forum_ID, STRdbntUserName) = "0" then Go_Result fLang(strLangPost_Info00290), 0 end if case 4 '## Admin '## Do Nothing case else Go_Result cstr(Member), 0 Response.End end select txtMessage = ChkString(Request.Form("Message"),"message") txtAddress = ChkString(Request.Form("Address"),"url") txtSubject = ChkString(Request.Form("Subject"),"SQLString") Err_Msg = "" if txtSubject = " " then Err_Msg = Err_Msg & "<% =fLang(strLangPost_Info00140) %>
|
><% =fLang(strLangPost_Info00150) %>
<% end if end if if MethodType = "Category" then member = cint(ChkUser(STRdbntUserName, Request.Form("Password"))) select case Member case 0 '## Invalid Pword Go_Result fLang(strLangPost_Info00080), 0 Response.End case 1 '## Author of Post '## Do Nothing case 2 '## Normal User - Not Authorised Go_Result fLang(strLangPost_Info00310), 0 Response.End case 3 '## Moderator if chkForumModerator(Forum_ID, STRdbntUserName) = "0" then Go_Result fLang(strLangPost_Info00310), 0 end if case 4 '## Admin '## Do Nothing case else Go_Result cstr(Member), 0 Response.End end select Err_Msg = "" if Request.Form("Subject") = "" then Err_Msg = Err_Msg & "<% =fLang(strLangPost_Info00140) %>
|
><% =fLang(strLangPost_Info00150) %>
<% end if end if if MethodType = "EditCategory" then member = cint(ChkUser(STRdbntUserName, Request.Form("Password"))) select case Member case 0 '## Invalid Pword Go_Result fLang(strLangPost_Info00080), 0 Response.End case 1 '## Author of Post '## Do Nothing case 2 '## Normal User - Not Authorised Go_Result fLang(strLangPost_Info00090), 0 Response.End case 3 '## Moderator '## Do Nothing if chkForumModerator(Forum_ID, STRdbntUserName) = "0" then Go_Result fLang(strLangPost_Info00330), 0 end if case 4 '## Admin '## Do Nothing case else Go_Result cstr(Member), 0 Response.End end select Err_Msg = "" if Request.Form("Subject") = "" then Err_Msg = Err_Msg & "<% =fLang(strLangPost_Info00140) %>
|
><% =fLang(strLangPost_Info00150) %>
<% end if end if set rs = nothing Go_Result "", 1 response.end sub Go_Result(str_err_Msg, boolOk) Response.write "| " &_
" " if MethodType = "Topic" or _ MethodType = "Reply" or _ MethodType = "EditTopic" then Response.write " " end if if MethodType = "Reply" or _ MethodType = "EditTopic" then Response.write " | " &_
"
" select case MethodType case "Edit" Response.Write fLang(strLangPost_Info00360) case "EditCategory" ' DEM --> Added if statement to handle if subscriptions or moderation is allowed if strSubscription > 0 or strModeration > 0 then Response.Write fLang(strLangPost_Info00370) else Response.Write fLang(strLangPost_Info00380) end if case "EditForum" Response.Write fLang(strLangPost_Info00390) case "EditTopic" Response.Write fLang(strLangPost_Info00400) case "EditURL" Response.Write fLang(strLangPost_Info00410) case "Reply", "ReplyQuote", "TopicQuote" ' DEM --> If moderated post, the counts should not be updated until after approval ' Combined the Reply, ReplyQuote and TopicQuote because the basic code was the same. if Moderation = "Yes" then Response.Write fLang(strLangPost_Info00420) & " " & fLang(strLangPost_Info00430) else Response.Write fLang(strLangPost_Info00420) DoPCount DoUCount Request.Form("UserName") DoULastPost Request.Form("UserName") end if case "Topic" ' DEM --> If moderated post, the counts should not be updated until after approval if Moderation = "Yes" then Response.Write fLang(strLangPost_Info00440) & " " & fLang(strLangPost_Info00430) else Response.Write fLang(strLangPost_Info00440) DoTCount DoPCount DoUCount Request.Form("UserName") DoULastPost Request.Form("UserName") end if case "Forum" Response.Write fLang(strLangPost_Info00450) case "URL" Response.Write fLang(strLangPost_Info00460) case "Category" Response.Write fLang(strLangPost_Info00470) case else Response.Write fLang(strLangPost_Info00480) DoPCount DoUCount Request.Form("UserName") DoULastPost Request.Form("UserName") end select Response.write "
" &_ "" &_ "" select case MethodType case "Category" Response.Write fLang(strLangPost_Info00490) case "Forum" Response.Write fLang(strLangPost_Info00500) case "EditForum", "EditCategory" Response.Write fLang(strLangPost_Info00510) case "URL" Response.Write fLang(strLangPost_Info00520) case "EditURL" Response.Write fLang(strLangPost_Info00530) case "Topic", "TopicQuote", "EditTopic", "Reply", "ReplyQuote", "Edit" Response.Write fLang(strLangPost_Info00510) case else Response.Write fLang(strLangPost_Info00540) end select Response.write "
" &_ "" & fLang(strLangPost_Info00550) & "
" else Response.write "" & fLang(strLangPost_Info00560) & "
" &_ "" & str_err_Msg & "
" &_ "" end if WriteFooter Response.End end sub sub newForumMembers(fForumID) on error resume next if Request.Form("AuthUsers") = "" then exit Sub end if Users = split(Request.Form("AuthUsers"),",") for count = Lbound(Users) to Ubound(Users) strSql = "INSERT INTO " & strTablePrefix & "ALLOWED_MEMBERS (" strSql = strSql & " MEMBER_ID, FORUM_ID) VALUES ( "& Users(count) & ", " & fForumID & ")" my_conn.execute (strSql) if err.number <> 0 then Go_REsult err.description, 0 end if next end sub sub updateForumMembers(fForumID) my_Conn.execute ("DELETE FROM " & strTablePrefix & "ALLOWED_MEMBERS WHERE FORUM_ID = " & fForumId) newForumMembers(fForumID) end sub sub DoAutoMoveEmail(TopicNum) '## Emails Topic Author if Topic Moved. strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID," & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.M_EMAIL, " & strActivePrefix & "TOPICS.FORUM_ID, " & strActivePrefix & "TOPICS.T_SUBJECT " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strActivePrefix & "TOPICS " strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strActivePrefix & "TOPICS.T_AUTHOR " strSql = strSql & " AND " & strActivePrefix & "TOPICS.TOPIC_ID = " & TopicNum set rs2 = my_Conn.Execute (strSql) email = rs2("M_EMAIL") user_name = rs2("M_NAME") Topic_Title = rs2("T_SUBJECT") ForumId = rs2("FORUM_ID") Usernum = rs2("MEMBER_ID") rs2.close if lcase(strEmail) = "1" then strRecipientsName = user_name strRecipients = email strSubject = strForumTitle & " - Topic Moved" strMessage = fLangN(strLangPost_Info00580, user_name) & vbCrLf & vbCrLf strMessage = strMessage & fLangN(strLangPost_Info00590,strForumTitle) & vbCrLf strMessage = strMessage & fLangN(strLangPost_Info00600, Topic_Title) & vbCrLf & vbCrLf if not(chkForumAccess(ForumID,Usernum)) then strMessage = strMessage & fLang(strLangPost_Info00610) & vbCrLf else strMessage = strMessage & fLangN(strLangPost_Info00620, vbCrLf & Left(Request.Form("refer"), InstrRev(Request.Form("refer"), "/")) & "topic.asp?TOPIC_ID=" & TopicNum & vbCrLf) end if %> <% end if end sub %>