📄 moderation.asp
字号:
<!-- #include file="Cls.asp" -->
<%
ChkUser
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Menu=HTMLEncode(Replace(Replace(Replace(Request("menu"),chr(34),""),"<",""),">",""))
ForumID=ChkNumeric(Request.QueryString("ForumID"))
if ForumID>0 Then
ForumData=GetForumData(ForumID)
Moderated=ForumData(3)
if ForumData(4)<>"" then
filtrate=split(ForumData(4),"|")
for i = 0 to UBound(filtrate)
CategoriesOptionList=CategoriesOptionList&"<option value="&filtrate(i)&">"&filtrate(i)&"</option>"
next
end if
%><!-- #include file="inc/ForumPermissions.asp" --><%
if PermissionsManage=0 then Error 0,""
ForumSql=" and ForumID="&ForumID&""
Elseif BestRole=1 then
ForumSql=""
Else
Error 0,""
end if
Select case Request("Item")
case "BatchRecycle"
for each ho in Request.Form("ThreadID")
ho=int(ho)
Conn.Execute("update [WxThreads] set IsDel=0,lasttime="&SqlNowString&",lastname='"&CookieUserName&"' where id="&ho&" and IsDel=1"&ForumSql)
next
Log("还原回收站内的帖子,主题ID:"&Request.Form("ThreadID")&"")
Error2("成功还原回收站内的帖子")
case "BatchCensorship"
if Request.Form("BatchCensorship")=0 Then
check=1
Else
check=0
end if
for each ho in Request.Form("ThreadID")
ho=int(ho)
Conn.Execute("update [WxThreads] set IsDel="&check&" where id="&ho&" and IsDel=1")
next
Log("帖子通过审查,主题ID:"&Request.Form("ThreadID")&"")
Error2("帖子已经成功通过审查")
case "BatchDel"
IsDel=int(Request.Form("IsDel"))
for each ho in Request.Form("ThreadID")
ho=int(ho)
Conn.Execute("update [WxThreads] set IsDel="&IsDel&",lasttime="&SqlNowString&",lastname='"&CookieUserName&"' where id="&ho&"")
next
Log("批量删除,主题ID:"&Request.Form("ThreadID")&"")
Error2("操作成功")
case "BatchHardDel"
for each ho in Request.Form("ThreadID")
ho=int(ho)
Conn.execute("delete from [WxPosts"&PostsTableName&"] where ThreadID="&ho&"")
Conn.execute("delete from [WxThreads] where ID="&ho&"")
next
CreateCache()
Log("批量硬性删除,主题ID:"&Request.Form("ThreadID")&"")
Error2("操作成功")
case "BatchGood"
IsGood=int(Request.Form("IsGood"))
for each ho in Request.Form("ThreadID")
ho=int(ho)
Conn.Execute("update [WxThreads] set IsGood="&IsGood&",lasttime="&SqlNowString&",lastname='"&CookieUserName&"' where id="&ho&""&ForumSql)
next
Log("批量精华,主题ID:"&Request.Form("ThreadID")&"")
Error2("操作成功")
case "BatchLocked"
IsLocked=int(Request.Form("IsLocked"))
for each ho in Request.Form("ThreadID")
ho=int(ho)
Conn.Execute("update [WxThreads] set IsLocked="&IsLocked&",lasttime="&SqlNowString&",lastname='"&CookieUserName&"' where id="&ho&""&ForumSql)
next
Log("批量锁定,主题ID:"&Request.Form("ThreadID")&"")
Error2("操作"&IsLocked&"成功")
case "BatchCategory"
for each ho in Request.Form("ThreadID")
ho=int(ho)
Conn.Execute("update [WxThreads] set Category='"&HTMLEncode(Request.Form("Category"))&"',lasttime="&SqlNowString&",lastname='"&CookieUserName&"' where id="&ho&""&ForumSql)
next
Log("批量分类,主题ID:"&Request.Form("ThreadID")&"")
Error2("操作成功")
case "BatchMoveTopic"
AimForumID=ChkNumeric(Request.Form("AimForumID"))
if AimForumID="" then Error "输入错误","<li>请选择将主题移动到的版块</li>"
for each ho in Request.Form("ThreadID")
ho=int(ho)
Conn.Execute("update [WxThreads] set ForumID="&AimForumID&",IsTop=0,IsGood=0,IsLocked=0 where id="&ho&""&ForumSql)
next
Log("批量移动,主题ID:"&Request.Form("ThreadID")&"")
Error2("操作成功")
end Select
Select case Menu
case "Recycle"
sql="[WxThreads] where IsDel=1 and PostTime<>lasttime"&ForumSql&""
IsRecycle=1
topr("回收站")
case "Censorship"
sql="[WxThreads] where IsDel=1 and PostTime=lasttime"&ForumSql&""
topr("审核帖子")
case Else
sql="[WxThreads] where IsDel=0"&ForumSql&""
topr("批量管理")
end Select
sub topr(name)
top name,true
%><div class="nav dt"><img alt="" src="Images/Forum_nav.gif" /> <%=ClubTree%> → <a href="Moderation.asp?menu=<%=Menu%>"><%=name%></a></div>
<%end sub%>
<div class="tb dt">
<form method="post" action="Moderation.asp?ForumID=<%=ForumID%>">
<%=Replace(Cache("boardtb"),"$category$","")%><%
TotalCount=Conn.Execute("select count(ID) From "&sql&" ")(0) '获取数据数量
PageSetup=int(Cache("ThreadsPerPage")) '设定每页的显示数量
TotalPage=Abs(Int(TotalCount/PageSetup*(-1))) '总页数
PageCount = cint(Request.QueryString("PageIndex")) '获取当前页
if PageCount <1 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
sql="select ForumID,ID,Icon,IsGood,IsTop,IsLocked,Replies,Views,ThreadStatus,PayTopicMoney,Topic,Category,UserName,LastName,LastTime,PostTime from "&sql&" order by lasttime Desc"
if PageCount<11 then
Set Rs=Conn.Execute(sql)
else
rs.Open sql,Conn,1
end if
TopEnd=0
if Not Rs.Eof Then
if TotalPage>1 then Rs.Move (PageCount-1) * pagesetup
ThreadsList=Rs.GetRows(pagesetup)
Rs.close
For i=0 To UBound(ThreadsList,2)
ForumID=ThreadsList(0,i)
ID=ThreadsList(1,i)
Icon=ThreadsList(2,i)
IsGood=ThreadsList(3,i)
IsTop=ThreadsList(4,i)
IsLocked=ThreadsList(5,i)
Replies=ThreadsList(6,i)
Views=ThreadsList(7,i)
ThreadStatus=ThreadsList(8,i)
PayTopicMoney=ThreadsList(9,i)
Topic=ThreadsList(10,i)
Category=ThreadsList(11,i)
UserName=ThreadsList(12,i)
LastName=ThreadsList(13,i)
LastTime=ThreadsList(14,i)
PostTime=ThreadsList(15,i)
ShowThreads
Next
end if
%><div class="tc">
<input type="checkbox" name="chkall" onclick="CheckAll(this.form)" value="ON" />全选
<input type="radio" name="Item" value="Batch<%If IsRecycle=1 Then Response.write "Hard"%>Del" /><select name="IsDel"><option value="1"><%If IsRecycle Then%>清出数据库<%Else%>删除帖子<%End If%></option><option value="0"><%If IsRecycle Then%>存在回收站<%Else%>取消删除<%End If%></option></select>
<input type="radio" name="Item" value="BatchCensorship" /><select name="BatchCensorship"><option value="1">审核通过</option><option value="0">审核失败</option></select>
<input type="radio" name="menu" value="BatchGood" /><select name="IsGood"><option value="1">加入精华</option><option value="0">取消精华</option></select>
<input type="radio" value="BatchLocked" name="menu" /><select name="IsLocked"><option value="1">锁定</option><option value="0">解锁</option></select>
<input type="radio" value="BatchCategory" name="menu" /><select name="Category"><option value="">取消分类</option><option selected="selected" value="">更改分类</option><%=CategoriesOptionList%></select>
<input type="radio" name="menu" value="BatchMoveTopic" /><select name="AimForumID"><option selected="selected" value="">移动到以下论坛</option><%=ForumsList%></select>
<input type="submit" id="submit" onclick="return confirm('您确定执行本次操作?');" value=" 执 行 ">
</div></form>
</div><%
HtmlEnd%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -