<!--#include file="conn.asp"-->
<!--#include file="../fuction.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="../webconfig.asp"-->

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

<table width="1000" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
  <tr>
    <td width="20"></td>
    <td valign="bottom"><img src="<%=weburl%>images/arrow01.gif" width="11" height="11" /> Your present position: <a href="<%=weburl%>"><%=webname%></a> -> <span class="table-shangxia"><span class="b14"><a href=index.asp><%=bbsname%></a> → 用户列表</span></span></td>
    <td valign="bottom"></td>
  </tr>
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
</table>
<!--#include file="top.asp"-->
<body topmargin="0" leftmargin="0">

<table width="900" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td valign="top">
            <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="8"></td>
              </tr>
            </table>
            <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="8"></td>
              </tr>
            </table>
            <div align="center">
              <center>
                <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="999999" class="listcontents3">
                  <tr bgcolor="CCCCCC">
                    <td width="110" align="center">
                    <p align="center">用户名</td>
                    <td width="130" align="center" bgcolor="CCCCCC">
                    <p align="center">注册时间</td>
                    <td width="160" align="center">
                    <p align="center">最后登陆时间</td>
                    <td width="53" align="center">
                    <p align="center">发贴数量</td>
                    <td width="115" align="center">
                    <p align="center">用户职位</td>
                    <td width="92" align="center">
                    <p align="center">QQ</td>
                    <td width="190" align="center">Email</td>
                  </tr>
				                    <% Set rs1 = Server.CreateObject("ADODB.Recordset")             
 username=nosql(trim(request("username")))            
 if username<>"" then            
  sql = "SELECT * FROM shop_user where username like '%"& username &"%'order by userid desc  "             
 else                                                                                    
 sql = "SELECT * FROM shop_user order by userid desc "             
 end if                                                                                     
 rs1.open sql, conn, 1, 3                     
if rs1.eof then
         %>
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
     <tr>
       <td align=center><br>
暂无信息!<a href="javascript:history.back(1)">点击返回</a><br>
</td>
     </tr>
   </table>
		 <%
           else 
        rs1.PageSize =12 '每页记录条数
		iCount=rs1.RecordCount '记录总数
		iPageSize=rs1.PageSize
    	maxpage=rs1.PageCount 
    	page=request("page")
    	per_page=rs1.PageSize
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs1.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	For i=0 To x-1
  %>
                  <tr bgcolor="CCCCCC">
                    <td align="center" bgcolor="#FFFFFF"><a href="Userlist_data.asp?username=<%=rs1("username")%>"><%=rs1("username")%></a></td>
                    <td align="center" bgcolor="#FFFFFF"><%=rs1("addDate")%></td>
                    <td align="center" bgcolor="#FFFFFF"><%=rs1("zjdlsj")%></td>
                    <td align="center" bgcolor="#FFFFFF"><%=rs1("topic")%></td>
                    <td align="center" bgcolor="#FFFFFF"><%=rs1("zw")%></td>
                    <td align="center" bgcolor="#FFFFFF"><%=rs1("oicq")%></td>
                    <td align="center" bgcolor="#FFFFFF"><a href="mailto:<%=rs1("useremail")%>"><%=left(trim(rs1("useremail")),20)%></a></td>
                  </tr>

                  <%                                                                                 
rs1.movenext                                                                 
next                                                                               
                                                                              
%>
                </table>
              </center>
            </div>
            <br>
            <form method="post" action="user.asp" name="find">
              <div align="center">查找：
                <input name="username" type="text" class="wenbenkuang" size="20">
  &nbsp;
    <input name="Submit2" type="submit" class="go-wenbenkuang" value="查 找">
              </div>
            </form>
            <p align="center">
              <% 
call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>",per_page)
Sub PageControl(iCount,pagecount,page,table_style,font_style,per_page)
'生成上一页下一页链接
    Dim query, a, x, temp
    action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
	
    temp=""

    Response.Write("<table " & Table_style & ">" & vbCrLf )        
    Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "web_id="&web_id&"&id="&id&"&Page='+ this.page.value;return false;""><TR>" & vbCrLf )
    Response.Write("<TD align=right>" & vbCrLf )
    Response.Write(font_style & vbCrLf )    
        
    if page<=1 then
        Response.Write ("首页 " & vbCrLf)        
        Response.Write ("上页 " & vbCrLf)
    else        
        Response.Write("<A HREF=" & action & "?" & temp & "web_id="&web_id&"&id="&id&"&Page=1>首页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "web_id="&web_id&"&id="&id&"&Page=" & (Page-1) & ">上页</A> " & vbCrLf)
    end if

    if page>=pagecount then
        Response.Write ("下页 " & vbCrLf)
        Response.Write ("尾页 " & vbCrLf)            
    else
        Response.Write("<A HREF=" & action & "?" & temp & "web_id="&web_id&"&id="&id&"&Page=" & (Page+1) & ">下页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "web_id="&web_id&"&id="&id&"&Page=" & pagecount & ">尾页</A> " & vbCrLf)            
    end if

    Response.Write(" 页次：" & page & "/" & pageCount & "页" &  vbCrLf)
    Response.Write(" 共有" & iCount & "条/每页"&per_page&"条" &  vbCrLf)
    Response.Write(" 转到 " & "<INPUT TYEP=TEXT NAME=page SIZE=4 Maxlength=8 class=wenbenkuang VALUE=" & page & ">" & " 页"  & vbCrLf & "<input name=go type=submit  value=GO class=go-wenbenkuang>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub


%> 
            <p>&nbsp;</p></td>
        </tr>
    </table></td>
  </tr>
</table>
<%end if%>
<!--#include file="../copyright.asp"-->             