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

📄 adminright2.asp

📁 本程序蓝本为6kbbs 默认前台管理员的帐号是:woodcoal
💻 ASP
📖 第 1 页 / 共 2 页
字号:
else
set rs=conn.execute("select top 1 bdinfo from bdinfo where id="&bd&" and followid<>0")
if not rs.eof then
call send("·对不起,版面 ID:<b>"&bd&"</b> 已经被 "&split(rs("bdinfo"),"|")(0)&" 使用了。<br>·<a href='javascript:history.go(-1)'>返回重新填写</a>")
else
bdinfo=bdname&"|"&bdinfo&"|"&picurl&"|"
bdinfo=replace(bdinfo,"'","")
conn.execute("insert into bdinfo(id,followid,bdinfo,type,orders) values("&bd&","&followid&",'"&bdinfo&"',"&bbstype&",0)")
response.redirect"adminright2.asp?action=bdinfo"
end if
set rs=nothing
end if
%>
<%
application(prefix&"allthebbs")=""
case"delbd"%>
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#cad6eb" width="100%">
<form method="POST" action="adminright2.asp?action=delbdok"><tr>
    <td width="35%">
    <p style="margin: 8; line-height:150%">请输入要删除的版面的 ID:<br>
    <font color="#FF0000">注意:该操作将删除该版面和和该版面的帖子。</font></td>
    <td width="65%">&nbsp;<input type="text" name="bd" size="9"></td>
  </tr>
 <tr>
    <td colspan="2" bgcolor="#F4F6FC" align="center" height="35">
    <input type="submit" value="     确  认  删  除     " name="B1" onclick="{if(confirm('确定删除此版面吗?这样将删除该版面和该版面的帖子。')){return true;}return false;}"></td>
  </tr></form>
</table>
</div>
<%
application(prefix&"allthebbs")=""
case"delbdok"
bd=checknum(request.form("bd"))
conn.execute("delete*from bdinfo where id="&bd&" and followid<>0")
conn.execute("delete*from topic where bd="&bd&"")
conn.execute("delete*from paper where bd="&bd&"")
usedtable=application(prefix&"usedtable")
usedtable=split(usedtable,"|")
for i=1 to ubound(usedtable)
conn.execute("delete*from bbs"&i&" where bd="&bd&"")
next
response.redirect"adminright2.asp?action=bdinfo"
%>
<%case"adminbd"%><br>
<form method="POST" action="adminright2.asp?action=addbdadmin">
  <div align="center">
  <table border="1" cellpadding="0" style="border-collapse: collapse" bordercolor="#cad6eb" width="100%">
 <tr>
   <td class=td1 width="100%" colspan="2" height="28" background="pic/titlebg.gif">&nbsp;<span style="font-weight: 400"><font color="#000000">添加版主:</font></span></td>
 </tr>
 <tr>
   <td class=td2 width="25%" height="30"><span style="font-weight: 400">
	<font color="#000000">&nbsp;版主名称:</font></span></td>
   <td width="75%">&nbsp;<input type="text" name="name" size="40"></td>
 </tr>
 <tr>
   <td class=td2 height="30"><span style="font-weight: 400">
	<font color="#000000">&nbsp;管理所在版面:</font></span></td>
   <td width="70%">&nbsp;<%bdlist()%></td>
 </tr>
 <tr>
   <td width="100%" height="35" colspan="2" bgcolor="#F4F6FC" align="center">
    <input type="submit" value="     确  认  添  加     " name="B1"></td>
 </tr>
      </table></div>
</form>
<form method="POST" action="adminright2.asp?action=delbdadmin">
	<div align="center">
		<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#cad6eb" width="100%">
 <tr>
   <td class=td1 width="100%" colspan="2" height="28" background="pic/titlebg.gif">&nbsp;<span style="font-weight: 400"><font color="#000000">删除版主:</font></span></td>
 </tr>
 <tr>
   <td class=td2 width="25%" height="30"><span style="font-weight: 400">
	<font color="#000000">&nbsp;版主名称:</font></span></td>
   <td>&nbsp;<input type="text" name="name" size="40"></td>
 </tr>
 <tr>
   <td class=td2 height="30"><span style="font-weight: 400">
	<font color="#000000">&nbsp;管理所在版面:</font></span></td>
   <td><span lang="en-us">&nbsp;<%bdlist()%></td>
 </tr>
 <tr>
   <td width="100%" height="35" colspan="2" bgcolor="#F4F6FC" align="center">
    <input type="submit" value="     确  认  删  除     " name="B1"></td>
 </tr>
      </table></div>
</form>

<%case"addbdadmin"
dim pswd,bdadmin,bdadmin2
name=Replace(Request.Form("name"),"'","")
bd=checknum(request.form("bd"))
if bd=0 or name="" then
call send("·请正确填写名称和正确选择版面<br>·<a href='javascript:history.go(-1)'>返回重新填写</a>")
else
set rs=conn.execute("select top 1 name from [admin] where name='"&name&"' and (bd="&bd&" or bd=0 or bd=-1)")
if not rs.eof then
call send("该用户已经处于管理队列,不能重复添加。")
else
set rs1=server.createobject("adodb.recordset")
sql="Select top 1 password,grade from [user] where name='"&name&"'"
rs1.open sql,conn,1,3
if rs1.eof then
call send("·论坛中不存在该用户<br>·<a href='javascript:history.go(-1)'>返回重新填写</a>")
else
rs1("grade")=14
rs1.Update
pswd=rs1("password")
conn.execute("insert into [admin] values('"&name&"','"&pswd&"',"&bd&")")
set bdadmin=conn.execute("select name from admin where bd="&bd&"")
do while not bdadmin.eof
bdadmin2=bdadmin("name")&"|"&bdadmin2
bdadmin.movenext
loop
set bdadmin=nothing
conn.execute("update bdinfo set admin='"&bdadmin2&"' where id="&bd&" and followid<>0")
call send("添加版主成功。")
end if
rs1.close
set rs1=nothing
end if
set rs=nothing
end if

case"delbdadmin"
name=Replace(Request.Form("name"),"'","")
bd=checknum(request.form("bd"))
if name="" or bd<=0 then
call send("·请正确填写名称和正确选择版面<br>·<a href='javascript:history.go(-1)'>返回重新填写</a>")
else
set rs=conn.execute("select top 1 name from [admin] where name='"&name&"' and (bd=0 or bd=-1)")
if not rs.eof then
call send("该用户是超级版主或者管理员,不能够删除版主权限。")
else
conn.execute("update [user] set grade=0 where name='"&name&"'")
conn.execute("delete*from [admin] where name='"&name&"' and bd="&bd&"")
set bdadmin=conn.execute("select name from admin where bd="&bd&"")
do while not bdadmin.eof
bdadmin2=bdadmin("name")&"|"&bdadmin2
bdadmin.movenext
loop
set bdadmin=nothing
conn.execute("update bdinfo set admin='"&bdadmin2&"' where id="&bd&" and followid<>0")
call send("删除版主成功。")
end if
set rs=nothing
end if

case"allbd"
%><div align="center">
	<table border="1" cellpadding="0" style="border-collapse: collapse" bordercolor="#cad6eb" width="100%" bgcolor="#F4F6FC" height="40">
    <tr>
      <td class=td2 width="100%"><span style="font-weight: 400">
		<font color="#000000">&nbsp;当前已有的超级版主:<%set rs=conn.execute("select name from admin where bd=-1"):do while not rs.eof:response.write rs("name")&"&nbsp; ":rs.movenext:loop:set rs=nothing%></font></span></td>
    </tr>
    </table>
</div>
<form method="POST" action="adminright2.asp?action=addallbd">
  <div align="center">
  <table border="1" cellpadding="0" style="border-collapse: collapse" bordercolor="#cad6eb" width="100%">
 <tr>
   <td class=td1 width="100%" colspan="2" height="28" background="pic/titlebg.gif">
	<span style="font-weight: 400"><font color="#000000">&nbsp;添加超级版主:</font></span></td>
 </tr>
 <tr>
   <td class=td2 width="25%" height="50" bgcolor="#F4F6FC">&nbsp;<span style="font-weight: 400"><font color="#000000">超级版主名称:</font></span></td>
   <td bgcolor="#F4F6FC">&nbsp;<input type="text" name="name" size="40">&nbsp;
    <input type="submit" value="  确  认  添  加  " name="B1"></td>
 </tr>
      </table></div>
</form>
<form method="POST" action="adminright2.asp?action=delallbd">
  <div align="center">
  <table border="1" cellpadding="0" style="border-collapse: collapse" bordercolor="#cad6eb" width="100%">
 <tr>
   <td class=td1 width="100%" colspan="2" height="28" background="pic/titlebg.gif">
	<font color="#346AE4">&nbsp;</font><span style="font-weight: 400"><font color="#000000">删除超级版主:</font></span></td>
 </tr>
 <tr>
   <td class=td2 width="25%" height="50" bgcolor="#F4F6FC">
	<span style="font-weight: 400"><font color="#000000">&nbsp;超级版主名称:</font></span></td>
   <td bgcolor="#F4F6FC">&nbsp;<input name="name" size="40">&nbsp;
    <input type="submit" value="  确  认  删  除  " name="B1"></td>
 </tr>
      </table></div>
</form>
<%case"addallbd"
name=Replace(Request.Form("name"),"'","")
set rs=server.createobject("adodb.recordset")
sql="Select top 1 password,grade from [user] where name='"&name&"'"
rs.open sql,conn,1,3

if rs.eof then
call send("·论坛中不存在该用户<br>·<a href='javascript:history.go(-1)'>返回重新填写</a>")
else
if rs("grade")>=15 then
call send("该用户是超级版主或者管理员,不能够重复添加。")
else

rs("grade")=15
rs.Update
pswd=rs("password")

conn.execute("delete*from [admin] where name='"&name&"' and bd>0")
conn.execute("insert into [admin] values('"&name&"','"&pswd&"',-1)")


call send("添加超级版主成功。")
end if
end if
rs.close
set rs=nothing
%>

<%case"delallbd"
name=Replace(Request.Form("name"),"'","")
grade=conn.execute("select top 1 grade from [user] where name='"&name&"'")(0)
if grade=16 then
call send("该用户是管理员,不能够删除超级版主权限。")
else
conn.execute("update [user] set grade=0 where name='"&name&"'")
conn.execute("delete*from admin where name='"&name&"' and bd=-1")

call send("删除超级版主成功。")
end if
case"admin"
%>
<div align="center">
<table border="1" cellpadding="0" style="border-collapse: collapse" bordercolor="#cad6eb" width="100%" bordercolor="#cad6eb" height="40">
    <tr>
      <td class=td2 width="100%"><span style="font-weight: 400">
		<font color="#000000">&nbsp;当前已有的管理员:<%set rs=conn.execute("select name from admin where bd=0"):do while not rs.eof:response.write rs("name")&"&nbsp; ":rs.movenext:loop:set rs=nothing%></font></span></td>
    </tr>
    </table>
</div>
<form method="POST" action="adminright2.asp?action=addadmin">
  <div align="center">
  <table border="1" cellpadding="0" style="border-collapse: collapse" bordercolor="#cad6eb" width="100%">
 <tr>
   <td class=td1 width="100%" colspan="2" height="28" background="pic/titlebg.gif">&nbsp;<span style="font-weight: 400"><font color="#000000">添加管理员:</font></span></td>
 </tr>
 <tr>
   <td class=td2 width="25%" height="50" bgcolor="#F4F6FC">&nbsp;<span style="font-weight: 400"><font color="#000000">管理员名称:</font></span></td>
   <td bgcolor="#F4F6FC">&nbsp;<input type="text" name="name" size="40">&nbsp;
    <input type="submit" value="  确  认  添  加  " name="B1"></td>
 </tr>
      </table></div>
</form>
<form method="POST" action="adminright2.asp?action=deladmin">
  <div align="center">
  <table border="1" cellpadding="0" style="border-collapse: collapse" bordercolor="#cad6eb" width="100%">
 <tr>
   <td class=td1 width="100%" colspan="2" height="28" background="pic/titlebg.gif">&nbsp;<span style="font-weight: 400"><font color="#000000">删除管理员:</font></span></td>
 </tr>
 <tr>
   <td class=td2 width="25%" height="50" bgcolor="#F4F6FC">&nbsp;<span style="font-weight: 400"><font color="#000000">管理员名称:</font></span></td>
   <td bgcolor="#F4F6FC">&nbsp;<input type="text" name="name" size="40">&nbsp;
    <input type="submit" value="  确  认  删  除  " name="B1"></td>
 </tr>
      </table></div>
</form>
<%case"addadmin"
name=Replace(Request.Form("name"),"'","")
set rs=server.createobject("adodb.recordset")
sql="Select top 1 name,password,grade from [user] where name='"&name&"' and grade<16"
rs.open sql,conn,1,3

if rs.eof then
call send("·论坛中不存在该用户或者该用户已经是管理员<br>·<a href='javascript:history.go(-1)'>返回重新填写</a>")
else
rs("grade")=16
rs.Update
pswd=rs("password")
conn.execute("delete*from [admin] where name='"&name&"' and bd<>0")
conn.execute("insert into [admin] values('"&name&"','"&pswd&"',0)")
call send("添加管理员成功。")

end if
rs.close
set rs=nothing
%>

<%case"deladmin"
name=Replace(Request.Form("name"),"'","")
conn.execute("update [user] set grade=0 where name='"&name&"'")
conn.execute("delete*from admin where name='"&name&"' and bd=0")
call send("删除管理员成功。")
%>

<%
application(prefix&"allthebbs")=""
case"addflsave"
dim flid,flname,flpcid 
flid=checknum(request.form("flid"))
flpcid=checknum(request.form("flpcid"))
flname=Replace(Request.Form("flname"),"'","")
if flid="" or flname="" or flid=0 or flpcid="" or flpcid>=3 then
call send("·对不起,请正确填写分类的ID和名称。<br>·<a href='javascript:history.go(-1)'>返回重新填写</a>")
else
set rs=conn.execute("select top 1 bdinfo from bdinfo where id="&flid&" and followid=0")
if not rs.eof then
call send("·对不起,分类 ID:<b>"&flid&"</b> 已经被 "&rs("bdinfo")&" 使用了。<br>·<a href='javascript:history.go(-1)'>返回重新填写</a>")
else
conn.execute("insert into bdinfo(id,bdinfo,type) values("&flid&",'"&flname&"',"&flpcid&")")
response.redirect"adminright2.asp?action=bdinfo"
end if
end if
%>

<%end select
application(prefix&"bbsname")=""%></td>
  </tr>
</table>
</div>
<%call admindown%>

⌨️ 快捷键说明

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