<!--#include file=../include/config.asp-->
<!--#include file=../include/conn_system.asp-->
<!--#include file=../include/access.asp-->
<!--#include file=../include/function.asp-->
	 <%
	 dim pass1,username1
	 if request("pass")="" then
	   pass1=" "
	 else
	   pass1="pass=" & request("pass")
	 end if
	 if request("username")="" then
	   username1=" "
	 else
	   if request("pass")="" then
	   username1="username='" & trim(request("username")) & "'"
	   else
	   username1=" and username='" & trim(request("username")) & "'"
	   end if
	 end if

	 %>

<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../style.css" type="text/css">
</head>
<SCRIPT LANGUAGE="JavaScript">
<!--
	function GON()
	{
		var pageno;
		var strs;
		if(form1.pp.value=="")
		{
			pageno=1;
		}
		else
		{
			pageno=form1.pp.value;
		}
		strs="view_user.asp?PageNO=" + pageno;
		window.location.href=strs;
	}
//-->
</SCRIPT>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<div align="center"><br>
  <b><font size="3">会 员 信 息</font></b><br>
</div>
<FORM METHOD=POST NAME="form1">
<center>
    查询用户名 
    <input type="text" name="username">
    <input type="submit" name="Submit" value="查询">
    <br>
  </center>
  <table width="600" border="0" cellpadding="0" cellspacing="2" class="kuan" align="center" height="49" bgcolor="#FFFFFF">
    <%
	dim strSql,rs,i,PageNo
		
	
    if request("pass")="" and request("username")="" then
	strSql="select * from [user] order by id desc"
	else
	strSql="select * from [user] where "  & pass1 & username1 & " order by id desc"
	end if
	set rs=Server.CreateObject("ADODB.RecordSet")
	rs.open strSql,conn,3,3
	rs.PageSize=20
	PageNo=request("PageNo")
	if PageNo<1 or not isnumeric(PageNo) then
		PageNo=1
	end if
	if cint(PageNo)>rs.PageCount then
		PageNo=rs.PageCount
	end if
%>
    <tr> 
      <td background="../images/system1.gif" height="25" align="center" width="71"><font color="#FF6633" class="font"><b><font color="#FF9B59">注册日期</font></b></font></td>
      <td background="../images/system1.gif" height="25" align="center" width="130"><font color="#FF6633" class="font"><b><font color="#FF6633" class="font"><b><font color="#FF9B59">用户名</font></b></font></b></font></td>
      <td background="../images/system1.gif" height="25" align="center" width="192"><font color="#FF6633" class="font"><b><font color="#FF9B59">密码</font></b></font></td>
      <td background="../images/system1.gif" height="25" align="center" width="81"><font color="#FF6633" class="font"><b><font color="#FF9B59">最后登陆时间</font></b></font></td>
      <td background="../images/system1.gif" height="25" align="center" width="42"><font color="#FF6633" class="font"><b><font color="#FF9B59">删除</font></b></font></td>
      <td background="../images/system1.gif" height="25" align="center" width="70"><font color="#FF6633" class="font"><b></b></font><font color="#FF6633" class="font"><b><font color="#FF9B59">详细资料</font></b></font></td>
    </tr>
    <%
		if rs.recordcount>0 then
		   rs.AbsolutePage =PageNo
		   for i=1 to rs.pageSize
  			  if rs.eof then exit for
  %>
    <tr bgcolor="#ECFFEC"> 
      <td class="font" align="center" valign="middle" height="26" width="71" bgcolor="#DBE7F2"><%if rs("date")<>"" then%><%=replace(rs("date"),right(rs("date"),8),"")%><%end if%></td>
      <td class="font" align="center" valign="middle" height="26" width="130" bgcolor="#C1D6EA"><font color="red"><%=rs("username")%></font></td>
      <td class="font" align="center" valign="middle" height="26" width="192" bgcolor="#C1D6EA"><font color="red"><%=rs("password")%></font></td>
      <td class="font" align="center" valign="middle" height="26" width="81" bgcolor="#DBE7F2"><%if rs("last_date")<>"" then%><%=replace(rs("last_date"),right(rs("last_date"),8),"")%><%end if%></td>
      <td class="font" align="center" valign="middle" height="26" width="42" bgcolor="#C1D6EA"><a href="del_user.asp?id=<%=rs("id")%>&amp;uu=user" class="linkfont">删除</a></td>
      <td class="linkfont" align="center" valign="middle" height="26" width="70" bgcolor="#DBE7F2"><a href="change_user.asp?id=<%=rs("id")%>" class="linkfont" target="_blank">查看或修改</a></td>
    </tr>
    <%
				rs.movenext
			next
  %>
    <tr> 
      <td colspan="6" align="right" class="font"> 
        <%
			out("共 " & rs.pagecount & " 页 &nbsp;&nbsp;")
			out("共 " & rs.recordcount & " 条记录 &nbsp;&nbsp;")
			out("当前第 " & PageNo & " 页 &nbsp;&nbsp;")
			out("到第 <input class=""textinput"" name=""pp"" type=""text"" size=""2""> 页")
			out(" <INPUT class=""textinput"" TYPE=""button"" value=""GO"" onclick=""javascript:GON()"">&nbsp;")
			out("<a href=""view_user.asp?PageNo=1"">首页</a>&nbsp;")
		    out("<a href=""view_user.asp?PageNo=" & (PageNo-1) & """>上一页</a>&nbsp;")
		    out("<a href=""view_user.asp?PageNo=" & (PageNo+1) & """>下一页</a>&nbsp;")
			out("<a href=""view_user.asp?PageNo=" & rs.pagecount & """>尾页</a>&nbsp;")
	  %>
        &nbsp; </td>
    </tr>
    <%
		else
  %>
    <tr> 
      <td colspan="6" class="font"> 
        <div align="center">没有数据!</div>
      </td>
    </tr>
    <%
		end if 
		rs.close
		set rs=nothing
  %>
  </table>
</FORM>
</body>
</html>
<!--#include file=../include/foot.asp-->