<!--#include file="Conn.ASP"-->
<!--#include file="ConnUser.asp"-->
<!--#include file="Config.ASP"-->
<!--#include file="char.inc"-->
<!--#include file="chkuser.asp" -->
<!--#include file="ChkManage.asp" -->
<!--#include file="Function.asp"-->
<%
if not(request.cookies(Forcast_SN)("ManageKEY")="super" or request.cookies(Forcast_SN)("ManageKEY")="typemaster" or request.cookies(Forcast_SN)("ManageKEY")="bigmaster") then
	Show_Err("对不起，您的后台管理权限不够操作！")
	response.end
else

order=checkstr(request("order"))

PageShowSize = 10	'每页显示多少个页
MyPageSize   = 50	'每页显示多少个用户名
If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
	MyPage=1
Else
	MyPage=Int(Abs(Request("page")))
End if
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>会员分类__<%=jjgn%></title>
<LINK href=site.css rel=stylesheet>
</head>

<body topmargin="0">
<!--#include file=Admin_Top.asp-->
<table width="100%" border="1" cellpadding="3" cellspacing="0" bordercolor="#C0C0C0" id="AutoNumber1" style="border-collapse: collapse">

  <tr valign="top"> 

    <td width="760" class="daohang"> <table width="100%" border="0" cellspacing="0" cellpadding="0">     
        <tr> 
          <td height="25"><div align="center"> 
              <table width="95%" height="156" border="0" align="center" cellpadding="0" cellspacing="0" id="AutoNumber3" style="border-collapse: collapse">
                <tr> 
                  <td height="10" valign=top>&nbsp;</td>
                </tr>
                <tr> 
                  <td height="10" valign=top><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <tr align=center> 
                        <td width="20%" height="20" colspan="5"> 
                          <%function getusernum()
dim rs
	rs=ConnUser.execute("Select Count("& db_User_Id &") from "& db_User_Table &"")
getusernum=rs(0)
set rs=nothing
if isnull(getusernum) then getusernum=0
end function%>
                          本站共有<%=getusernum%>位会员 
                          <%if order="" then%>
                          <a class=class href="?order=1band">[普通会员]
						  <a class=class href="?order=2band">[高级会员]
						  <a class=class href="?order=3band">[特级会员]
						  <a class=class href="?order=on">[启用会员]
						  <a class=class href="?order=off">[禁用会员]
                          <%end if%>
                          <%if order="1band" or order="2band" or order="3band"or order="on" or order="off"  then%>
                          </a><a class=class href="Admin_Sortuser.asp">[全部用户] 
                          <%end if%>
                          </a></td>
                      </tr>
                      <%
set rs1=server.CreateObject("ADODB.RecordSet")
if order="1band" then
rs1.Source="SELECT * FROM "& db_User_Table &" where reglevel=1 order by number"
end if

if order="2band" then
rs1.Source="SELECT * FROM "& db_User_Table &" where reglevel=2 order by number"
end if

if order="3band" then
rs1.Source="SELECT * FROM "& db_User_Table &" where reglevel=3 order by number"
end if

if order="on" then
rs1.Source="SELECT * FROM "& db_User_Table &" where jingyong=0 order by number"
end if

if order="off" then
rs1.Source="SELECT * FROM "& db_User_Table &" where jingyong=1 order by number"
end if

if order="" then
rs1.Source="SELECT * FROM "& db_User_Table &" order by number"
end if

if order<>"1band" and order<>"2band" and order<>"3band" and order<>"on" and order<>"off" and order<>"" then
rs1.Source="SELECT * FROM "& db_User_Table &" order by "& db_User_Name
end if

rs1.Open rs1.Source,conn,3,1
If Not rs1.eof then
rs1.PageSize     = MyPageSize
MaxPages         = rs1.PageCount
rs1.absolutepage = MyPage
total            = rs1.RecordCount
i = 0
do until rs1.Eof or i = rs1.PageSize
%>
                      <tr align=center> 
                        <td width="20%" height="20"> 
                          <%if not rs1.eof then%>
                          <a class=class href="list.asp?id=<%=rs1("ID")%>"><%=rs1("username")%></a></td>
                        <%rs1.movenext
                        i = i + 1
		     end if %>
                        <td width="20%" height="20"> 
                          <%if not rs1.eof then%>
                          <a class=class href="list.asp?id=<%=rs1("ID")%>"><%=rs1("username")%></a></td>
                        <%rs1.movenext
                        i = i + 1   
		     end if %>
                        <td width="20%" height="20"> 
                          <%if not rs1.eof then%>
                          <a class=class href="list.asp?id=<%=rs1("ID")%>"><%=rs1("username")%></a></td>
                        <%rs1.movenext 
                        i = i + 1  
		     end if %>
                        <td width="20%" height="20"> 
                          <%if not rs1.eof then%>
                          <a class=class href="list.asp?id=<%=rs1("ID")%>"><%=rs1("username")%></a></td>
                        <%rs1.movenext
                        i = i + 1   
		     end if %>
                        <td width="20%" height="20"> 
                          <%if not rs1.eof then%>
                          <a class=class href="list.asp?id=<%=rs1("ID")%>"><%=rs1("username")%></a></td>
                        <%rs1.movenext
                        i = i + 1  
		     end if %>
                      <%
                     loop
                        %></tr>
                      
                    
</table></td>
                </tr>
                <tr> 
                      <td width="100%" align=center valign="middle">共 <%=total%> 位会员，当前第 <%=Mypage%>/<%=Maxpages%> 页，每页 <%=MyPageSize%> 位会员 
                        <%
	url="Admin_Sortuser.asp?order="&order									
PageNextSize=int((MyPage-1)/PageShowSize)+1
Pagetpage=int((total-1)/rs1.PageSize)+1

if PageNextSize >1 then
PagePrev=PageShowSize*(PageNextSize-1)
Response.write "<a class=black href='" & Url & "&page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
Response.write "<a class=black href='" & Url & "&page=1' title='第1页'>页首</a> "
end if
if MyPage-1 > 0 then
Prev_Page = MyPage - 1
Response.write "<a class=black href='" & Url & "&page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
end if

if Maxpages>=PageNextSize*PageShowSize then
PageSizeShow = PageShowSize
Else
PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
End if
If PageSizeShow < 1 Then PageSizeShow = 1
for PageCounterSize=1 to PageSizeShow
PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
if PageLink <> MyPage Then
Response.write "<a class=black href='" & Url & "&page=" & PageLink & "'>[" & PageLink & "]</a> "
else
Response.Write "<B>["& PageLink &"]</B> "
end if
If PageLink = MaxPages Then Exit for
Next

if Mypage+1 <=Pagetpage  then
Next_Page = MyPage + 1
Response.write "<a class=black href='" & Url & "&page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
end if

if MaxPages > PageShowSize*PageNextSize then
PageNext = PageShowSize * PageNextSize + 1
Response.write " <A class=black href='" & Url & "&page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
Response.write " <a class=black href='" & Url & "&page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
End if
				
End If
rs1.close
set rs1=nothing

end if%>
                      </td>
                    </tr><tr> 
                  <td height="10" valign=top>&nbsp;</td>
                </tr>
              </table>
            </div></td>
        </tr>
      </table></td>
  </tr>
  
</table>

<!--#include file=Admin_Bottom.asp-->
</body>
</html>
