📄 manage.asp
字号:
<!-- #include file="Setup.asp" -->
<%
if CookieUserName=empty then error("您还未<a href=Login.asp?ReturnUrl="&ReturnUrl&">登录</a>")
if Request.ServerVariables("Request_method") <> "POST" then
response.write "<body><form name=CheckPOST method=Post action=?"&Request.ServerVariables("Query_String")&"></form><script language='JavaScript'>if(window.confirm('您确定要执行该操作?')){document.forms['CheckPOST'].submit()}else{history.back()}</script></body></html>"
Response.End
end if
HtmlTop
PostID=RequestInt("PostID")
ThreadID=RequestInt("ThreadID")
sql="Select * From [Wo_Threads] where ThreadID="&ThreadID&""
Rs.Open sql,Conn,1
if Rs.eof then error"<li>系统不存在该主题的资料"
ForumID=Rs("ForumID")
PostsTableName=Rs("PostsTableName")
PostAuthor=Rs("PostAuthor")
ThreadID=Rs("ThreadID")
TotalReplies=Rs("TotalReplies")
Topic=Rs("Topic")
Rs.close
Moderated=Conn.Execute("Select Moderated From [Wo_Forums] where ForumID="&ForumID&" ")(0)
%>
<!-- #include file="Utility/ForumPermissions.asp" -->
<%
if PermissionManage=0 then error("您的<a href=ShowForumPermissions.asp?ForumID="&ForumID&">权限</a>不够")
select case Request("menu")
case "Top"
if BestRole = 1 then
Conn.execute("update [Wo_Threads] set ThreadTop=2 where ThreadID="&ThreadID&"")
succtitle="公告主题成功"
else
error("您的权限不够")
end if
case "UnTop"
if BestRole = 1 then
Conn.execute("update [Wo_Threads] set ThreadTop=0 where ThreadID="&ThreadID&"")
succtitle="取消公告主题成功"
else
error("您的权限不够")
end if
case "Fix"
TotalCount=conn.Execute("Select count(PostID) From [Wo_Posts"&PostsTableName&"] where ThreadID="&ThreadID&"")(0)
Conn.execute("update [Wo_Threads] set TotalReplies="&TotalCount&"-1 where ThreadID="&ThreadID&"")
succtitle="修复主题成功"
case "MoveNew"
Conn.execute("update [Wo_Threads] set lasttime="&SqlNowString&" where ThreadID="&ThreadID&"")
succtitle="拉前主题成功"
case "Move"
AimForumID=RequestInt("AimForumID")
if AimForumID=0 then error("您没有选择要将主题移动哪个群组")
Conn.execute("update [Wo_Threads] set ForumID="&AimForumID&",ThreadTop=0,IsGood=0,IsLocked=0 where ThreadID="&ThreadID&"")
succtitle="移动主题成功"
case "IsGood"
if Conn.Execute("Select IsGood From [Wo_Threads] where ThreadID="&ThreadID&" ")(0)=1 then error("此主题已经加入精华区了,无需重复添加")
Conn.execute("update [Wo_Threads] set IsGood=1 where ThreadID="&ThreadID&"")
Conn.execute("update [Wo_Users] set UserMoney=UserMoney+3,experience=experience+3 where UserName='"&PostAuthor&"'")
succtitle="加为精华主题成功"
case "DelIsGood"
if Conn.Execute("Select IsGood From [Wo_Threads] where ThreadID="&ThreadID&" ")(0)=0 then error("此主题已经移出精华区了")
Conn.execute("update [Wo_Threads] set IsGood=0 where ThreadID="&ThreadID&"")
Conn.execute("update [Wo_Users] set UserMoney=UserMoney-3,experience=experience-3 where UserName='"&PostAuthor&"'")
succtitle="取消精华主题成功"
case "ThreadTop"
Conn.execute("update [Wo_Threads] set ThreadTop=1 where ThreadID="&ThreadID&"")
succtitle="置顶主题成功"
case "DelTop"
Conn.execute("update [Wo_Threads] set ThreadTop=0 where ThreadID="&ThreadID&"")
succtitle="取消置顶主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "IsLocked"
Conn.execute("update [Wo_Threads] set IsLocked=1 where ThreadID="&ThreadID&"")
succtitle="锁定主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
case "DelIsLocked"
Conn.execute("update [Wo_Threads] set IsLocked=0 where ThreadID="&ThreadID&"")
succtitle="解锁主题成功"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
end select
if succtitle="" then error("无效指令")
UpForumMostRecent(ForumID)
Log(""&succtitle&",标题:"&Topic&",主题ID:"&ThreadID&"")
Message="<li>"&succtitle&"</li><li><a href=ShowForum.asp?ForumID="&ForumID&">返回</a></li>"
succeed Message,"ShowForum.asp?ForumID="&ForumID&""
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -