📄 adminright1.asp
字号:
end if
%>
<%case"movetopic"%><br><form method="POST" action="adminright1.asp?action=moveday">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td class=td3 colspan=2>按指定天数移动帖子</td>
</tr>
<tr>
<td class=td2 width="30%">
<p style="margin: 5">移动多少天前的帖子:( 填数字 )</td>
<td width="70%">
<input size="20" name="daynum"></td>
</tr>
<tr>
<td class=td2 >
<p style="margin: 5">帖子原来所在的论坛:( 请选择 )</td>
<td><%bdlist("oldbd")%></td>
</tr>
<tr>
<td class=td2 >
<p style="margin: 5">帖子要移动到的论坛:( 请选择 )</td>
<td><%bdlist("newbd")%></td>
</tr>
<tr>
<td colspan="2" bgcolor="#F4F6FC" align="center" height="35">
<input type="submit" value=" 确 认 移 动 " name="B1"></td>
</tr>
</table></form>
<form method="POST" action="adminright1.asp?action=moveuser">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td class=td3 colspan=2>按指定用户移动帖子</td>
</tr>
<tr>
<td class=td2 width="30%">
<p style="margin: 5">移动指定用户的帖子:( 用户名 )</td>
<td width="70%">
<input size="20" name="name"></td>
</tr>
<tr>
<td class=td2 >
<p style="margin: 5">帖子原来所在的论坛:( 请选择 )</td>
<td><%bdlist("oldbd")%></td>
</tr>
<tr>
<td class=td2 >
<p style="margin: 5">帖子要移动到的论坛:( 请选择 )</td>
<td><%bdlist("newbd")%></td>
</tr>
<tr>
<td colspan="2" bgcolor="#F4F6FC" align="center" height="35">
<input type="submit" value=" 确 认 移 动 " name="B1"></td>
</tr>
</table></form>
<%case"moveday"
dim oldbd,newbd
oldbd=checknum(request.form("oldbd"))
newbd=checknum(request.form("newbd"))
if newbd=0 then
call send("·请选择要移动到的版面<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>")
else
daynum=checknum(request.form("daynum"))
usedtable=application(prefix&"usedtable")
usedtable=split(usedtable,"|")
for i=1 to ubound(usedtable)
if oldbd=0 then
conn.execute("update bbs"&i&" set bd="&newbd&" where edittime<now()+"×et&"/24-"&daynum&"")
else
conn.execute("update bbs"&i&" set bd="&newbd&" where edittime<now()+"×et&"/24-"&daynum&" and bd="&oldbd&"")
end if
next
if oldbd=0 then
conn.execute("update topic set bd="&newbd&" where edittime<now()+"×et&"/24-"&daynum&"")
else
conn.execute("update topic set bd="&newbd&" where edittime<now()+"×et&"/24-"&daynum&" and bd="&oldbd&"")
end if
call send("移动帖子成功。")
end if
case"moveuser"
oldbd=checknum(request.form("oldbd"))
newbd=checknum(request.form("newbd"))
name=Replace(Request.Form("name"),"'","")
if newbd=0 then
call send("·请选择要移动到的版面<br>·<a href='javascript:history.go(-1)'><span class=errfont>返回重新填写</span></a>")
else
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 oldbd=0 then
conn.execute("update bbs"&i&" set bd="&newbd&" where userid="&userid&"")
else
conn.execute("update bbs"&i&" set bd="&newbd&" where userid="&userid&" and bd="&oldbd&"")
end if
next
if oldbd=0 then
conn.execute("update topic set bd="&newbd&" where userid="&userid&"")
else
conn.execute("update topic set bd="&newbd&" where userid="&userid&" and bd="&oldbd&"")
end if
call send("移动帖子成功。")
end if
end if
case"adminpwd"
%>
<form method="POST" action="adminright1.asp?action=editadminpwd">
<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%"> <%=flid%><input type="text" name="name" size="40"></td>
</tr>
<tr>
<td>
<p style="margin: 8"><font color="#0466CC"><b>后台密码:</b></font></td>
<td> <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"editadminpwd"
name=Replace(Request.Form("name"),"'","")
pwd=Replace(Request.Form("pwd"),"'","")
newpwd=md5(pwd)
set rs1=server.createobject("adodb.recordset")
sql="Select * from [admin] where name='"&name&"'"
rs1.open sql,conn,1,3
if rs1.eof then
call send("不存在该管理员。")
else
rs1("password")=newpwd
rs1.Update
call send("修改后台管理密码成功。")
end if
rs1.close
set rs1=nothing%>
<%case"userlist" '---------------------------- 用户列表管理%>
<!--#include file="../inc/grade.asp"--><%
dim dispmm,count,types,typesql,typego,typel
dispmm=replace(request.querystring("dispmm"),"'","''")
types=checknum(request.querystring("type"))
if types<>"" then typesql="where type="&types
if types="1" then typesql="where type=1 or type=2 or type=3 "
sql="select * from [user] "&typesql&" order by "
select case dispmm
case"userid",""
sql =sql&"userid desc"
case"mark"
sql =sql&"mark desc"
case"weiwang"
sql =sql&"weiwang desc"
case"tienum"
sql =sql&"alltopicnum desc"
case"letter"
sql =sql&"name"
case"logtime"
sql =sql&"lasttime desc"
case else
sql =sql&"userid desc"
end select
%>
<div align="center">
<table border="1" bordercolor=#555555 cellpadding="0" cellspacing="2" width="100%">
<tr>
<td width="25%" align="center" height="25"><b><a href=?action=userlist>全部用户</a></b></td>
<td width="25%" align="center" height="25"><b><a href=?type=0&action=userlist>标准用户</a></b></td>
<td width="25%" align="center" height="25"><b><a href=?type=5&action=userlist>未审核用户</a></b></td>
<td width="25%" align="center" height="25"><b><a href=?type=1&action=userlist>特殊用户</a></b></td>
</tr>
</table>
<table border="1" bordercolor=#F4F6FC bgcolor=#555555 cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="15%" align="center" height="25"><b><a href=?type=<%=types%>&dispmm=letter&action=userlist><font color="#ffffff">用户名</font></a></b></td>
<td width="5%" align="center"><b><font color="#ffffff">性别</font></b></td>
<td width="8%" align="center"><b><a href=?type=<%=types%>&dispmm=tienum&action=userlist><font color="#ffffff">发帖数</font></b></a></td>
<td width="8%" align="center"><b><a href=?type=<%=types%>&dispmm=mark&action=userlist><font color="#ffffff">积分</font></b></a></td>
<td width="15%" align="center"><b><a href=?type=<%=types%>&dispmm=logtime&action=userlist><font color="#ffffff">登陆时间</font></a></b></td>
<td width="15%" align="center"><b><font color="#ffffff">等级</font></b></td>
<td width="22%" align="center"><b><font color="#ffffff">管理/状态</font></b></td></tr>
</tr>
</table>
<%
dim pagesetup,totalpage,sex1,pagecount
set rs = server.createobject("adodb.recordset")
pagesetup=25
rs.Open sql,conn,1
if rs.eof or rs.bof then
response.write"<div class=norecord>暂无记录</div>"
else
count=rs.recordcount
If Count/pagesetup > (Count\pagesetup) then
TotalPage=(Count\pagesetup)+1
else TotalPage=(Count\pagesetup)
End If
pagecount= 0
rs.movefirst
if Request.QueryString("ToPage")<>"" and isnumeric(Request.QueryString("ToPage")) then PageCount = cint(Request.QueryString("ToPage"))
if PageCount <=0 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
rs.move (PageCount-1) * pagesetup
i=1
do while not rs.eof
sex1="帅哥"
if split(rs("userinfo"),"|")(4)<>"1" then sex1="美女"
if rs("type")>"0" then typel="value='特殊' onclick=javascript:top.location='?action=usertype&userid="&rs("userid")&"&typego=0' title='点击解放该用户发贴'"
if rs("type")="0" then typel="value='正常' onclick=javascript:top.location='?action=usertype&userid="&rs("userid")&"&typego=1' title='点击禁止该用户发贴'"
if rs("type")="5" then typel="value='未核' onclick=javascript:top.location='?action=usertype&userid="&rs("userid")&"&typego=0' title='点击开通该用户发贴'"
response.write"<table border=1 cellspacing=0 width=100% align=center><tr bordercolor=#F4F6FC bgcolor=#FFFFFF><td width='15%' align=center height=25><a title='点击查看用户资料' href='../userinfo.asp?userid="&rs("userid")&"' target=_blank>"&RemoveHTML(rs("name"))&"</a></td><td width=5% align=center>"&sex1&"</td><td width='8%' align=center><font color=red>"&rs("alltopicnum")&"</font></td><td width=8% align=center>"&rs("mark")&" </td><td width=15% align=center><font color=red>"&formatdatetime(rs("lasttime"),1)&"</font></td><td width='15%' align=center></b>『 "&gradename(rs("grade"))&" 』</td><td width='22%' align=center><form method=POST action='adminright4.asp?action=userinfo'><input name=name type=hidden value='"&rs("name")&"'><input type=submit value='管理' name=B1 title='点击管理该用户资料'><input type=button name=type "&typel&"></form></td></tr></table>"
i=i+1
if i>pagesetup then exit do
rs.movenext
loop
rs.Close
%>
<TABLE cellSpacing=1 cellPadding=0 width=100% border=0 align="center">
<TBODY>
<TR height=25>
<TD height=2>
<TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
<TBODY>
<TR>
<TD>
<%
call page_list(count,pagesetup, PageCount,"&dispmm="&dispmm&"")
%></TD>
<form name=form method='POST' action=javascript:Check()>
<TD height=2 align='right'><font color='#000000'>页码:<input style=FONT-SIZE:9pt maxLength='6' size='6' name='topage' value="<%=PageCount%>">
<input style=FONT-SIZE:9pt value='GO!' type='submit'></font></TD></form>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE><br>
<%
sub page_list(byval totalrec,page_size,page,key)
dim currentpage,p,n
if page="" then
page=1
end if
currentpage=cint(page)
if totalrec mod page_size=0 and totalrec<>0 then
n= totalrec \ page_size '计算出应该分多少页
else
n= totalrec \ page_size+1 '计算出应该分多少页
end if
if currentpage-1 mod 10=0 then
p=(currentpage-1) \ 10
else
p=(currentpage-1) \ 10
end if
dim pagelist,pagelistbit,ii
response.write "<td> 共<b>"&totalrec&"</b>条记录 <b>"&page_size&"</b>条/页 共<b>"&n&"</b>页 "
if currentPage>1 then
response.write "<a href=?action=userlist&type="&types&"&topage="&Page-1&key&" title="&"转到上一页>上页</a> "
else
response.write "<font color=#999999>上页</font> "
end if
if cstr(currentPage)<>cstr(n) then
response.write "<a href=?action=userlist&type="&types&"&topage="&Page+1&key&" title="&"转到下一页>下页</a>"
else
response.write "<font color=#999999>下页</font>"
end if
response.write "</td><td align=right>分页:"
if currentPage=1 then
response.write "<font face=webdings color=#999999>9</font> "
else
response.write "<a href='?action=userlist&type="&types&"&topage=1"&key&"' title=首页><font face=webdings>9</font></a> "
end if
if p*10>0 then response.write "<a href='?action=userlist&type="&types&"&topage="&Cstr(p*10)&key&"' title=上十页><font face=webdings>7</font></a> "
response.write "<b>"
for ii=p*10+1 to P*10+10
if Cstr(ii)=Cstr(currentPage) then
response.write "<font color=#ff0000>"+Cstr(ii)+"</font> "
else
response.write "<a href='?action=userlist&type="&types&"&topage="&Cstr(ii)&key&"' title='转到第"&ii&"页'>"+Cstr(ii)+"</a> "
end if
if ii=n then exit for
'p=p+1
next
response.write "</b>"
if ii<n then response.write "<a href='?action=userlist&type="&types&"&topage="&Cstr(ii)&key&"' title=下十页><font face=webdings>8</font></a> "
if Cstr(currentPage)=Cstr(n) then
response.write "<font face=webdings color=#999999>:</font>"
else
response.write "<a href='?type="&types&"&topage="&Cstr(n)&key&"' title=尾页><font face=webdings>:</font></a>"
end if
response.write "</td></div>"
end sub
End If
case"usertype"
userid=checknum(request.querystring("userid"))
typego=checknum(request.querystring("typego"))
if typego<>"" and userid<>"" then
if typego=0 then typego=0
if typego=1 then typego=1
Conn.Execute("update [user] set type="&typego&" where userid="&userid&"")
response.Write("<script language=javascript>if(!confirm('操作成功!请自行刷新。')){history.back();}history.go(-1)</script>")
End If
%><%end select%></td>
</tr>
</table>
<!--#include file="bottom.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -