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

📄 adminlist.asp

📁 柠檬树聊天服务器
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<%Response.Expires=0%>
<!--#include file="conn.asp"-->
<!--#include file="adovbs.inc" --->

 <%Dim username,class1
class1=Session("class")
 if class1="" then Response.Write "没有权限" : Response.end

 username=Request.Form("username")
 if len(username)>10 then
    Response.Write "没有记录" : Response.end
 end if

 Const NumPerPage = 15  '设置你一页要显示多少记录 
 Dim CurPage            '取得当前所在页

    If Request.QueryString("CurPage") = "" then
        CurPage = 1 
    Else
        CurPage = Request.QueryString("CurPage")
    End If

    
    '设置游标属性
    conn.CursorLocation = adUseClient

    '设置缓存大小 = 每页需显示的记录数目
    conn.CacheSize = NumPerPage

    Dim strSQL
     if username<>"" then
        strSQL = "select * from Chatuser where username='"&username&"' order by grade DESC"
     else
        strSQL = "select * from Chatuser where grade>5 order by grade DESC"
     end if

     set rs=conn.execute(strSQL)

    if rs.eof then
	Response.Write "<title></title>"
	Response.write "<br><br><br><br><br><p align='center'>没有记录 <font color=red>"& username &"</font></p>"
	Response.write "<p align='center'><a href='javascript:history.go(-1);'>点这里返回</a><BR><br></p></body>"
	Response.end
    end if
    rs.MoveFirst
    rs.PageSize = NumPerPage

    '计算最多有多少页
    Dim TotalPages,recdcount
    TotalPages = rs.PageCount
    recdcount= rs.recordcount
    rs.AbsolutePage = CurPage

    Dim count
%>


<html>
<head>
<title>在线用户管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {font-size : 9pt;}
td {font-size : 9pt;}
.p9 {font-size: 9pt;}
A  {color:#blue;text-decoration : none;}
A:Hover  {color:red;text-decoration:none;}
A:Active  {color:black}
-->
</style>
</head>
<body oncontextmenu=self.event.returnValue=false bgcolor="#FFFFFF" topMargin=20>
<form method="post" action="sort.asp">
<table border="0" cellspacing="2" cellpadding="1" bgcolor="F6FeF6" align="center" width="98%">
<tr>
<td align=center>共 <font color=red><%=recdcount%></font> 位管理员 每页 15 条记录 共 <font color=red><%=TotalPages%></font> 页 
</td>
</tr>
<tr>
<td align=center>
<%if CurPage=1 then
Response.Write("<font color=666666>[上一页</font>")
else
Response.Write("[<a href=adminlist.asp?curpage=" &CurPage-1& ">上一页</a>")
end if

if CurPage=Cstr(TotalPages) then
Response.Write("<font color=666666> 下一页</font>")
else
Response.Write(" <a href=adminlist.asp?curpage=" &CurPage+1& ">下一页</a>")
end if%>
 <a href=javascript:history.go(0) title=刷新本页>第<%=CurPage%>页]</a>

&nbsp;&nbsp;&nbsp;&nbsp;匿 称:<input maxLength="10" name="username" size="10" class="p9" tabIndex="1" style="width: 70; background-color: #FAFCEF; border: 1 solid #20663B">
<input type="submit" style="font-size:12px" value="查询">
</td></tr>
</table>

<hr noshade size="1" color=009900>

<table align="center" bgcolor="#a0a0a0" border="0" cellpadding="2" cellspacing="1" width="98%">
<tr bgcolor="#3399FF"> 
    <td width='5%'>名次</td>
    <td width='18%'>用户名</td>
    <td width='8%'>级别</td>
    <td width='12%'>累积分</td>
    <td width='10%'>月积分</td>
    <td width='5%'>次数</td>
    <td width='6%'>天数</td>
</tr>
 <%dim countno,days
     countno=0
   Do While Not rs.EOF And countno < rs.PageSize
   Response.Write("<tr bgcolor=#f0f0f0><td>" & NumPerPage*(curpage-1)+Countno+1 & "</td>")
   Response.Write("<td>" & rs("username") & "</td>")
   Response.Write("<td>" & rs("grade") & "</td>")
   Response.Write("<td>" & rs("score") & "</td>")
   Response.Write("<td>" & rs("month_score") & "</td>")
   Response.Write("<td>"&rs("times")&"</td>")
   days=DateDiff("d",rs("first_t"),now)
   Response.Write("<td>"&days&"</td></tr>")
    countno=countno+1
    rs.MoveNext
    Loop
rs.Close%>
</table></form>
</body><html>

⌨️ 快捷键说明

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