%
CurPageType = "forums"
CurPageInfoChk = "1"
function CurPageInfo ()
strOnlineQueryString = ChkActUsrUrl(Request.QueryString)
If Request.QueryString("method") = "Reply" Then
PageName = Request.QueryString("Topic_Title")
PageAction = "Replying To Message
"
PageLocation = "topic.asp?" & strOnlineQueryString & ""
ElseIf Request.QueryString("method") = "Topic" Then
PageName = Request.QueryString("Forum_Title")
PageAction = "Posting New Topic in
"
PageLocation = "forum.asp?" & strOnlineQueryString & ""
else
PageName = "Unknown"
PageAction = "Unknown"
PageLocation = "fhome.asp"
end if
CurPageInfo = PageAction & " " & "" & PageName & ""
end function
%>
<%
'#################################################################################
'## Variable declaration
'#################################################################################
dim strSelecSize
dim intCols, intRows
%>
<%
'#################################################################################
'## Initialise variables
'#################################################################################
strSelectSize = Request.Form("SelectSize")
strRqMethod = chkString(Request.QueryString("method"), "SQLString")
if Request.QueryString("TOPIC_ID") <> "" or Request.QueryString("TOPIC_ID") <> " " then
if IsNumeric(Request.QueryString("TOPIC_ID")) = True then
strRqTopicID = cLng(Request.QueryString("TOPIC_ID"))
else
Response.Redirect("fhome.asp")
end if
end if
if Request.QueryString("FORUM_ID") <> "" or Request.QueryString("FORUM_ID") <> " " then
if IsNumeric(Request.QueryString("FORUM_ID")) = True then
strRqForumID = cLng(Request.QueryString("FORUM_ID"))
else
Response.Redirect("fhome.asp")
end if
end if
if Request.QueryString("CAT_ID") <> "" or Request.QueryString("CAT_ID") <> " " then
if IsNumeric(Request.QueryString("CAT_ID")) = True then
strRqCatID = cLng(Request.QueryString("CAT_ID"))
else
Response.Redirect("fhome.asp")
end if
end if
if Request.QueryString("REPLY_ID") <> "" or Request.QueryString("REPLY_ID") <> " " then
if IsNumeric(Request.QueryString("REPLY_ID")) = True then
strRqReplyID = cLng(Request.QueryString("REPLY_ID"))
else
Response.Redirect("fhome.asp")
end if
end if
strCkPassWord = chkString(Request.Cookies(strUniqueID & "User")("Pword"), "SQLString")
'#################################################################################
'## Page-code start
'#################################################################################
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 strRqMethod = "Edit" or _
strRqMethod = "EditTopic" or _
strRqMethod = "Reply" or _
strRqMethod = "ReplyQuote" or _
strRqMethod = "Topic" or _
strRqMethod = "TopicQuote" then
'## Forum_SQL - Find out if the Category/Forum/Topic is Locked or Un-Locked and if it Exists
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS, " & strTablePrefix & "FORUM.F_STATUS"
if strRqMethod <> "Topic" then
strSql = strSql & ", " & strTablePrefix & "TOPICS.T_STATUS "
end if
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY, " & strTablePrefix & "FORUM"
if strRqMethod <> "Topic" then
strSql = strSql & ", " & strTablePrefix & "TOPICS "
end if
strSql = strSql & " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & strRqCatID
strSql = strSql & " AND " & strTablePrefix & "FORUM.FORUM_ID = " & strRqForumID
strSql = strSql & " AND " & strTablePrefix & "FORUM.CAT_ID = " & strRqCatID
if strRqMethod <> "Topic" then
strSql = strSql & " AND " & strTablePrefix & "TOPICS.TOPIC_ID = " & strRqTopicID
strSql = strSql & " AND " & strTablePrefix & "TOPICS.FORUM_ID = " & strRqForumID
strSql = strSql & " AND " & strTablePrefix & "TOPICS.CAT_ID = " & strRqCatID
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
blnCStatus = rsStatus("CAT_STATUS")
blnFStatus = rsStatus("F_STATUS")
if strRqMethod <> "Topic" then
blnTStatus = rsStatus("T_STATUS")
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"
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 "ReplyQuote"
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 "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 = 70
intRows = 12
case "3"
intCols = 85
intRows = 12
case "4"
intCols = 125
intRows = 15
case else
intCols = 70
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
" & vbcrlf %> <% Response.End end if end if Msg = "" 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 %>
|
|
|
Website Name: <%= strForumTitle %> Version: 1.200.20020618.593.1 Webmaster: <%= strWebMaster %> |
| " & vbCrLf & _
" ||||||
|
<% if strRqMethod = "Edit" or _ strRqMethod = "EditTopic" or _ strRqMethod = "Reply" or _ strRqMethod = "ReplyQuote" or _ strRqMethod = "TopicQuote" then %> |
There has been a problem!
<% =str_err_Msg %>
<% Response.End end sub %>