📄 userlist.asp
字号:
<!--#include file="../inc/conn.asp"-->
<%
if session("chat_admin")<>"yes" then
response.redirect "login.asp"
response.end
end if
wherestr=""
ssel=""
qstate1=">="
qstate=request("qstate")
quname=request("quname")
qexperi=request("qexperi")
startnum=request("startnum")
if qstate="1" then
qstate1="<="
ssel="selected"
else
qstate="0"
end if
if isnull(quname) or quname="" then
quname=""
else
quname=trim(quname)
wherestr="where username like '%" & quname & "%'"
end if
if isnull(qexperi) or qexperi="" then
qexperi=0
else
if wherestr<>"" then
wherestr=wherestr & " and experi" & qstate1 & qexperi
else
wherestr="where experi" & qstate1 & qexperi
end if
end if
offsetnum=30
if isnull(startnum) or startnum="" then startnum=0
startnum=cint(startnum)
dispnum=startnum+offsetnum
usernum=0
Conn = DBCN()
set rs = Server.CreateObject("ADODB.Recordset")
sql="select count(*) from [user] " & wherestr
rs.open sql,conn,3
usernum=rs(0)
rs.close
wherestr=wherestr & " order by experi desc"
prepag="#"
nextpag="#"
myurl="userlist.asp?startnum=" & startnum & "&qstate=" & qstate & "&quname=" & quname & "&qexperi=" & qexperi
if startnum>=offsetnum then
tosnum=startnum-offsetnum
prepag="userlist.asp?startnum=" & tosnum & "&qstate=" & qstate & "&quname=" & quname & "&qexperi=" & qexperi
end if
if startnum+offsetnum<usernum then
tosnum=startnum+offsetnum
nextpag="userlist.asp?startnum=" & tosnum & "&qstate=" & qstate & "&quname=" & quname & "&qexperi=" & qexperi
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户管理(用户列表)</title>
<style type="text/css">
<!--
.p9 {font-size: 9pt; line-height: 14pt }
A:link {COLOR: #0000ff; TEXT-DECORATION: underline }
A:hover{COLOR: #EB551D; TEXT-DECORATION: none }
A:active{COLOR: #EB551D }
-->
</style>
</head>
<script language="javascript">
function click_del()
{
var selrow="";
for(i=0; i<document.myform.elements.length; i++)
{
if(document.myform.elements[i].type=="checkbox")
{
if(document.myform.elements[i].checked)
selrow=selrow+"userid="+document.myform.elements[i].value+" or ";
}
}
if(selrow=="")
alert("请选择要删除的用户!");
else
{
if(confirm("你确定要删除所选的注册用户吗?"))
{
selrow=selrow.substring(0,selrow.length-4);
document.myform.action="user_del.asp";
document.myform.userid.value=selrow;
document.myform.submit();
}
}
}
function click_edit(uid)
{
document.myform.action="user_edit.asp";
document.myform.userid.value=uid;
document.myform.submit();
}
</script>
<body topmargin="3" leftmargin="3">
<table border="0" width="100%" bgcolor="#C8C9D2">
<tr>
<td width="52%"><strong>JChat注册用户管理面板</strong></td>
<td width="48%">
<p align="right" class="p9"><a href="index.asp">管理界面首页</a> <a href="logout.asp"><font color=red>退出系统</font></a> <a href="http://www.easyfad.com">技术支持</a> <a href="http://www.jchat.com.cn">关于JChat</a></td>
</tr>
</table>
<table border="0" width="100%" height="90%" bgcolor="#E7E7EB">
<tr>
<td width="100%" class="p9" valign="top"><br>
<form method="POST" action="userlist.asp">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="7%" bgcolor="#6397B6" class="p9">查询:</td>
<td width="93%" bgcolor="#D6EBEB" class="p9">名字包含有<input type="text" name="quname" size="17" value="<%=quname%>">
and 经验值 <select name="qstate" size="1">
<option value="0">>=</option>
<option value="1" <%=ssel%>><=</option>
</select> <input type="text" name="qexperi" size="10" value="<%=qexperi%>"> <input
type="submit" value=" GO "> </td>
</tr>
</table>
</form>
<form method="POST" name="myform" action="userdel.asp">
<input name="userid" type="hidden" value="">
<input name="myurl" type="hidden" value="<%=myurl%>">
<table border="1" width="100%" bordercolor="#6584A7" cellspacing="0" cellpadding="0"
height="77">
<tr>
<td width="100%" colspan="7" height="36" class="p9"><div align="center"><center><p>共找到<font
color="#FF0080"><%=usernum%></font>条记录(本页显示:<% response.write startnum & "--" & dispnum %>)  <a href="<%=nextpag%>">下一页</a> <a
href="<%=prepag%>">上一页</a> <input type="button" value="删除用户"
onclick="click_del();"></td>
</tr>
<tr align="center" class="p9">
<td width="3%" height="16"></td>
<td width="13%" bgcolor="#B8C9DA" height="16">用户名</td>
<td width="16%" bgcolor="#B8C9DA" height="16">OICQ</td>
<td width="17%" bgcolor="#B8C9DA" height="16">EMAIL</td>
<td width="23%" bgcolor="#B8C9DA" height="16">个人主页</td>
<td width="15%" bgcolor="#B8C9DA" height="16">经验值</td>
<td width="13%" bgcolor="#B8C9DA" height="16">银子</td>
</tr>
<%
sql="select userid,username,email,homepage,oicq,experi,amoney from [user] " & wherestr
icount=0
rs.open sql,conn,3
do while (Not rs.eof)
icount=icount+1
if icount>startnum and icount<=(startnum+offsetnum) then
response.write "<tr align=center class=p9>"
response.write "<td width=3% height=19><input type=checkbox name=""uid"" value="""& rs("userid") & """></td>"
response.write "<td width=13% height=19><a href=""#"" onclick=""click_edit('"&rs("userid") & "');return false;"">"&rs("username") & "</a></td>"
response.write "<td width=16% height=19>"&rs("oicq") & " </td>"
response.write "<td width=17% height=19>"& htmlencode(rs("email")) & "</td>"
response.write "<td width=23% height=19>"& htmlencode(rs("homepage")) & " </td>"
response.write "<td width=15% height=19>"&rs("experi")&"</td>"
response.write "<td width=13% height=19>"&rs("amoney")&"</td>"
response.write "</tr>"
end if
rs.movenext
loop
rs.close
set rs=nothing
%>
</table>
</td>
</tr>
</table>
<table border="0" width="100%" bgcolor="#C8C9D2">
<tr>
<td width="100%" class="p9">
<p align="right">版本:<font color="#FF0000">JChat V3.7.0</font> </p>
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -