<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% if session("admid")="" or Session("class")<>"1" then response.redirect"login.asp"%>
<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
-->
</style>
</head>
<body>
<p>&nbsp;</p>
<table width="600" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#006d63" style="border-collapse: collapse">
  <tr bgcolor="#FFFFFF">
    <td height="25" colspan="4">+会员列表（<a href="User_edit.asp?action=add">添加一条记录</a>）</td>
  </tr>
  <tr align="center" bgcolor="#FFFFFF">
    <td width="230" height="25">会员帐号</td>
    <td width="129" height="25">班级</td>
    <td width="102">&nbsp;审核</td>
    <td width="94" height="25">操作</td>
  </tr>
  <%i=1
    Set Rs=Server.CreateObject("adodb.recordset")
	    Rs.Open "Select * from user order by id desc",Conn,1,1
		If Not Rs.eof then
		    If Request.QueryString("page")="" Or Isnumeric(Request.QueryString("page"))=false Then
		     PageCount=1
		  Else
		    PageCount=Cint(Request.QueryString("page"))
	      End If
		  Rs.PageSize=20
		  Rs.AbsolutePage=PageCount
		  Do While Not Rs.Eof 		
  %>
  <tr bgcolor="#FFFFFF">
    <td height="25"><%=Rs("Name")%>(<%=Rs("UserName")%>)</td>
    <td height="25">&nbsp;<%=Rs("Class")%></td>
	
    <td height="25">&nbsp;<%If Rs("Check")=1 Then %><a href="user_edit.asp?action=checked&id=<%=Rs(0)%>">已审核</a><%Else%><a href="user_edit.asp?action=check&id=<%=Rs(0)%>">未审核</a><%End If%></td>
    <td height="25" align="center"><a href="user_edit.asp?action=edit&id=<%=Rs(0)%>">编辑</a>|<a href="user_edit.asp?action=del&id=<%=Rs(0)%>">删除</a></td>
  </tr>
    <%
    Rs.MoveNext
	I=I+1
	If I>Rs.Pagesize Then Exit do
	Loop
  %>
  <tr bgcolor="#FFFFFF">
    <td height="25" colspan="4">共<%=Rs.RecordCount%>条信息；页次：<font color="#FF0000"><%=PageCount%></font>/<%=Rs.PageCount%>；<%If PageCount>1 Then%>
	<a href="?page=1">首页</a>；<a href="?page=<%=PageCount-1%>">上一页</a>；<%else%>首页；上一页；<%end If%>
	<%IF PageCount<Rs.PageCount Then%><a href="?page=<%=PageCount+1%>">下一页</a>；<a href="?page=<%=Rs.PageCount%>">末页</a><%else%>下一页；末页<%End If%>
    转到：
      <select name="select" onChange="var jmpURL=this.options[this.selectedIndex].value ;if(jmpURL!='') {window.location=jmpURL; }else{ this.selectedIndex=0; }">
   <%for I=1 to rs.PageCount
     Response.Write("<option value=?page="&I&">"&I&"</Option>")
	 Next
   %>
    </select></td>
  </tr>
  <%
    End If
	Rs.close
	Set Rs=Nothing
	Conn.Close
	Set conn=Nothing
  %>
</table>
</body>
</html>
