📄 post_info.asp
字号:
strSql = strSql & ", F_SUBJECT"
strSql = strSql & ", F_URL"
strSql = strSql & ", F_URLIMAGE"
strSql = strSql & ", F_DESCRIPTION"
strSql = strSql & ", F_TYPE"
strSql = strSql & ") VALUES ("
strSql = strSql & Request.Form("CAT_ID")
if strPrivateForums = "1" then
strSql = strSql & ", " & Request.Form("AuthType") & ""
'##########
if Request.Form("HideForum") = 1 then
strSql = strSql & ", 1 "
else
strSql = strSql & ", 0 "
end if
'##########
' strSql = strSql & ", '" & ChkString(Request.Form("AuthUsers"),"list") & "'"
end if
strSql = strSql & ", " & "'" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", " & getMemberID(Request.Form("UserName")) & " "
strSql = strSql & ", " & "'" & txtSubject & "'"
strSql = strSql & ", " & "'" & txtAddress & "'"
strSql = strSql & ", " & "'" & Request.Form("UrlImage") & "'"
strSql = strSql & ", " & "'" & txtMessage & "'"
strSql = strSql & ", " & Request.Form("Type")
strSql = strSql & ") "
my_Conn.Execute (strSql)
err_Msg = ""
if Err.description <> "" then
Go_Result "发生一个错误 → " & Err.description, 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
else
'########### Update allowed user list ##############################
set rsCount = my_Conn.execute("SELECT MAX(FORUM_ID) AS maxForumID FROM " & strTablePrefix & "FORUM ")
newForumMembers rsCount("maxForumId")
'##################################################################
Go_Result "更新完成", 1
end if
else
%>
<p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">你输入的资料有问题或没有填写完整</font></p>
<table align=center border=0>
<tr>
<td><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<ul>
<% =Err_Msg %>
</ul>
</font></td>
</tr>
</table>
<p align=center><font face="<% =strDefaultFontFace %>" size=<% =strDefaultFontSize %>><a href="JavaScript:history.go(-1)">请返回重新输入</a></font></p>
<%
end if
end if
if Request.Form("Method_Type") = "EditForum" then
member = cint(ChkUser(STRdbntUserName, Request.Form("Password")))
select case Member
case 0
'## Invalid Pword
Go_Result "错误的用户名跟密码", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "只有管理员和版主可以修改论坛属性", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
case 3 '## Moderator
if chkForumModerator(Request.Form("FORUM_ID"), STRdbntUserName) = "0" then
Go_Result "Only Admins and Moderators change this Forum", 0
end if
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
end select
txtMessage = ChkString(Request.Form("Message"),"message")
txtSubject = ChkString(Request.Form("Subject"),"title")
Err_Msg = ""
if txtSubject = " " then
Err_Msg = Err_Msg & "<li>你必须输入论坛的名称</li>"
end if
if txtMessage = " " then
Err_Msg = Err_Msg & "<li>你必须输入论坛的简介</li>"
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strTablePrefix & "FORUM "
strSql = strSql & " SET CAT_ID = " & Request.Form("Category")
if strPrivateForums = "1" then
strSql = strSql & ", F_PRIVATEFORUMS = " & Request.Form("AuthType") & ""
strSql = strSql & ", F_PASSWORD_NEW = '" & ChkString(Request.Form("AuthPassword"),"password") & "'"
'###########
if Request.Form("HideForum") = 1 then
strSql = strSql & ", F_HIDDEN = 1 "
else
strSql = strSql & ", F_HIDDEN = 0 "
end if
'###########
' strSql = strSql & ", F_USERLIST = '" & ChkString(Request.Form("AuthUsers"),"list") & "'"
end if
strSql = strSql & ", F_SUBJECT = '" & txtSubject & "'"
strSql = strSql & ", F_DESCRIPTION = '" & txtMessage & "'"
strSql = strSql & " WHERE FORUM_ID = " & Request.Form("FORUM_ID")
my_Conn.Execute (strSql)
err_Msg= ""
if Err.description <> "" then
Go_Result "发生一个错误 → " & Err.description, 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
else
'########## Update Allowed user List ###############################
set rsCount = my_Conn.execute("SELECT MAX(FORUM_ID) AS maxForumID FROM " & strTablePrefix & "FORUM ")
updateForumMembers Request.Form("FORUM_ID")
'###################################################################
Go_Result "更新完成", 1
end if
else
%>
<p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">你输入的资料有问题或没有填写完整</font></p>
<table align=center border=0>
<tr>
<td><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<ul>
<% =Err_Msg %>
</ul>
</font></td>
</tr>
</table>
<p align=center><font face="<% =strDefaultFontFace %>" size=<% =strDefaultFontSize %>><a href="JavaScript:history.go(-1)">请返回重新输入</a></font></p>
<%
end if
end if
if Request.Form("Method_Type") = "EditURL" then
member = cint(ChkUser(strDBNTUserName, Request.Form("Password")))
select case Member
case 0
'## Invalid Pword
Go_Result "错误的用户名跟密码", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "只有管理员和版主可以修改论坛属性", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
case 3 '## Moderator
if chkForumModerator(Request.Form("FORUM_ID"), STRdbntUserName) = "0" then
Go_Result "Only Admins and Moderators change this Forum", 0
end if
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
end select
txtMessage = ChkString(Request.Form("Message"),"message")
txtAddress = ChkString(Request.Form("Address"),"url")
txtSubject = ChkString(Request.Form("Subject"),"title")
Err_Msg = ""
if txtSubject = " " then
Err_Msg = Err_Msg & "<li>你必须输入新连接的名称</li>"
end if
if txtAddress = " " or lcase(txtAddress) = "http://" or lcase(txtAddress) = "https://" or lcase(txtAddress) = "file:///" then
Err_Msg = Err_Msg & "<li>你必须输入新连接的网址</li>"
end if
if (left(lcase(txtAddress), 7) <> "http://" and left(lcase(txtAddress), 8) <> "https://" and left(lcase(txtAddress), 8) <> "file:///") and (txtAddress <> "") then
Err_Msg = Err_Msg & "<li>你必须在网址前加上 <b>http://</b>, <b>https://</b> or <b>file:///</b></li>"
end if
if txtMessage = "" then
Err_Msg = Err_Msg & "<li>你必须输入新连接的简介</li>"
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strTablePrefix & "FORUM "
strSql = strSql & " SET CAT_ID = " & Request.Form("Category")
if strPrivateForums = "1" then
strSql = strSql & ", F_PRIVATEFORUMS = " & Request.Form("AuthType") & ""
'#############
if Request.Form("HideForum") = 1 then
strSql = strSql & ", F_HIDDEN=1 "
else
strSql = strSql & ", F_HIDDEN=0 "
end if
'#############
' strSql = strSql & ", F_USERLIST = '" & ChkString(Request.Form("AuthUsers"),"list") & "'"
end if
strSql = strSql & ", F_SUBJECT = '" & txtSubject & "'"
strSql = strSql & ", F_URL = '" & txtAddress & "'"
strSql = strSql & ", F_URLIMAGE = '" & Request.Form("UrlImage") & "'"
strSql = strSql & ", F_DESCRIPTION = '" & txtMessage & "'"
strSql = strSql & " WHERE FORUM_ID = " & Request.Form("FORUM_ID")
my_Conn.Execute (strSql)
err_Msg= ""
if Err.description <> "" then
Go_Result "发生一个错误 → " & Err.description, 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
else
'########## Update Allowed user List ###############################
set rsCount = my_Conn.execute("SELECT MAX(FORUM_ID) AS maxForumID FROM " & strTablePrefix & "FORUM ")
updateForumMembers Request.Form("FORUM_ID")
'###################################################################
Go_Result "更新完成", 1
end if
else
%>
<p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">你输入的资料有问题或没有填写完整</font></p>
<table align=center border=0>
<tr>
<td><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<ul>
<% =Err_Msg %>
</ul>
</font></td>
</tr>
</table>
<p align=center><font face="<% =strDefaultFontFace %>" size=<% =strDefaultFontSize %>><a href="JavaScript:history.go(-1)">请返回重新输入</a></font></p>
<%
end if
end if
if Request.Form("Method_Type") = "Category" then
member = cint(ChkUser(STRdbntUserName, Request.Form("Password")))
select case Member
case 0
'## Invalid Pword
Go_Result "错误的用户名跟密码", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "只有管理员才能建立新分类", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
case 3 '## Moderator
if chkForumModerator(Request.Form("FORUM_ID"), STRdbntUserName) = "0" then
Go_Result "只有管理员才能建立新分类", 0
end if
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
end select
Err_Msg = ""
if Request.Form("Subject") = "" then
Err_Msg = Err_Msg & "<li>你必须输入新分类的名称</li>"
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
strSql = "INSERT INTO " & strTablePrefix & "CATEGORY (CAT_NAME) "
strSql = strSql & " VALUES ('" & ChkString(Request.Form("Subject"),"title") & "')"
my_Conn.Execute (strSql)
err_Msg= ""
if Err.description <> "" then
Go_Result "发生一个错误 → " & Err.description, 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
else
Go_Result "更新完成", 1
end if
else
%>
<p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">你输入的资料有问题或没有填写完整</font></p>
<table align=center border=0>
<tr>
<td><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<ul>
<% =Err_Msg %>
</ul>
</font></td>
</tr>
</table>
<p align=center><font face="<% =strDefaultFontFace %>" size=<% =strDefaultFontSize %>><a href="JavaScript:history.go(-1)">请返回重新输入</a></font></p>
<%
end if
end if
if Request.Form("Method_Type") = "EditCategory" then
member = cint(ChkUser(STRdbntUserName, Request.Form("Password")))
select case Member
case 0
'## Invalid Pword
Go_Result "错误的用户名跟密码", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
case 1 '## Author of Post
'## Do Nothing
case 2 '## Normal User - Not Authorised
Go_Result "只有管理员才能修改分类", 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
case 3 '## Moderator
'## Do Nothing
if chkForumModerator(Request.Form("FORUM_ID"), STRdbntUserName) = "0" then
Go_Result "只有管理员才能修改分类", 0
end if
case 4 '## Admin
'## Do Nothing
case else
Go_Result cstr(Member), 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
Response.End
end select
Err_Msg = ""
if Request.Form("Subject") = "" then
Err_Msg = Err_Msg & "<li>必须输入分类的名称</li>"
end if
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strTablePrefix & "CATEGORY "
strSql = strSql & " SET CAT_NAME = '" & ChkString(Request.Form("Subject"),"title") & "'"
strSql = strSql & " WHERE CAT_ID = " & Request.Form("CAT_ID")
my_Conn.Execute (strSql)
err_Msg= ""
if Err.description <> "" then
Go_Result "发生一个错误 → " & Err.description, 0
%>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
End If
i = 1
do until i > cint(Request.Form("NumberForums"))
SelectName = "SortForum" & i
SelectID = "SortForumID" & i
'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strTablePrefix & "FORUM "
strSql = strSql & " SET FORUM_ORDER = " & Request.Form(SelectName)
strSql = strSql & " WHERE FORUM_ID = " & Request.Form(SelectId)
my_Conn.Execute (strSql)
err_Msg= ""
if Err.description <> "" then
Go_Result "发生一个错误 → " & Err.description, 0
End if
i = i + 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -