⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_alldel.asp

📁 生活者姿态整站程序 生活者姿态整站程序 生活者姿态整站程序
💻 ASP
字号:
<!--#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>请登陆后进行操作。"
	end if
	if request("boardid")="" then
		founderr=true
		Errmsg=Errmsg+"<br>"+"<li>请指定论坛版面。"
	elseif not isInteger(request("boardid")) then
		founderr=true
		Errmsg=Errmsg+"<br>"+"<li>非法的版面参数。"
	else
		boardid=request("boardid")
		if chkboardmaster(boardid)=false then
			founderr=true
			Errmsg=Errmsg+"<br>"+"<li>您不是该版面斑竹或者系统管理员。"
		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>请输入您的详细资料以便进入删除模式[批量删除]</b></font></td></tr>
            <tr>
            <td bgcolor="<%=TableBodyColor%>" valign=middle colspan=2><font color="<%=TableContentcolor%>"><b>一旦您删除了文章,将不能够恢复!</b>
            <br>下面将删除您管理的论坛该用户的所有文章。如果您确定这样做,请仔细检查您输入的信息。</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>请输入被帖子删除用户名。"
			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%>">删除成功,请<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"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -