<%@ LANGUAGE="VBSCRIPT" %> <% stats="批量删除" dim rsactiveusers,activeuser dim sql,rs dim sql1,rs1 dim id,boardid,rootid if founduser=false then founderr=true Errmsg=Errmsg+"
"+"
  • 请登陆后进行操作。" end if if request("boardid")="" then founderr=true Errmsg=Errmsg+"
    "+"
  • 请指定论坛版面。" elseif not isInteger(request("boardid")) then founderr=true Errmsg=Errmsg+"
    "+"
  • 非法的版面参数。" else boardid=request("boardid") if chkboardmaster(boardid)=false then founderr=true Errmsg=Errmsg+"
    "+"
  • 您不是该版面斑竹或者系统管理员。" 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() %>
    请输入您的详细资料以便进入删除模式[批量删除]
    一旦您删除了文章,将不能够恢复!
    下面将删除您管理的论坛该用户的所有文章。如果您确定这样做,请仔细检查您输入的信息。
    删除某用户该论坛的所有文章
    例如:输入'灌水大王',将删除用户灌水大王在该论坛的所有文章。
    <% end sub sub del() dim titlenum dim NewAnnounceNum,NewTopicNum if request("username")="" then founderr=true errmsg=errmsg+"
    "+"
  • 请输入被帖子删除用户名。" 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() %>
    删除成功,请>返回论坛
    <% end sub %>