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

📄 adminright1.asp

📁 完美政府版,正版网站解决方案
💻 ASP
📖 第 1 页 / 共 3 页
字号:
	if not rs1.eof then
		rs1("del")=true
		rs1.Update
		application(prefix&"deluser")=replace(application(prefix&"deluser"),"|"&rs1("userid")&"|","")
	end if
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">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
<tr class=td2>
    <td width="25%">
    <p style="margin: 8">用户名:</td>
    <td width="75%">&nbsp;<%=flid%><input type="text" name="name" size="40"></td>
  </tr>
  <tr>
    <td>
    <p style="margin: 8"><font color="#0466CC"><b>新密码:</b></font></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></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)'><span class=errfont>返回重新填写</span></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)'><span class=errfont>返回重新填写</span></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">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
  <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></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)'><span class=errfont>返回重新填写</span></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)'><span class=errfont>返回重新填写</span></a>")
else
rs1("type")=utype
rs1.Update
call send("成功修改用户特殊设置。")
end if
rs1.close
set rs1=nothing
end if
%>
<%case"vip"%>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
  <tr class=td2 >
    <td colspan="2" height="40" valign="top" bgcolor="#FFFFFF">
    <p style="line-height: 150%; margin: 5">当前论坛VIP用户:<br>
<%set rs=conn.execute("select name from [user] where grade=13")
i=0
do while not rs.eof
response.write checktitle(rs("name"))&"&nbsp; "
i=i+1
if i/10=i\10 then
response.write"<br>"
end if
rs.movenext
loop
set rs=nothing%></td>
  </tr><form method="POST" action="adminright1.asp?action=addvip">
  <tr>
    <td class=td3 colspan=2>添加VIP用户:</td>
  </tr><tr>
    <td class=td2 width="25%" height="35">
    <p style="margin: 5">请输入用户名:</td>
    <td width="75%">&nbsp;<input type="text" name="name" size="40"> 
    <input type="submit" value="  确 认 添 加  " name="B2"></td>
  </tr></form><form method="POST" action="adminright1.asp?action=delvip">
  <tr>
    <td class=td3 colspan=2>删除VIP用户:</td>
  </tr>
  <tr>
    <td class=td2 height="35">
    <p style="margin: 5">请输入用户名:</td>
    <td>&nbsp;<input type="text" name="name" size="40"> 
    <input type="submit" value="  确 认 删 除  " name="B1"></td>
  </tr></form>
  </table>
<%
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">
  <table style="BORDER-COLLAPSE: collapse" cellSpacing="0" cellPadding="0" width="100%" border="0">
  <tr>
    <td class=td3 colspan=2>删除指定日期内的帖子</td>
    </tr>
    <tr>
      <td class=td2 width="30%" height="28">
      <p style="MARGIN: 5px">删除多少天前的帖子:( 填数字 ) </p>
      </td>
      <td width="70%">
      <input size="20" name="daynum"></td>
    </tr>
    <tr>
      <td class=td2 height="28">
      <p style="margin: 5">删除帖子所在的论坛:( 请选择 ) </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>
</form>
<form action="adminright1.asp?action=deldaynore" method="POST">
  <table style="BORDER-COLLAPSE: collapse" cellSpacing="0" cellPadding="0" width="100%" border="0">
  <tr>
    <td class=td3 colspan=2>删除指定日期内没有回复的主题</td>
    </tr>
    <tr>
      <td class=td2 width="30%" height="28">
      <p style="MARGIN: 5px">删除多少天前的帖子:( 填数字 ) </p>
      </td>
      <td width="70%">
      <input size="20" name="daynum"></td>
    </tr>
    <tr>
      <td class=td2 height="28">
      <p style="margin: 5">删除帖子所在的论坛:( 请选择 ) </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>
</form><form action="adminright1.asp?action=delusertopic" method="POST">
  <table style="BORDER-COLLAPSE: collapse" cellSpacing="0" cellPadding="0" width="100%" border="0">
  <tr>
    <td class=td3 colspan=2>删除指定用户的所有帖子</td>
    </tr>
    <tr>
      <td class=td2 width="30%" height="28">
      <p style="MARGIN: 5px">删除指定用户的帖子:( 用户名 )</p>
      </td>
      <td width="70%">
      <input size="20" name="name"></td>
    </tr>
    <tr>
      <td class=td2 height="28">
      <p style="margin: 5">删除帖子所在的论坛:( 请选择 ) </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>
</form>
<%case"delday"
bd=checknum(request.form("bd"))
daynum=checknum(request.form("daynum"))
usedtable=application(prefix&"usedtable")
usedtable=split(usedtable,"|")
for i=1 to ubound(usedtable)
if bd=0 then
conn.execute("delete*from bbs"&i&" where bid in(select id from topic where edittime<now()+"&timeset&"/24-"&daynum&" and totable="&i&")")
conn.execute("delete*from bbs"&i&" where edittime<now()+"&timeset&"/24-"&daynum&"")
else
conn.execute("delete*from bbs"&i&" where bd="&bd&" and bid in(select id from topic where edittime<now()+"&timeset&"/24-"&daynum&" and bd="&bd&" and totable="&i&")")
conn.execute("delete*from bbs"&i&" where edittime<now()+"&timeset&"/24-"&daynum&" and bd="&bd&"")

end if
next

if bd=0 then
conn.execute("delete*from topic where edittime<now()+"&timeset&"/24-"&daynum&"")
else
conn.execute("delete*from topic where edittime<now()+"&timeset&"/24-"&daynum&" and bd="&bd&"")
end if
call send("删除成功,建议您压缩数据库。")

case"deldaynore"
bd=checknum(request.form("bd"))
daynum=checknum(request.form("daynum"))
usedtable=application(prefix&"usedtable")
usedtable=split(usedtable,"|")
for i=1 to ubound(usedtable)
if bd=0 then
conn.execute("delete*from bbs"&i&" where id in(select id from topic where edittime<now()+"&timeset&"/24-"&daynum&" and renum=0 and totable="&i&")")
else
conn.execute("delete*from bbs"&i&" where id in(select id from topic where edittime<now()+"&timeset&"/24-"&daynum&" and renum=0 and totable="&i&" and bd="&bd&")")
end if
next
if bd=0 then
conn.execute("delete*from topic where edittime<now()+"&timeset&"/24-"&daynum&" and renum=0")
else
conn.execute("delete*from topic where edittime<now()+"&timeset&"/24-"&daynum&" and bd="&bd&" and renum=0")
end if
call send("删除成功,建议您压缩数据库。")

case"delusertopic"
dim userid
bd=checknum(request.form("bd"))
name=Replace(Request.Form("name"),"'","")

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)'><span class=errfont>返回重新填写</span></a>")
else
userid=rs(0)
usedtable=application(prefix&"usedtable")
usedtable=split(usedtable,"|")
for i=1 to ubound(usedtable)
if bd=0 then
conn.execute("delete*from bbs"&i&" where userid="&userid&"")
else
conn.execute("delete*from bbs"&i&" where userid="&userid&" and bd="&bd&"")
end if
next

if bd=0 then
conn.execute("delete*from topic where userid="&userid&"")
else
conn.execute("delete*from topic where userid="&userid&" and bd="&bd&"")
end if
call send("删除成功,建议您压缩数据库。")

⌨️ 快捷键说明

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