%
'#################################################################################
'## 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
'#################################################################################
'#################################################################################
'## Variable declaration
'#################################################################################
dim strSelecSize
dim intCols, intRows
%>
<%
'#################################################################################
'## Initialise variables
'#################################################################################
strSelectSize = Request.Form("SelectSize")
strRqMethod = Request.QueryString("method")
strRqTopicID = Request.QueryString("TOPIC_ID")
strRqForumID = Request.QueryString("FORUM_ID")
strRqCatID = Request.QueryString("CAT_ID")
strCkPassWord = Request.Cookies(strUniqueID & "User")("Pword")
'#################################################################################
'## Page-code start
'#################################################################################
if request("ARCHIVE") = "true" then
strActivePrefix = strTablePrefix & "A_"
ArchiveView = "true"
else
strActivePrefix = strTablePrefix
ArchiveView = ""
end if
if strSelectSize = "" or IsNull(strSelectSize) then
strSelectSize = Request.Cookies(strCookieURL & "strSelectSize")
end if
if not(IsNull(strSelectSize)) then
Response.Cookies(strCookieURL & "strSelectSize") = strSelectSize
Response.Cookies(strCookieURL & "strSelectSize").expires = Now() + 365
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 " & strTablePrefix & "CATEGORY.CAT_STATUS, " & strTablePrefix & "CATEGORY.CAT_SUBSCRIPTION, " &_
strTablePrefix & "FORUM.F_STATUS, " & strTablePrefix & "FORUM.F_SUBSCRIPTION, "&_
strActivePrefix & "TOPICS.T_STATUS " &_
" 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 = " & strRqTopicID & ""
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 & "CATEGORY.CAT_SUBSCRIPTION, " &_
strTablePrefix & "FORUM.F_STATUS, " & strTablePrefix & "FORUM.F_SUBSCRIPTION "&_
" FROM " & strTablePrefix & "CATEGORY, " &_
strTablePrefix & "FORUM " &_
" WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & strTablePrefix & "FORUM.CAT_ID " &_
" AND " & strTablePrefix & "FORUM.FORUM_ID = " & strRqForumID & ""
end if
set rsStatus = my_Conn.Execute(strSql)
'--------------------------------------------------------
PostCat_subscription = rsStatus("CAT_SUBSCRIPTION")
PostForum_subscription = rsStatus("F_SUBSCRIPTION")
'--------------------------------------------------------
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
blnCStatus = rsStatus("CAT_STATUS")
blnFStatus = rsStatus("F_STATUS")
if strRqMethod <> "Topic" then
blnTStatus = rsStatus("T_STATUS")
else
blnTStatus = 1
end if
rsStatus.close
set rsStatus = nothing
end if
if (mLev = 4) or (chkForumModerator(strRqForumID, ChkString(strDBNTUserName, "decode"))= "1") or (lcase(strNoCookies) = "1") then
AdminAllowed = 1
else
AdminAllowed = 0
end if
select case strRqMethod
case "Topic"
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
end if
select case strSelectSize
case "1"
intCols = 45
intRows = 6
case "2"
intCols = 75
intRows = 12
case "3"
intCols = 90
intRows = 12
case "4"
intCols = 130
intRows = 15
case else
intCols = 75
intRows = 12
end select
%>
<%
if strRqMethod = "EditForum" then
if (mLev = 4) or (chkForumModerator(strRqForumId, strDBNTUserName) = "1") then
'## Do Nothing
else
Response.Write "
ERROR: Only moderators and administrators can edit forums
" & vbNewline WriteFooter Response.End end if end if Msg = "" '################################################################################# '## File Attachment Code '################################################################################# Dim boolUploads if intAllowUploads > 0 then Dim AllowedForums select case intAllowUploads case 1 if mLev = 3 then boolUploads = true case 2 strSql = "SELECT M_ALLOWUPLOADS" strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE " & Strdbntsqlname & " = '" & strDBNTUsername & "' " set rs = my_conn.execute(strSQL) if not rs.EOF then if rs("M_ALLOWUPLOADS") <> 1 then boolUploads = false else boolUploads = true end if end if 'if you wish to allow moderators as wel , uncomment the line below 'if mLev = 3 then boolUploads = True case 3 boolUploads = true case else boolUploads = false end select strSql = "SELECT M_VALUE" strSql = strSql & " FROM " & strTablePrefix & "MODS " strSql = strSql & " WHERE M_NAME = 'Attachment' AND M_CODE = 'faAllowedForums'" set rsAttach = my_conn.execute(strSQL) if not rsAttach.EOF then if boolUploads then tmpStr = rsAttach("M_VALUE") isAllowedForum = false if tmpStr <> "" and not IsNull(tmpStr) then AllowedForums = split(tmpStr ,",") if tmpstr <> "" and strRqForumID <> "" and AllowedForums(0) <> "" then for counter = lbound(AllowedForums) to uBound(AllowedForums) if trim(AllowedForums(counter)) = strRqForumID then isAllowedForum = true counter = uBound(AllowedForums) end if next end if end if end if end if boolUploads = boolUploads AND isAllowedForum if mLev = 4 then boolUploads = true 'Administrator override rsAttach.close end if '################################################################################# '## End '################################################################################# select case strRqMethod case "Reply" if (strNoCookies = 1) or (strDBNTUserName = "") then Msg = Msg & "Note: You must be registered in order to post a reply.|
<% if strRqMethod = "EditCategory" then %> <% else 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 = "Edit" or _ strRqMethod = "EditTopic" or _ strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "TopicQuote" then %> |
<% =Msg %>
|
| " & vbNewline & _
"
| " & vbNewline & _
" ||||||