<!--#include file="conn.asp"--> 
<!--#include file=const.asp -->
<!--#include file="chkpage.inc"-->
<!--#include file="page.inc"-->
<%
if not theUser.admin then
	connclose()
	response.redirect ("index.asp")
end if

dim name,pass, exec, rs, x
dim RecordCount,pageCount,page, maxid
name=encodestr(request.form("name"))
pass=encodestr(request.form("pass"))

main()


sub main()
	rcperPage=40
	page=request.querystring("page")
	if page="" or not isNumeric(page) then
		page=1
	else
		page=int(page)
	end if
	
	exec="select top 1 userNum from GBconst"
	set rs=conn.execute(exec)
	if not rs.eof then
		RecordCount=rs("userNum")-1
	end if

	pageCount=getPageCount(pageCount,recordCount,rcPerPage)
	
	page=getPage(page,pageCount)

	
	if page<=1 then
		exec="select top "& rcPerPage &" username,userid,gbuserclass from [user] where username<>'"& theUser.name &"' order by userid desc"
	else
		exec="select top 1 userid from [user] where userid in( select top "& rcPerPage*(Page-1) &" userid from [user] where username<>'"& theuser.name &"' order by userid desc) order by userid asc"
		set rs=conn.execute(exec)
		maxid=rs(0)
		exec="select top "& rcPerPage &" username,userid,gbuserclass from [user] where username<>'"& theUser.name &"' and userid<"& maxid &" order by userid desc"
	end if
	
	set rs=conn.execute(exec)
	%>
	
	<html>
	
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
	<META name="Author" content="木鸟">
	<title><%=sitetitle%></title>
	<link rel="stylesheet" href="style/<%=skin%>.css" type="text/css">
	</head>
	
	<body>
	<!--#include file="head.asp"-->
	<!--#include file="admin_bar.inc"-->
		  
	<table border="0" width="520" cellspacing="1" cellpadding="6"  align="center" class="table004">
	 <tr>
		<td colspan=4 align=center class=table003><b>· 本 留 言 本 所 有 保 留 用 户 ·</b> (不包括您)</td> 
	 </tr>
	 <tr> 
<%
i=0
do while not rs.eof
	   

response.write "<td class=table001>"& rs("username") &" [<a href=### onclick=""window.open('admin_userModify.asp?userid="& rs("userid") &"','','width=690,height=600,left=0,top=0,scrollbars=1') "">修改</a>"
if rs("gbuserclass")=1 or rs("gbuserclass")=2 then
	response.write "<img src=images/bz.gif>"
end if

response.write " <a href=admin_user_do.asp?id="& rs("userid") &"&lei=delete>删除</a>]" 

i=i+1
if i mod 4=0 then
	response.write "</td></tr><tr>"
else
	response.write "</td>"
end if

	  rs.movenext                                
		loop %>
		</tr>
	</table>
	
	<%
		rsclose()
		connclose()
		response.write pageList()
end sub


%>

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