<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%
set rs=server.createobject("adodb.recordset") 
sql="select * from admin order by id" 
rs.open sql,conn,1,3
rs.pagesize=pagesize_3
page=request("page")
if not rs.eof then
if page="" or page<1 then page=1
rs.absolutepage=page
end if
%>


<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title></title>
<link rel="stylesheet" type="text/css" href="css.css">
<link href="css/css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" bgcolor="#FFFFFF">
<table border="1" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="500">
  <tr>
    <td>
    <p align="center">用户名</td>
    <td>
    <p align="center">加入时间</td>
    <td>
    <p align="center">密码</td>
    <td>
    <p align="center">级别</td>
    <td>
    <p align="center">删除</td>
  </tr>
<% 
if not rs.eof then
for i=1 to rs.pagesize
 if rs.eof then exit for %>  <tr>
    <td align="center"><%=rs("name")%>　</td>
    <td align="center"><%=rs("addtime")%>　</td>
    <td align="center"><%=rs("pwd")%>　</td>
    <td align="center">
	<%if rs("flag")=1 then
		  response.write"<FONT COLOR='#FF0000'>超级管理员</FONT>"
		  elseif  rs("flag")=2 then
		  response.write"管理员"
		  else 
  		  response.write"普通用户"
		  end if%></td>
    <td align="center"><a href="admin_deluser.asp?id=<%=rs("id")%>">删除</a></td>
  </tr>  <% rs.movenext
next
if rs.pagecount>0 then rs.moveprevious
end if
%>
</table>
<br>共<%=rs.pagesize%>页/第<%=page%>页
<% if rs.absolutepage>1 then response.write("<a href='?"&page=1&"'>")%>
首页</a> 
<% if rs.absolutepage>1 then response.write("<a href='?page="&rs.absolutepage-1&"'>")%>
上一页</a> 
<% if rs.absolutepage<rs.pagecount then response.write("<a href='?page="&rs.absolutepage+1&"'>")%>
下一页</a>
<% if rs.absolutepage<rs.pagecount then response.write("<a href='?page="&rs.pagecount&"'>")%>
尾页</a>
</body></html>