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

📄 adminright2.asp

📁 完美政府版,正版网站解决方案
💻 ASP
📖 第 1 页 / 共 2 页
字号:
   <td>
   <p style="line-height: 150%; margin: 5"><font color="#0466CC"><b>版面名称:</b></font><br>支持HTML</td>
   <td>&nbsp;<input type="text" name="bdname" size="25"></td>
 </tr>
 <tr>
   <td>
   <p style="line-height: 150%; margin: 5"><font color="#0466CC"><b>
   版面LOGO:</b></font><br>可以不填</td>
   <td>&nbsp;<input type="text" name="picurl" size="49"></td>
 </tr>
 <tr>
   <td valign="top">
   <p style="line-height: 150%; margin: 5"><font color="#0466CC"><b>版面介绍:</b></font></td>
   <td>
   <p style="margin: 4">
   <textarea rows="4" name="bdinfo" cols="58" style="font-size: 9pt; font-family: 宋体"></textarea></td>
 </tr>
 <tr>
   <td valign="top">
   <p style="line-height: 150%; margin: 5"><font color="#0466CC"><b>版面顶部广告:</b></font></td>
   <td>
   <p style="margin: 4">
   <textarea rows="4" name="adtop" cols="58" style="font-size: 9pt; font-family: 宋体"></textarea></td>
 </tr>
 <tr>
   <td valign="top">
   <p style="line-height: 150%; margin: 5"><font color="#0466CC"><b>版面底部广告:</b></font></td>
   <td>
   <p style="margin: 4">
   <textarea rows="4" name="adbottom" cols="58" style="font-size: 9pt; font-family: 宋体"></textarea></td>
 </tr>
 <tr>
   <td>
   <p style="line-height: 150%; margin: 5"><font color="#0466CC"><b>属于分类:</b></font></td>
   <td>&nbsp;<%set rs=conn.execute("select * from bdinfo where followid=0 order by orders desc,id")%><select size="1" name="followid" style="font-size: 9pt">
<%do while not rs.eof%><option value="<%=rs("id")%>"><%=rs("bdinfo")%></option><%
rs.movenext
Loop
rs.Close
set rs=nothing
%>
</select></td>
 </tr>
 <tr>
   <td valign="top">
   <p style="line-height: 150%; margin: 5"><font color="#0466CC"><b>版面类型:</b></font></td>
   <td>
   <p style="MARGIN: 4px">
   <input type="radio" CHECKED value="0" name="bbstype">普通版面(用户和游客可以自由的进入该类型版面,·推荐·) </p>
   <p style="MARGIN: 4px"><input type="radio" value="1" name="bbstype">会员版面(只有注册用户才能进入该类型版面)</p>
   <p style="MARGIN: 4px"><input type="radio" value="2" name="bbstype">锁定版面(会员和游客只能浏览帖子,不能对该版面的帖子回复等)</p>
   <p style="MARGIN: 4px"><input type="radio" value="3" name="bbstype">认证版面(只有版主认证的注册用户才能进入该类型版面)</p>
   <p style="MARGIN: 4px"><input type="radio" value="4" name="bbstype">VIP版面(只有vip用户方能进入--版主甚至管理员如非vip也不能进入)</td>
 </tr>
 <tr>
   <td colspan="2" bgcolor="#F4F6FC" align="center" height="35">
    <input type="submit" value="     确  认  添  加     " name="B1"></td>
 </tr>
 </table></form>
<%
application(prefix&"allthebbs")=""
case"addbdsave"
dim bd,bdname,bdinfo,followid,bbstype,adtop,adbottom,adstr
bd=checknum(request.form("bd"))
bdname=Replace(Request.Form("bdname"),"|","│")
picurl=Replace(Request.Form("picurl"),"|","│")
bdinfo=Replace(Request.Form("bdinfo"),"|","│")
adtop=Replace(Request.Form("adtop"),"|","│")
adbottom=Replace(Request.Form("adbottom"),"|","│")
followid=checknum(request.form("followid"))
bbstype=checknum(request.form("bbstype"))
adstr=adtop&"|"&adbottom
if bd="" or bd<=0 or bdname="" or bdinfo="" then
call send("·请填写完整必填的资料<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>")
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)'><span class=errfont>返回重新填写</span></a>")
else
bdinfo=bdname&"|"&bdinfo&"|"&picurl&"|"
bdinfo=replace(bdinfo,"'","")
conn.execute("insert into bdinfo(id,followid,bdinfo,type,orders,ad) values("&bd&","&followid&",'"&bdinfo&"',"&bbstype&",0,'"&adstr&"')")
response.redirect"adminright2.asp?action=bdinfo"
end if
set rs=nothing
end if
%>
<%
application(prefix&"allthebbs")=""
case"delbd"%>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" 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>
<%
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">
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
  <tr>
    <td class=td3 colspan=2>添加版主:</td>
 </tr>
 <tr>
   <td class=td2 width="25%" height="30">&nbsp;版主名称:</td>
   <td width="75%">&nbsp;<input type="text" name="name" size="40"></td>
 </tr>
 <tr>
   <td class=td2 height="30">&nbsp;管理所在版面:</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></form>
<form method="POST" action="adminright2.asp?action=delbdadmin"><table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
  <tr>
    <td class=td3 colspan=2>删除版主:</td>
 </tr>
 <tr>
   <td class=td2 width="25%" height="30">&nbsp;版主名称:</td>
   <td>&nbsp;<input type="text" name="name" size="40"></td>
 </tr>
 <tr>
   <td class=td2 height="30">&nbsp;管理所在版面:</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></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)'><span class=errfont>返回重新填写</span></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)'><span class=errfont>返回重新填写</span></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)'><span class=errfont>返回重新填写</span></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"
%><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" bgcolor="#ffffff" height="40">
    <tr>
      <td class=td2 width="100%">&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%></td>
    </tr>
    </table>
<form method="POST" action="adminright2.asp?action=addallbd">
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
  <tr>
    <td class=td3 colspan=2>添加超级版主:</td>
 </tr>
 <tr>
   <td class=td2 width="25%" height="50" bgcolor="#F4F6FC">&nbsp;超级版主名称:</td>
   <td bgcolor="#F4F6FC">&nbsp;<input type="text" name="name" size="40">&nbsp;
    <input type="submit" value="  确  认  添  加  " name="B1"></td>
 </tr>
      </table></form>
<form method="POST" action="adminright2.asp?action=delallbd">
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
  <tr>
    <td class=td3 colspan=2>删除超级版主:</td>
 </tr>
 <tr>
   <td class=td2 width="25%" height="50" bgcolor="#F4F6FC">&nbsp;超级版主名称:</td>
   <td bgcolor="#F4F6FC">&nbsp;<input type="text" name="name" size="40">&nbsp;
    <input type="submit" value="  确  认  删  除  " name="B1"></td>
 </tr>
      </table></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)'><span class=errfont>返回重新填写</span></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"
%>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" bgcolor="#ffffff" height="40">
    <tr>
      <td class=td2 width="100%">&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%></td>
    </tr>
    </table>
<form method="POST" action="adminright2.asp?action=addadmin">
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
  <tr>
    <td class=td3 colspan=2>添加管理员:</td>
 </tr>
 <tr>
   <td class=td2 width="25%" height="50" bgcolor="#F4F6FC">&nbsp;管理员名称:</td>
   <td bgcolor="#F4F6FC">&nbsp;<input type="text" name="name" size="40">&nbsp;
    <input type="submit" value="  确  认  添  加  " name="B1"></td>
 </tr>
      </table></form>
<form method="POST" action="adminright2.asp?action=deladmin">
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
  <tr>
    <td class=td3 colspan=2>删除管理员:</td>
 </tr>
 <tr>
   <td class=td2 width="25%" height="50" bgcolor="#F4F6FC">&nbsp;管理员名称:</td>
   <td bgcolor="#F4F6FC">&nbsp;<input type="text" name="name" size="40">&nbsp;
    <input type="submit" value="  确  认  删  除  " name="B1"></td>
 </tr>
      </table></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)'><span class=errfont>返回重新填写</span></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"),"'","")
if Lcase(lgname)=Lcase(name) then
	call send("不能删除自己的管理员身份。")
	response.end
end if
conn.execute("update [user] set grade=0 where name='"&name&"'")
conn.execute("delete*from admin where name='"&name&"' and bd=0")
call send("删除管理员成功。")
%>

<%end select
application(prefix&"bbsname")=""%></td>
  </tr>
</table>
<!--#include file="bottom.asp"-->

⌨️ 快捷键说明

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