?? admin_alldel.asp
字號(hào):
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!--#include file="inc/char.asp"-->
<!--#include file="inc/theme.asp"-->
<!--#include file="chkuser.asp"-->
<%
stats="批量刪除"
dim rsactiveusers,activeuser
dim sql,rs
dim sql1,rs1
dim id,boardid,rootid
if founduser=false then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>請(qǐng)登陸后進(jìn)行操作。"
end if
if request("boardid")="" then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>請(qǐng)指定論壇版面。"
elseif not isInteger(request("boardid")) then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>非法的版面參數(shù)。"
else
boardid=request("boardid")
if chkboardmaster(boardid)=false then
founderr=true
Errmsg=Errmsg+"<br>"+"<li>您不是該版面斑竹或者系統(tǒng)管理員。"
end if
end if
call nav()
call headline(1)
if founderr=true then
call error()
else
if request("action")="del" then
call del()
if founderr then
call error()
else
call success()
end if
else
call main()
end if
end if
call endline()
sub main()
%>
<table cellpadding=0 cellspacing=0 border=0 width="<%=tablewidth%>" bgcolor="<%=TableBackColor%>" align=center>
<tr><td>
<table cellpadding=6 cellspacing=1 border=0 width=100%>
<tr>
<td bgcolor="<%=TableTitleColor%>" valign=middle colspan=2 align=center>
<form action="admin_alldel.asp?action=del" method="post">
<input type=hidden name="boardid" value="<%=boardid%>"><font color="<%=TableFontcolor%>">
<b>請(qǐng)輸入您的詳細(xì)資料以便進(jìn)入刪除模式[批量刪除]</b></font></td></tr>
<tr>
<td bgcolor="<%=TableBodyColor%>" valign=middle colspan=2><font color="<%=TableContentcolor%>"><b>一旦您刪除了文章,將不能夠恢復(fù)!</b>
<br>下面將刪除您管理的論壇該用戶的所有文章。如果您確定這樣做,請(qǐng)仔細(xì)檢查您輸入的信息。</font></td>
<tr>
<td bgcolor="<%=TableBodyColor%>" valign=middle><font color="<%=TableContentcolor%>">刪除某用戶該論壇的所有文章<br>例如:輸入'灌水大王',將刪除用戶灌水大王在該論壇的所有文章。</font></td>
<td bgcolor="<%=TableBodyColor%>" valign=middle><input type=text name="username"></td></tr>
<tr>
<td bgcolor="<%=TableTitleColor%>" valign=middle colspan=2 align=center><input type=submit name="submit" value="提 交"></td></tr></form></table></td></tr></table>
</table></td></tr></table>
<%
end sub
sub del()
dim titlenum
dim NewAnnounceNum,NewTopicNum
if request("username")="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>請(qǐng)輸入被帖子刪除用戶名。"
exit sub
end if
rs=conn.execute("Select Count(announceID) from bbs1 where boardid="&boardid&" and username='"&trim(request("username"))&"'")
titlenum=rs(0)
if isnull(titlenum) then titlenum=0
sql="delete from bbs1 where boardid="&boardid&" and username='"&trim(request("username"))&"'"
conn.Execute(sql)
sql="update [user] set article=article-"&titlenum&",userWealth=userWealth-"&titlenum*wealthDel&",userEP=userEP-"&titlenum*epDel&",userCP=userCP-"&titlenum*cpDel&" where username='"&trim(request("username"))&"'"
conn.Execute(sql)
sql="select count(announceid) from bbs1 where boardid="&boardid
set rs=conn.Execute(sql)
NewAnnounceNum=rs(0)
sql="select count(announceid) from bbs1 where ParentID=0 and boardid="&boardid
set rs=conn.Execute(sql)
NewTopicNum=rs(0)
sql="update board set lastbbsnum="&NewAnnounceNum&",lasttopicnum="&NewTopicNum&" where boardid="&boardid
conn.execute(sql)
end sub
sub success()
%>
<table cellpadding=0 cellspacing=0 border=0 width="<%=tablewidth%>" bgcolor="<%=Tablebackcolor%>" align=center>
<tr><td>
<table cellpadding=6 cellspacing=1 border=0 width=100%>
<tr>
<td bgcolor="<%=Tabletitlecolor%>" valign=middle colspan=2 align=center>
<font color="<%=TableFontcolor%>">刪除成功,請(qǐng)<a href=list.asp?boardid=<%=boardid%>><font color="<%=TableFontcolor%>">返回論壇</font></a></font></td></tr>
</table>
</table></td></tr></table>
<%
end sub
%>
<!--#include file="footer.asp"-->
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -