<%@ LANGUAGE=VBScript codepage ="936" %>
<!--#include file="check.asp"-->
<%Response.Expires=0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"
Response.Expires=0
search=cstr(server.HTMLEncode(Request.QueryString("search")))
hydj=cstr(server.HTMLEncode(Request.QueryString("hydj")))
%>
<html><title>世纪江湖会员列表</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><LINK href="style.css" rel=stylesheet></head>
<%
If Request.QueryString("CurPage") = "" or Request.QueryString("CurPage") = 0 then
CurPage = 1
Else
CurPage = CINT(Request.QueryString("CurPage"))
End If%>
  <br>
</div>
<table border="1" width="100%" cellpadding="1" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="#00215a" align="center">
  <tr> 
    <td colspan="9" align=center bgcolor="#d7ebff">世纪江湖会员列表(按会员时间排序)<br>
<%hypd=split(Application("sjjh_hypd"),",")
for x=1 to UBound(hypd)%>
<a href="hylist.asp?hydj=<%=x%>"><font color=blue><%=x%>级会员列表</font></a> 
<%next
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("sjjh_usermdb")
rs.Open "Select * FROM [sjjh_jhuser] where jh_hydj>0 Order by jh_hydate DESC", conn, 1,1
allhy=RS.recordcount
rs.close
%>
<br>
会员总数:<font color=red><b><%=allhy%></b></font>人
<%hypd=split(Application("sjjh_hypd"),",")
for x=1 to UBound(hypd)
rs.Open "Select * FROM [sjjh_jhuser] where jh_hydj="& x &" Order by jh_hydate DESC", conn, 1,1
myhyrs=RS.recordcount
rs.close
%>
<%=x%>级会员:<font color=red><b><%=myhyrs%></b></font>人 
<%next%>
</td>
  </tr>
  <tr bgcolor="#d7ebff"> 
    <td align=center >姓名</td>
    <td align=center >性别</td>
    <td align=center >等级</td>
    <td align=center >门派</td>
    <td align=center >会员等级</td>
    <td align=center >会员日期</td>
    <td align=center >金币</td>
    <td align=center >金卡</td>
    <td align=center >操作</td>
  </tr>
<%
if search<>"" then
	if hydj<>"" then
		rs.Open "select * FROM [sjjh_jhuser] where jh_hydj="& hydj &"  and (jh_user like '%" & search & "%'or jh_name like '%" & search & "%') Order by jh_hydate DESC", conn, 1,1
	else
		rs.Open "select * FROM [sjjh_jhuser] where jh_hydj>0  and (jh_user like '%" & search & "%'or jh_name like '%" & search & "%') Order by jh_hydate DESC", conn, 1,1
	end if
else
	if hydj<>"" then
		rs.Open "Select * FROM [sjjh_jhuser] where jh_hydj="& hydj &" Order by jh_hydate DESC", conn, 1,1
	else
		rs.Open "Select * FROM [sjjh_jhuser] where jh_hydj>0 Order by jh_hydate DESC", conn, 1,1
	end if
end if
if rs.eof and rs.bof then%>
<div align="center">对不起，暂时没有发现任何记录！！ <br>[ <a href=# onclick=history.go(-1)>返回上一级</a> ] 
  <%else
RS.PageSize=20'设置每页记录数,可修改
Dim TotalPages
TotalPages = RS.PageCount
If CurPage>RS.Pagecount Then
CurPage=RS.Pagecount
end if
RS.AbsolutePage=CurPage
rs.CacheSize = RS.PageSize'设置最大记录数
Dim Totalcount
Totalcount =INT(RS.recordcount)
StartPageNum=1
do while StartPageNum+10<=CurPage
StartPageNum=StartPageNum+10
Loop
EndPageNum=StartPageNum+9
If EndPageNum>RS.Pagecount then EndPageNum=RS.Pagecount
I=0
p=RS.PageSize*(Curpage-1)
do while (Not RS.Eof) and (I<RS.PageSize)
p=p+1%>
  <tr bgcolor="" onmouseover="this.bgColor='#85C2E0';" onmouseout="this.bgColor='';"> 
    <td align=center><%=rs("jh_name")%></td>
    <td align=center><%=rs("jh_sex")%></td>
    <td align=center><%=rs("jh_dj")%></td>
    <td align=left><%=rs("jh_mp")%></td>
    <td align=center><%=rs("jh_hydj")%></td>
    <td align=left><%=rs("jh_hydate")%></td>
    <td align=right><%=rs("jh_jb")%></td>
    <td align=right><%=rs("jh_hyjk")%></td>
    <td align=center><a href="useredit.asp?name=<%=rs("jh_name")%>">详细</a></td>
  </tr>
  <%I=I+1
RS.MoveNext
Loop%>
  <tr> 
    <td colspan=11 align=middle bordercolorlight="#00215a" bgcolor="#d7ebff"> 
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr> 
          <form method="GET" action="hylist.asp">
            <td width="50%"> 　关键字： 
              <input type="text" name="search" size=15 class="input1" onfocus=this.select() onmouseover=this.focus()> 
              <input name="B1" type="submit" value="搜索" class="input1"> </td>
          </form>
          <td width="50%" align="right"> 有<font color=blue><%=Totalcount%></font>条 
            共<%=int(Totalcount/25)+1%>页 [ 
            <% if StartPageNum>1 then %>
            <a href="hylist.asp?CurPage=<%=StartPageNum-1%>"><<</a> 
            <%end if%>
            <% For I=StartPageNum to EndPageNum
if I<>CurPage then %>
            <a href="hylist.asp?CurPage=<%=I%>"><%=I%></a> 
            <% else %>
            <b><font color=#ff0000><%=I%></font></b> 
            <% end if %>
            <% Next %>
            <% if EndPageNum<RS.Pagecount then %>
            <a href="hylist.asp?CurPage=<%=EndPageNum+1%>">>></a> 
            <%end if%>
            ] </td>
        </tr>
      </table></td>
  </tr>
<%
end if%></table>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%><p align=center>楚天江湖网</p></body></html>