

<head>

<LINK 
href="css.css" type=text/css rel=stylesheet>

<!--#include file="../conn2.asp"-->
<!--#include file="set.asp"-->



<%Set rs = Server.CreateObject("ADODB.Recordset")
name=request.form("name")
if name<>"" then
sql = "SELECT * FROM member where username like '%" &name& "%' "
else
sql = "SELECT * FROM member order by id desc"
end if
rs.open sql, conn, 1, 3
%>



</head>



<body>

<div align="center">
  <center>
    <br>
    <table width="90%" border="0" cellpadding="2" cellspacing="1" bordercolordark="#FFFFFF" bgcolor="F6F6F6">
      <tr bgcolor="#FFFFFF"> 
        <td height="18" colspan="7" align="center" class="norightbuttonborder2"><font color="#FFFFFF">社区用户管理</font></td>
      </tr>
      <tr bgcolor="#FFFFFF"> 
        <td width="10%" align="center"><b>用户名</b></td>
        <td width="11%" align="center"><b>性别</b></td>
        <td width="32%" align="center"><b>email</b></td>
        <td width="14%" align="center"><b>注册时间</b></td>
        <td width="16%" align="center"><b>最近登陆</b></td>
        <td width="7%" align="center"> <p align="center"><b>编辑</b></p></td>
        <td width="10%" align="center"><b>删除</b></td>
      </tr>
      <% 
shownum=10 
totalrecord=rs.recordcount 
rs.pagesize=shownum 
maxpage=rs.pagecount 
 
requestpage=clng(request.querystring("page")) 
 
if requestpage="" or requestpage=0 then 
   requestpage=1 
end if 
if resquestpage>maxpage then 
    resquestpage=maxpage 
end if 
 
if not requestpage=1 then 
rs.move (requestpage-1)*rs.pagesize 
end if 
for i=1 to rs.pagesize and not rs.bof%>
      <tr bgcolor="#FFFFFF"> 
        <td> 
          <p align="center"><a href=../Userlist_data.asp?username=<%=rs("username")%>><%=rs("username")%></a>　</p></td>
        <td width="11%"> <p align="center"> 
            <% if rs("sex")=1 then%>
            男 
            <%elseif rs("sex")=2 then%>
            女 
            <%else%>
            外星人 
            <%end if%>
            　</p></td>
        <td width="32%"> <p align="center"><%=rs("email")%>　</p></td>
        <td width="14%"> <p align="center"><%=rs("reg_time")%></p></td>
        <td width="16%"> <p align="center"><%=rs("zjdlsj")%></p></td>
        <td width="7%"> <p align="center"><a href="edit_user.asp?id=<%=rs("id")%>&username=<%=rs("username")%>">编辑</a></p></td>
        <td width="10%"> <p align="center"><a href="edit_user.asp?username=<%=rs("username")%>&id=<%=rs("id")%>&action=del" class="C_shenhong"><strong>删除</strong></a></p></td>
      </tr>
      <% 
rs.movenext 
if rs.eof then exit for 
next 
%>
    </table>
    <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="norightbuttonborder3">
      <form method="POST" action="user.asp"><tr>
        <td>
<p align="center">用户搜索：&nbsp;&nbsp; 
              <input name="name" type="text" class="textbox_shiixian_hui" size="20">
              &nbsp; 
              <input name="B1" type="submit" class="button" value="搜 索">
            </p>
</td>
      </tr></form>
    </table>
  </center>
</div>

<BR>

<table align=center width="600" border="0"> 
        <tr> 
          <td align=center> 
<% 
if requestpage-1 mod 10=0 then 
 p=(requestpage-1) \ 10 
else 
 p=(requestpage-1) \ 10 
end if 
if requestpage=1 then 
 response.write "<font face=webdings color=""#FF0000"">9</font>" 
else 
 response.write "<a href=user.asp?name="&name&"&page=1 title=首页><font face=webdings>9</font></a>" 
end if 
if p*10>0 then response.write "<a href=user.asp?name="&name&"&page="&p*10&" title=上十页><font face=webdings>7</font></a>" 
response.write "<b>" 
for ii=p*10+1 to P*10+10 
   if ii=requestpage then 
  response.write "<font color=""#FF0000"">"&ii&"</font> " 
 else 
  response.write "<a href=user.asp?name="&name&"&page="&ii&">"&ii&"</a>   " 
 end if 
 if ii=maxpage then exit for 
next 
response.write "</b>" 
if ii<maxpage then response.write "<a href=user.asp?name="&name&"&page="&ii&" title=下十页><font face=webdings>8</font></a>" 
if requestpage=maxpage then 
 response.write "<font face=webdings color=""#FF0000"">:</font>   " 
else 
 response.write "<a href=user.asp?name="&name&"&page="&maxpage&" title=尾页><font face=webdings>:</font></a>" 
end if 
response.write"    总共有"&maxpage&"页   共"&totalrecord&"位注册会员"  

%> 
</td> 
</tr> 
</TABLE> 


