📄 post.asp
字号:
intRows = 12
end select
Response.Write " <script language=""JavaScript"" type=""text/javascript"" src=""inc_code.js""></script>" & vbNewLine & _
" <script language=""JavaScript"" type=""text/javascript"" src=""selectbox.js""></script>" & 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 & "<b>Note:</b> You must be registered in order to post a reply.<br />"
if strProhibitNewMembers <> "1" then
Msg = Msg & "To register, <a href=""policy.asp"">click here</a>. Registration is FREE!<br />"
end if
end if
case "Topic"
if (strNoCookies = 1) or (strDBNTUserName = "") then
Msg = Msg & "<b>Note:</b> You must be registered in order to post a Topic.<br />"
if strProhibitNewMembers <> "1" then
Msg = Msg & "To register, <a href=""policy.asp"">click here</a>. Registration is FREE!<br />"
end if
end if
case "Category"
Msg = Msg & "<b>Note:</b> You must be an Administrator to create a new Category.<br />"
case "Forum"
Msg = Msg & "<b>Note:</b> You must be an Administrator to create a new Forum.<br />"
case "URL"
Msg = Msg & "<b>Note:</b> You must be an Administrator to create a new Web Link.<br />"
case "Edit", "EditTopic"
Msg = Msg & "<b>Note:</b> Only the poster of this message, and the Moderator can edit the message."
case "EditForum"
Msg = Msg & "<b>Note:</b> Only the Moderator or an Administrator can edit a Forum."
case "EditURL"
Msg = Msg & "<b>Note:</b> Only the Moderator or an Administrator can edit a Web Link."
case "EditCategory"
Msg = Msg & "<b>Note:</b> 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 " <table border=""0"" width=""100%"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""33%"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"" tabindex=""-1"">All Forums</a><br />" & vbNewLine
if strRqMethod = "EditCategory" then
Response.Write " " & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " " & ChkString(TxtSub,"display") & "<br />" & vbNewLine
elseif strRqMethod = "EditForum" or strRqMethod = "EditURL" then
Response.Write " " & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp?CAT_ID=" & strRqCatID & """ tabindex=""-1"">" & ChkString(strCatName,"display") & "</a><br />" & vbNewLine
Response.Write " " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " " & ChkString(TxtSub,"display") & "<br />" & 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 " <a href=""default.asp?CAT_ID=" & strRqCatId & """ tabindex=""-1"">" & ChkString(Cat_Name,"display") & "</a><br />" & 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 " <a href=""forum.asp?FORUM_ID=" & strRqForumId & """ tabindex=""-1"">" & ChkString(Forum_Subject,"display") & "</a><br />" & 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 " <a href=""topic.asp?TOPIC_ID=" & strRqTopicID & """ tabindex=""-1"">" & ChkString(Topic_Title,"title") & "</a>" & vbNewLine
end if
Response.Write " </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & Msg & "</font></p>" & vbNewLine & _
" <table border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpBorderColor & """>" & vbNewLine & _
" <table border=""0"" cellspacing=""1"" cellpadding=""1"">" & vbNewLine & _
" <form name=""PostTopic"" method=""post"" action=""post_info.asp"""
select case strRqMethod
case "Topic", "EditTopic", "Reply", "ReplyQuote", "TopicQuote", "Edit"
Response.Write(" onSubmit=""return validate();""")
case else
Response.Write ""
end select
'strRefer = Request.ServerVariables("HTTP_REFERER")
if strReferer = "" then strReferer = chkString(Request.Form("Refer"),"refer")
if strReferer = "" then strReferer = "default.asp"
Response.Write ">" & vbNewLine & _
" <input name=""ARCHIVE"" type=""hidden"" value=""" & ArchiveView & """>" & vbNewLine & _
" <input name=""Method_Type"" type=""hidden"" value=""" & strRqMethod & """>" & vbNewLine & _
" <input name=""Type"" type=""hidden"" value=""" & Request.QueryString("type") & """>" & vbNewLine & _
" <input name=""REPLY_ID"" type=""hidden"" value=""" & strRqReplyID & """>" & vbNewLine & _
" <input name=""TOPIC_ID"" type=""hidden"" value=""" & strRqTopicID & """>" & vbNewLine & _
" <input name=""FORUM_ID"" type=""hidden"" value=""" & strRqForumId & """> " & vbNewLine & _
" <input name=""CAT_ID"" type=""hidden"" value=""" & strRqCatID & """>" & vbNewLine
if strRqMethod = "Edit" or strRqMethod = "EditTopic" then Response.Write(" <input name=""Author"" type=""hidden"" value=""" & strAuthor & """>" & vbNewLine)
Response.Write " <input name=""Refer"" type=""hidden"" value=""" & strReferer & """>" & vbNewLine & _
" <input name=""cookies"" type=""hidden"" value=""yes"">" & 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 " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Screensize:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <select name=""SelectSize"" size=""1"" tabindex=""-1"" onchange=""resizeTextarea('" & strUniqueID & "')"">" & vbNewLine & _
" <option value=""1"""
if strSelectSize = "1" then Response.Write(" selected")
Response.Write ">640 x 480</option>" & vbNewLine & _
" <option value=""2"""
if strSelectSize = "2" or strSelectSize = "" then Response.Write(" selected")
Response.Write ">800 x 600</option>" & vbNewLine & _
" <option value=""3"""
if strSelectSize = "3" then Response.Write(" selected")
Response.Write ">1024 x 768</option>" & vbNewLine & _
" <option value=""4"""
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -