📄 admin_bdel.asp
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<title><%=txl_info(0)%>--管理页面</title>
<!--#include file="inc/admin_css.asp"-->
<meta NAME=GENERATOR Content="Microsoft FrontPage 3.0" CHARSET=GB2312>
<BODY leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<%
dim k
dim n
if not supermaster or session("flag")="" then
Errmsg=Errmsg+"<br>"+"<li>本页面为管理员专用,请<a href=admin_index.asp target=_top>登陆</a>后进入。<br><li>您没有管理本页面的权限。"
call txl_error()
else
dim body
call main()
conn.close
set conn=nothing
end if
sub main()
select case request("action")
case "alldel"
call alldel()
case "userdel"
call del()
case "alldelTopic"
call alldelTopic()
case else
%>
<table width="95%" border="0" cellspacing="1" cellpadding="3" align=center class="tableBorder">
<tr>
<th colspan=2>帖子批量删除</th>
</tr>
<tr>
<td colspan=2 class=txlrow valign=top><B>注意</B>:如果您想还原帖子,请到论坛回收站!<br>下面操作将大批量删除论坛帖子。如果您确定这样做,请仔细检查您输入的信息。</td>
</tr>
<form action="admin_bdel.asp?action=alldel" method="post">
<tr>
<th valign=middle colspan=2 height=23 align=left>删除指定日期内帖子</b>(本功能不扣除用户帖子数和积分)</th>
</tr>
<tr>
<td valign=middle height=25 width=40% class=txlrow>删除多少天前的帖子(填写数字)</td>
<td class=txlrow><input name="TimeLimited" value=0 size=30> <input type=submit name="submit" value="提 交"></td>
</tr>
</form>
<form action="admin_bdel.asp?action=alldelTopic" method="post">
<tr>
<th valign=middle colspan=2 height=23 align=left>删除指定日期内没有回复的主题(本功能不扣除用户帖子数和积分)</th>
</tr>
<tr>
<td valign=middle width=40% class=txlrow>删除多少天前的帖子(填写数字)</td><td class=txlrow><input name="TimeLimited" value=0 size=30> <input type=submit name="submit" value="提 交"></td>
</tr>
</form>
<form action="admin_bdel.asp?action=userdel" method="post">
<tr>
<th valign=middle colspan=2 height=23 align=left>删除某用户的所有帖子</td>
</tr>
<tr>
<td valign=middle width=40% class=txlrow>请输入真实姓名</td>
<td class=txlrow><input type=text name="username" size=30> <input type=submit name="submit" value="提 交"></td>
</tr>
</form>
</table>
<%end select%>
<%if founderr then call txl_error()%>
<%
end sub
sub alldel()
Dim TimeLimited
TimeLimited=request.form("TimeLimited")
if not isnumeric(TimeLimited) then
founderr=true
errmsg=errmsg+"<br>"+"<li>非法的参数。"
exit sub
else
conn.execute("delete from topic where datediff('d',addTime,Now())>"&TimeLimited&"")
conn.execute("delete from bbs where datediff('d',addTime,Now())>"&TimeLimited&"")
end if
response.write "删除成功,<BR>建议您到更新论坛数据中更新一下论坛数据,或者<a href=admin_alldel.asp>返回</a>"
end sub
sub alldelTopic()
Dim TimeLimited
TimeLimited=request.form("TimeLimited")
if not isnumeric(TimeLimited) then
founderr=true
errmsg=errmsg+"<br>"+"<li>非法的参数。"
exit sub
else
set rs=conn.execute("select Topicid from topic where datediff('d',addTime,Now())>"&TimeLimited&" and replys=0")
conn.execute("delete from bbs where rootid="&rs(0))
conn.execute("delete from topic where datediff('d',addTime,Now())>"&TimeLimited&"" and replys=0)
end if
response.write "删除成功,<BR>建议您到更新论坛数据中更新一下论坛数据,或者<a href=admin_alldel.asp>返回</a>"
end sub
sub del()
dim titlenum
if request("username")="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>请输入被帖子删除用户名。"
exit sub
end if
titlenum=0
set rs=conn.execute("Select Count(bbsID) from bbs where postuser='"&replace(request("username"),"'","")&"'")
titlenum=titlenum+rs(0)
conn.execute("delete from topic where postuser='"&replace(request("username"),"'","")&"'")
conn.execute("delete from bbs where postuser='"&replace(request("username"),"'","")&"'")
if isnull(titlenum) then titlenum=0
sql="update [user] set bbscount=bbscount-"&titlenum&",usermoney=usermoney-"&titlenum*txl_user(4)&" where realname='"&replace(request("username"),"'","")&"'"
conn.Execute(sql)
response.write "删除成功,<BR>建议您到更新论坛数据中更新一下论坛数据,或者<a href=admin_alldel.asp>返回</a>"
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -