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

📄 adminright1.asp

📁 本程序蓝本为6kbbs 默认前台管理员的帐号是:woodcoal
💻 ASP
📖 第 1 页 / 共 3 页
字号:
  </tr>
  </table></div>
</form>



<%case"deluser"
name=Replace(Request.Form("name"),"'","")
dely=checknum(request.form("dely"))
if dely=2 then
conn.execute("update [user] set del=true where name='"&name&"'")
call send("删除用户成功。")
application(prefix&"deluser")=application(prefix&"deluser")&"|"&userid&"|"

elseif dely=1 then
set rs=conn.execute("select top 1 userid from [user] where name='"&name&"'")
if rs.eof then
call send("·该用户名不存在<br>·<a href='javascript:history.go(-1)'>返回重新填写</a>")
else
userid=rs(0)
usedtable=application(prefix&"usedtable")
usedtable=split(usedtable,"|")
for i=1 to ubound(usedtable)

'执行删除操作
conn.execute("delete*from bbs"&usedtable(i)&" where bid<>0 and id in (select id from [topic] where userid="&userid&" and totable="&usedtable(i)&")")
conn.execute("delete*from bbs"&usedtable(i)&" where userid="&userid&"")
next
conn.execute("delete*from sms where touserid="&userid&" or fromuserid="&userid&"")
conn.execute("delete*from vote where id in (select id from [topic] where userid="&userid&")")
conn.execute("delete*from topic where userid="&userid&"")
conn.execute("delete*from [user] where userid="&userid&"")
application(prefix&"deluser")=application(prefix&"deluser")&"|"&userid&"|"
call send("删除用户成功。")
end if
set rs=nothing
end if
case"hyuser"
name=Replace(Request.Form("name"),"'","")
set rs1=server.createobject("adodb.recordset")
sql="Select top 1 userid,del from [user] where name='"&name&"'"
rs1.open sql,conn,1,3
rs1("del")=true
rs1.Update
application(prefix&"deluser")=replace(application(prefix&"deluser"),"|"&rs1("userid")&"|","")
rs1.close
set rs1=nothing

conn.execute("update [user] set del=false where name='"&name&"'")

application(prefix&"deluser")=application(prefix&"deluser")&"|"&userid&"|"

call send("还原用户成功。")
%><%case"changepwd"%>
<form method="POST" action="adminright1.asp?action=newpwd">
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#cad6eb" width="90%">
<tr class=td2>
    <td width="25%">
    <p style="margin: 8"><span style="font-weight: 400"><font color="#000000">用户名:</font></span></td>
    <td width="75%">&nbsp;<%=flid%><input type="text" name="name" size="40"></td>
  </tr>
  <tr>
    <td>
    <p style="margin: 8">新密码:</td>
    <td>&nbsp;<input type="password" name="pwd" size="40"></td>
  </tr>  <tr>
    <td colspan="2" bgcolor="#F4F6FC" align="center" height="35">
    <input type="submit" value="     确  认  修  改     " name="B1"></td>
  </tr>
</table></div>
</form>
<%case"newpwd"
dim pwd,newpwd
name=Replace(Request.Form("name"),"'","")
pwd=Replace(Request.Form("pwd"),"'","")
if name="" or pwd="" then
call send("·请填写完整必填的资料<br>·<a href='javascript:history.go(-1)'>返回重新填写</a>")
else
newpwd=md5(pwd)
set rs=server.createobject("adodb.recordset")
sql="Select top 1 name,password 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
rs("password")=newpwd
conn.execute("update [admin] set [password]='"&newpwd&"' where name='"&name&"'")
rs.Update
call send("修改密码成功。"&name&" 的新密码为 "&pwd&"")
end if
rs.close
set rs=nothing
end if
%>
<%case"userset"%><form method="POST" action="adminright1.asp?action=setuserok">
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#cad6eb" width="90%">
  <tr>
    <td width="40%">
    <p style="line-height: 120%; margin: 5">请输入要进行特殊设置的用户名:</td>
    <td width="60%">
    <p style="line-height: 120%; margin: 5">
    <input type="text" name="name" size="40"></td>
  </tr>
  <tr>
    <td>
    <p style="line-height: 120%; margin: 5">是否禁止该用户发帖:</td>
    <td>
    <p style="line-height: 120%; margin: 5">
    <input type="radio" value="1" name="addtopic">是 
    <input type="radio" value="2" name="addtopic" checked>否</td>
  </tr>
  <tr>
    <td>
    <p style="line-height: 120%; margin: 5">是否屏蔽该用户发的帖子:</td>
    <td>
    <p style="line-height: 120%; margin: 5">
    <input type="radio" name="showtopic" value="1">是 
    <input type="radio" name="showtopic" value="2" checked>否</td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#F4F6FC" align="center" height="35">
    <p style="line-height: 120%; margin: 5">
    <input type="submit" value="     确  认  修  改     " name="B1"></td>
  </tr>
  </table></div>
</form>
<%case"setuserok"
dim utype,addtopic,showtopic
name=Replace(Request.Form("name"),"'","")
addtopic=checknum(request.form("addtopic"))
showtopic=checknum(request.form("showtopic"))
if addtopic=1 and showtopic=1 then utype=3
if addtopic=1 and showtopic=2 then utype=1
if addtopic=2 and showtopic=1 then utype=2
if addtopic=2 and showtopic=2 then utype=0
if name="" then
call send("·请填写完整必填的资料<br>·<a href='javascript:history.go(-1)'>返回重新填写</a>")
else
set rs1=server.createobject("adodb.recordset")
sql="Select top 1 type 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("type")=utype
rs1.Update
call send("成功修改用户特殊设置。")
end if
rs1.close
set rs1=nothing
end if
%>
<%case"vip"%>
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#cad6eb" width="90%">
  <tr class=td2 >
    <td colspan="2" height="40" valign="top" bgcolor="#F4F6FC">
    <p style="line-height: 150%; margin: 5"><span style="font-weight: 400">
	<font color="#000000">当前论坛VIP用户:<br>
<%set rs=conn.execute("select name from [user] where grade=13")
i=0
do while not rs.eof
response.write kbbs(rs("name"))&"&nbsp; "
i=i+1
if i/10=i\10 then
response.write"<br>"
end if
rs.movenext
loop
set rs=nothing%></font></span></td>
  </tr><form method="POST" action="adminright1.asp?action=addvip"><tr>
    <td class=td1 width="100%" height="35" colspan="2" background="pic/titlebg.gif">
    <span style="font-weight: 400"><font color="#000000">&nbsp;添加VIP用户:</font></span></td>
  </tr><tr>
    <td class=td2 width="25%" height="35">
    <p style="margin: 5"><span style="font-weight: 400"><font color="#000000">请输入用户名:</font></span></td>
    <td width="75%">&nbsp;<input name="name" size="40"> 
    <input type="submit" value="  确 认 添 加  " name="B2"></td>
  </tr></form><form method="POST" action="adminright1.asp?action=delvip">
  <tr>
    <td class=td1 height="28" colspan="2" background="pic/titlebg.gif">
    <span style="font-weight: 400"><font color="#000000">&nbsp;删除VIP用户:</font></span></td>
  </tr>
  <tr>
    <td class=td2 height="35">
    <p style="margin: 5"><span style="font-weight: 400"><font color="#000000">请输入用户名:</font></span></td>
    <td>&nbsp;<input name="name" size="40"> 
    <input type="submit" value="  确 认 删 除  " name="B1"></td>
  </tr></form>
  </table>
</div>
<%
case"addvip"
name=Replace(Request.Form("name"),"'","")
set rs=server.createobject("adodb.recordset")
sql="Select top 1 grade from [user] where name='"&name&"'"
rs.open sql,conn,1,3
if rs("grade")>13 then
call send("该用户已经是版主或者管理员,不能再设定为VIP用户。")
else
rs("grade")=13
rs.Update
call send("添加VIP用户成功。")
end if
rs.close
set rs=nothing
case"delvip"
name=Replace(Request.Form("name"),"'","")
set rs=server.createobject("adodb.recordset")
sql="Select top 1 grade from [user] where name='"&name&"'"
rs.open sql,conn,1,3
if rs("grade")>13 then
call send("该用户是版主或者管理员,不能删除VIP权限。")
else
rs("grade")=0
rs.Update
call send("删除VIP用户成功。")
end if
rs.close
set rs=nothing
%>
<%case"deltopic"%><br>
<form action="adminright1.asp?action=delday" method="POST">
  <div align="center">
  <table style="BORDER-COLLAPSE: collapse" cellPadding="0" width="90%" border="1" bordercolor="#cad6eb">
    <tr>
      <td class=td1 width="100%" height="28" colspan="2" background="pic/titlebg.gif">
      <span style="font-weight: 400">
      <font color="#000000">&nbsp;删除指定日期内的帖子</font></span></td>
    </tr>
    <tr>
      <td class=td2 width="30%" height="28">
      <p style="MARGIN: 5px"><span style="font-weight: 400">
		<font color="#000000">删除多少天前的帖子:( 填数字 ) </font></span> </p>
      </td>
      <td width="70%">
      <input size="20" name="daynum"></td>
    </tr>
    <tr>
      <td class=td2 height="28">
      <p style="margin: 5"><span style="font-weight: 400"><font color="#000000">删除帖子所在的论坛:( 请选择 ) 
		</font></span> </td>
      <td><%bdlist("bd")%></td>
    </tr>
    <tr>
      <td width="100%" bgcolor="#F4F6FC" colspan="2" align="center" height="35">
      
    <input type="submit" value="  确 认 删 除  " name="B1"></td>
    </tr>
  </table>
	</div>
</form>
<form action="adminright1.asp?action=deldaynore" method="POST">
  <div align="center">
  <table style="BORDER-COLLAPSE: collapse" cellPadding="0" width="90%" border="1" bordercolor="#cad6eb">
    <tr>
      <td class=td1 width="100%" height="28" colspan="2" background="pic/titlebg.gif">
      <span style="font-weight: 400"><font color="#000000">&nbsp;删除指定日期内没有回复的主题</font></span></td>
    </tr>
    <tr>
      <td class=td2 width="30%" height="28">
      <p style="MARGIN: 5px"><span style="font-weight: 400">
		<font color="#000000">删除多少天前的帖子:( 填数字 ) </font></span> </p>
      </td>
      <td width="70%">
      <input size="20" name="daynum"></td>
    </tr>
    <tr>
      <td class=td2 height="28">
      <p style="margin: 5"><span style="font-weight: 400"><font color="#000000">删除帖子所在的论坛:( 请选择 ) 

⌨️ 快捷键说明

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