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

📄 adminright1.asp

📁 完美政府版,正版网站解决方案
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--#include file="AdminConn.asp"--><!--#include file="../inc/fun.asp"--><!--#include file="../inc/md5.asp"-->
<%
dim action,strt,bad,b,lgname,lgpwd,lgpwdmd5,bd,rs1,bdinfo,name,sql,i,bdlist2,usedtable,daynum,listname,dely
lgname=replace(session(prefix&"lgname"),"'","''")
lgpwd=replace(session(prefix&"lgpwd"),"'","''")

if isnull(lgname) or lgname="" or isnull(lgpwd) or lgpwd="" then
	response.redirect"admincheck.asp"
else
	lgpwdmd5=md5(lgpwd)
	if conn.execute("select top 1 bd from admin where name='"&lgname&"' and password='"&lgpwdmd5&"' and bd=0").eof then
		response.redirect"admincheck.asp"
	end if
end if

sub bdlist(listname)
set bdlist2=conn.execute("select * from bdinfo where followid<>0 order by followid,orders desc,id")
response.write"<select size=1 name="&listname&" style='font-size: 9pt'><option value=0>所有论坛</option>"
do while not bdlist2.eof
response.write"<option value="&bdlist2("id")&">"&split(bdlist2("bdinfo"),"|")(0)&"</option>"
bdlist2.movenext
Loop
response.write"</select>"
set bdlist2=nothing
end sub


action=request.querystring("action")
select case action
case"editfl","updatefl" strt="编辑分类名称"
case"editbd","editbdsave" strt="编辑版面资料"
case"upfl" strt="提升分类"
case"upbd" strt="提升版面"
case"pass","addpassuser" strt="编辑认证用户"
case"userdel","deluser","hyuser" strt="论坛用户删除与恢复"
case"changepwd","newpwd" strt="修改用户密码"
case"userset","setuserok" strt="用户特殊设置"
case"vip","addvip","delvip" strt="VIP用户设置"
case"deltopic","delday","deldaynore","delusertopic" strt="批量删除帖子"
case"movetopic","moveday","moveuser" strt="批量移动帖子"
case"adminpwd","editadminpwd" strt="修改管理员后台登陆密码"
case"userlist","usertype" strt="用户管理"
end select

sub send(str)
response.write"<table border=1 cellpadding=0 cellspacing=0 style='border-collapse: collapse' bordercolor=#F4F6FC width=100% bgcolor=#ffffff height=50><tr><td width=100% ><p style='margin:5px;line-height:150%'>"&str&"</p></td></tr></table>"
end sub
%>
<link rel=stylesheet type=text/css href=pic/css.css>
<STYLE type=text/css>
	body  { background:#555555; margin:0px; font-family: Verdana, Arial, sans-serif, 宋体; font-size: 9pt; text-decoration: none; color:#555555;
SCROLLBAR-FACE-COLOR: #55919A;
SCROLLBAR-HIGHLIGHT-COLOR: #cccccc;
SCROLLBAR-SHADOW-COLOR: #cccccc;
SCROLLBAR-3DLIGHT-COLOR: #cccccc;
SCROLLBAR-ARROW-COLOR: #555555;
SCROLLBAR-TRACK-COLOR: #555555;
SCROLLBAR-DARKSHADOW-COLOR: #cccccc;}

</style>
<body bgcolor="#D6DFF7" leftmargin="15"  rightmargin="15">
<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%" id="table7" height="18" >
	<tr>
		<td align="right" height="40" background="../../images/admin_top_bg.gif"><div align="center"><font color="#ffffff">完美政府CMS系统.论坛后台管理</font></div></td>
	</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" >
  <tr>
    <td class=td1 height="30" align="center" background="../../images/topBar_bg.gif"><font color="#000000">完美设计·政府网站管理系统{宽屏新城第二版}--<%=strt%></font></td>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#1C58C9" width="100%" bgcolor=#ffffff>
  <tr>
    <td width="100%" valign="top">
<%select case action%>
<%case"editfl"
flid=checknum(request.querystring("flid"))
set rs=conn.execute("select top 1 bdinfo from bdinfo where id="&flid&" and followid=0")
%><form method="POST" action="adminright1.asp?action=updatefl&flid=<%=flid%>">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
<tr class=td2>
    <td width="35%">
    <p style="margin: 8">分类的 ID:</td>
    <td width="65%">&nbsp;<%=flid%></td>
  </tr>
  <tr>
    <td>
    <p style="margin: 8"><font color="#0466CC"><b>分类的名称:</b></font><br>支持 HTML</td>
    <td>&nbsp;<input type="text" name="flname" size="46" value="<%=checkform(rs("bdinfo"))%>"></td>
  </tr>  <tr>
    <td colspan="2" bgcolor="#F4F6FC" align="center" height="35">
    <input type="submit" value="     确  认  修  改     " name="B1"></td>
  </tr>
</table></form>
<%set rs=nothing%>
<%case"updatefl"
dim flid,flname
flid=checknum(request.querystring("flid"))
flname=Replace(Request.Form("flname"),"'","")
if flname="" then
call send("·对不起,请正确填写分类名称。<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>")
else
conn.execute("update bdinfo set bdinfo='"&flname&"' where id="&flid&" and followid=0")
call send("编辑分类成功。")
application(prefix&"allthebbs")=""

end if%>
<%case"editbd"
bd=checknum(request.querystring("bd"))
set rs=conn.execute("select top 1 * from bdinfo where id="&bd&" and followid<>0")
bdinfo=rs("bdinfo")
bdinfo=split(bdinfo,"|")
dim ad
ad=rs("ad")
ad=split(ad,"|")
%>
<form method="POST" action="adminright1.asp?action=editbdsave&bd=<%=bd%>">
  <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
 <tr class=td2>
   <td width="25%">
   <p style="line-height: 150%; margin: 5">版面 ID:</td>
   <td width="75%">&nbsp;<%=bd%></td>
 </tr>
 <tr>
   <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" value="<%=checkform(bdinfo(0))%>"></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" value="<%=checkform(bdinfo(2))%>"></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: 宋体"><%=checkform(bdinfo(1))%></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: 宋体"><%=checkform(ad(0))%></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: 宋体"><%=checkform(ad(1))%></textarea></td>
 </tr>
 <tr>
   <td>
   <p style="line-height: 150%; margin: 5"><font color="#0466CC"><b>属于分类:</b></font></td>
   <td>&nbsp;<%set rs1=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 rs1.eof%><option value="<%=rs1("id")%>" <%if rs1("id")=rs("followid") then%>selected<%end if%>><%=rs1("bdinfo")%></option><%
rs1.movenext
Loop
rs1.Close
set rs1=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" <%if rs("type")=0 then:response.write"checked":end if%>>普通论坛(用户和游客可以自由的进入该类型论坛,·推荐·) </p>
   <p style="MARGIN: 4px"><input type="radio" value="1" name="bbstype" <%if rs("type")=1 then:response.write"checked":end if%>>会员论坛(只有注册用户才能进入该类型论坛)</p>
   <p style="MARGIN: 4px"><input type="radio" value="2" name="bbstype" <%if rs("type")=2 then:response.write"checked":end if%>>锁定论坛(会员和游客只能浏览帖子,不能对该论坛的帖子回复等)</p>
   <p style="MARGIN: 4px"><input type="radio" value="3" name="bbstype" <%if rs("type")=3 then:response.write"checked":end if%>>认证论坛(只有版主认证的注册用户才能进入该类型论坛)</p>
   <p style="MARGIN: 4px"><input type="radio" value="4" name="bbstype" <%if rs("type")=4 then:response.write"checked":end if%>>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>
<%set rs=nothing%>
<%case"editbdsave"
dim bdname,followid,bbstype,picurl,adtop,adbottom,adstr
bd=checknum(request.querystring("bd"))
bdname=Replace(Request.Form("bdname"),"|","│")
picurl=Replace(Request.Form("picurl"),"|","│")
bdinfo=Replace(Request.Form("bdinfo"),"|","│")
followid=checknum(request.form("followid"))
bbstype=checknum(request.form("bbstype"))
adtop=Replace(Request.Form("adtop"),"|","│")
adbottom=Replace(Request.Form("adbottom"),"|","│")
adstr=adtop&"|"&adbottom

if bdname="" or bdinfo="" then
call send("·请填写完整必填的资料<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>")
else
bdinfo=bdname&"|"&bdinfo&"|"&picurl&"|"
bdinfo=replace(bdinfo,"'","")
conn.execute("update [bdinfo] set followid="&followid&",bdinfo='"&bdinfo&"',type="&bbstype&",ad='"&adstr&"' where id="&bd&" and followid<>0")
call send("成功编辑版面 "&bdname&" 。")
end if
application(prefix&"allthebbs")=""
%>
<%case"upfl"
dim maxorders
flid=checknum(request.querystring("flid"))
maxorders=conn.execute("select top 1 max(orders) from bdinfo where followid=0")(0)
maxorders=maxorders+1
conn.execute("update bdinfo set orders="&maxorders&" where id="&flid&" and followid=0")
application(prefix&"allthebbs")=""
response.redirect "adminright2.asp?action=bdinfo"
case"upbd"
bd=checknum(request.querystring("bd"))
maxorders=conn.execute("select top 1 max(orders) from bdinfo where followid<>0")(0)
maxorders=maxorders+1
conn.execute("update bdinfo set orders="&maxorders&" where id="&bd&" and followid<>0")
application(prefix&"allthebbs")=""
response.redirect "adminright2.asp?action=bdinfo"
case"pass"
bd=checknum(request.querystring("bd"))
set rs=conn.execute("select top 1  passuser from bdinfo where id="&bd&" and followid<>0")
%><form method="POST" action="adminright1.asp?action=addpassuser&bd=<%=bd%>">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%">
  <tr>
    <td width="110%" valign="top">
    <p style="line-height: 120%; margin: 5"><font color="#0466CC"><b>版面认证用户:</b></font><br>
    该版面为认证版面,请输入能够进入该版面的用户的用户名。<br>各个用户名用<font color="#FF0000"> 
    | </font> 隔开,输入过程中<b><font color="#FF0000">不能按 Enter</font></b>。</td>
  </tr>
  <tr>
    <td width="110%" valign="top">
    <p style="margin: 5">
    <textarea rows="10" name="passuser" cols="70" style="font-family: 宋体; font-size: 9pt"><%=rs("passuser")%></textarea></td>
  </tr>
  <tr>
    <td width="110%" bgcolor="#F4F6FC" align="center" height="35">
    <input type="submit" value="      确   定   提   交     " name="B1"></td>
  </tr>
</table></form>
<%set rs=nothing%>
<%case"addpassuser"
dim passuser
bd=checknum(request.querystring("bd"))
passuser=Replace(Request.Form("passuser"),"'","")
conn.execute("update bdinfo set passuser='"&passuser&"' where id="&bd&" and followid<>0")
call send("添加认证用户成功。")
%>
<%case"userdel"%><form method="POST" action="adminright1.asp?action=deluser">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%" bgcolor="#F4F6FC">
  <tr class=td1>
    <td width="100%" colspan="2" height="28" bgcolor="#F4F6FC"> </td>
  </tr>
  <tr>
    <td class=td3 colspan="2">删除用户:</td>
  </tr>
  <tr>
    <td class=td2 width="30%" height="40" bgcolor="#FFFFFF">&nbsp;请输入要删除的用户名:</td>
    <td width="70%" bgcolor="#FFFFFF">&nbsp;<input type="text" name="name" size="40"></td>
  </tr>  <tr>
    <td width="30%" height="40" bgcolor="#FFFFFF">
    <p style="line-height: 150%; margin: 4"><b><font color="#0466CC">是否永久删除。</font></b><br>这样将删除该用户的所有帖子,<br>选择该操作将不可恢复。</td>
    <td width="70%" bgcolor="#FFFFFF">&nbsp;<input type="radio" value="1" name="dely">是 
    <input type="radio" value="2" name="dely" checked>否</td>
  </tr>  <tr>
    <td width="100%" height="40" colspan="2" align="center">&nbsp;<input type="submit" value="  确 认 删 除  " name="B1"></td>
  </tr>
  </table></form><form method="POST" action="adminright1.asp?action=hyuser"><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#F4F6FC" width="100%" bgcolor="#F4F6FC">
  <tr>
    <td class=td3 colspan=2>还原用户:</td>
  </tr>
  <tr>
    <td class=td2 width="30%" height="40">&nbsp;请输入要还原的用户名:</td>
    <td width="70%">&nbsp;<input type="text" name="name" size="40">
    <input type="submit" value="  确 认 还 原  " name="B1"></td>
  </tr>
  </table></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)'><span class=errfont>返回重新填写</span></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

⌨️ 快捷键说明

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