📄 supervise.asp
字号:
<!-- #include file="Setup.asp" -->
<%
top
if Request.Cookies("UserName")=empty then error("<li>您还未<a href=Login.asp>登录</a>社区")
ForumID=int(Request("ForumID"))
ForumName=HTMLEncode(Request.Form("ForumName"))
ForumIntro=HTMLEncode(Request.Form("ForumIntro"))
TolSpecialTopic=HTMLEncode(Request.Form("TolSpecialTopic"))
ForumIcon=HTMLEncode(Request.Form("ForumIcon"))
ForumLogo=HTMLEncode(Request.Form("ForumLogo"))
moderated=Conn.Execute("Select moderated From [BBSXP_Forums] where id="&ForumID&" ")(0)
if ""&moderated&""="" then moderated="|"
moderated=split(moderated,"|")
if membercode<4 and moderated(0)<>Request.Cookies("UserName") then
error("<li>您的权限不够<li>只有正版主 <font color=red>"&moderated(0)&"</font> 、管理员、社区区长才拥有此权限")
end if
select case Request("menu")
case "Fix"
allarticle=Conn.execute("Select count(ID) from [BBSXP_Threads] where IsDel<>1 and ForumID="&ForumID&"")(0)
if allarticle>0 then
allrearticle=Conn.execute("Select sum(replies) from [BBSXP_Threads] where IsDel<>1 and ForumID="&ForumID&"")(0)
else
allrearticle=0
end if
Conn.execute("update [BBSXP_Forums] set ForumThreads="&allarticle&",ForumPosts="&allarticle+allrearticle&" where ID="&ForumID&"")
error2("修复论坛统计数据成功")
case "up"
if ForumName="" then error("<li>请输入论坛名称")
if Len(ForumName)>30 then error("<li>论坛名称不能大于 30 个字符")
if Len(ForumIntro)>255 then error("<li>论坛简介不能大于 255 个字符")
if instr(TolSpecialTopic," ") > 0 then error("<li>专题中不能含有空格")
master=split(HTMLEncode(Request.Form("moderated")),"|")
for i = 0 to ubound(master)
If Conn.Execute("Select id From [BBSXP_Users] where UserName='"&master(i)&"'" ).eof and master(i)<>"" Then error("<li>"&master(i)&"的用户资料还未注册")
next
sql="select * from [BBSXP_Forums] where id="&ForumID&""
Rs.Open sql,Conn,1,3
Rs("ForumName")=ForumName
Rs("moderated")=Request.Form("moderated")
Rs("TolSpecialTopic")=TolSpecialTopic
Rs("ForumIntro")=ForumIntro
Rs("ForumIcon")=ForumIcon
Rs("ForumLogo")=ForumLogo
Rs.update
Rs.close
Log("更新论坛(ID:"&ForumID&")的信息!")
Message="<li>更新成功!<li><a href=ShowForum.asp?ForumID="&ForumID&">返回论坛</a><li><a href=Default.asp>返回论坛首页</a>"
succeed(""&Message&"<meta http-equiv=refresh content=3;url=ShowForum.asp?ForumID="&ForumID&">")
case "DelUserTopic"
UserName=HTMLEncode(Request("UserName"))
if UserName="" then error("<li>您没有输入字符!")
Conn.execute("update [BBSXP_Threads] set IsTop=0,IsDel=1,lastname='"&Request.Cookies("UserName")&"',lasttime='"&now()&"' where UserName='"&UserName&"' and ForumID="&ForumID&" ")
error2("已经将 "&UserName&" 的帖子全部删除了!")
case "DelTopic"
Topic=HTMLEncode(Request("Topic"))
if Topic="" then error("<li>您没有输入字符!")
Conn.execute("update [BBSXP_Threads] set IsTop=0,IsDel=1,lastname='"&Request.Cookies("UserName")&"',lasttime='"&now()&"' where Topic like '%"&Topic&"%' and ForumID="&ForumID&" ")
error2("已经将标题里包含有 "&Topic&" 的帖子全部删除了!")
end select
sql="select * from [BBSXP_Forums] where id="&ForumID&""
Set Rs=Conn.Execute(sql)
%>
<script>
if ("<%=Rs("ForumLogo")%>"!=''){Logo.innerHTML="<img border=0 src=<%=Rs("ForumLogo")%> onload='javascript:if(this.height>60)this.height=60;'>"}
</script>
<table border="0" width="100%" align="center" cellspacing="1" cellpadding="4" class=a2>
<tr class=a3>
<td height="25"> <img src=images/Forum_nav.gif> <%ClubTree%> → <%ForumTree(Rs("followid"))%><%=ForumTreeList%> <a href="ShowForum.asp?ForumID=<%=ForumID%>"><%=Rs("ForumName")%></a> → 管理论坛</td>
</tr>
</table><br>
<table width=100% cellspacing=1 cellpadding=4 border=0 class=a2 align=center>
<tr>
<td height="20" align="center" colspan="2" class=a1><b>管理论坛</b></td>
</tr>
<tr>
<td colspan="2" height="25" align="Left" bgcolor="#FFFFFF"><b> 管理帖子</b></td>
</tr>
<tr class=a3>
<td align="right" width="20%"><form name="form" method="POST" action="Supervise.asp?menu=DelUserTopic&ForumID=<%=ForumID%>">
清除用户 </td>
<td align="Left" width="78%">
<input size="30" name="UserName"> 的所有主题
<input type="submit" value=" 确 定 "></td></form>
</tr>
<tr class=a4>
<td align="right" width="20%"><form name="form" method="POST" action="Supervise.asp?menu=DelTopic&ForumID=<%=ForumID%>">
删除主题包含有 </td>
<td align="Left" width="78%">
<input size="30" name="Topic"> 的所有帖子
<input type="submit" value=" 确 定 "></td></form>
</tr>
<form name="form2" method="POST" action="Supervise.asp">
<input type=hidden name=menu value="up">
<input type=hidden name=ForumID value="<%=ForumID%>">
<tr>
<td colspan="2" height="25" align="Left" bgcolor="#FFFFFF"><b> 论坛信息</b></td>
</tr>
<tr class=a4>
<td height="5" align="right" valign="middle" width="20%">论坛名称<b>:</b></td>
<td height="5" align="Left" valign="middle" width="78%">
<input type="text" name="ForumName" size="30" maxlength="12" value="<%=Rs("ForumName")%>">
</td>
</tr>
<tr class=a3>
<td height="2" align="right" valign="middle" width="20%">论坛版主<b>:</b></td>
<td height="2" align="Left" valign="middle" width="78%">
<input size="30" name="moderated" value="<%=Rs("moderated")%>">
多版主添加请用“|”隔开,如:yuzi|裕裕
</td>
</tr>
<tr class=a4>
<td height="2" align="right" valign="middle" width="20%">帖子专题<b>:</b></td>
<td height="2" align="Left" valign="middle" width="78%">
<input size="30" name="TolSpecialTopic" value="<%=Rs("TolSpecialTopic")%>">
添加请用“|”隔开,如:原创|转贴|讨论|求助|推荐|贴图|建议|下载
</td>
</tr>
<tr class=a3>
<td height="2" align="right" width="20%">论坛介绍<b>:</b></td>
<td height="2" align="Left" valign="middle" width="78%">
<textarea name="ForumIntro" rows="4" cols="50"><%=Rs("ForumIntro")%></textarea>
</td>
</tr>
<tr>
<td class=a4 height="1" align="right" valign="middle" width="20%">小图标URL:</td>
<td class=a4 height="1" align="Left" valign="middle" width="78%">
<input size="30" name="ForumIcon" value="<%=Rs("ForumIcon")%>"> 显示在社区首页论坛介绍右边</td>
</tr>
<tr>
<td class=a3 align="right" valign="bottom" width="20%">大图标URL:</td>
<td class=a3 align="Left" valign="bottom" width="78%">
<input size="30" name="ForumLogo" value="<%=Rs("ForumLogo")%>"> 显示在论坛左上角</td>
</tr>
</table>
<table width=100% cellspacing=0 cellpadding=0 border=0 align=center>
<tr>
<td>
<input type="button" value="修复论坛统计数据" onclick="document.location.href='?menu=Fix&ForumID=<%=ForumID%>'"> </td>
<td align="right">
<input type="submit" value=" 更 新 >>下 一 步 "></td>
</tr>
</table>
</form>
<Script>
document.form2.ForumIntro.value = unYBBcode(document.form2.ForumIntro.value);
function unYBBcode(temp) {
temp = temp.replace(/<br>/ig,"\n");
return (temp);
}
</Script>
<%
Rs.close
htmlend
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -