<!--#include file="Inc.asp"-->
<!--#include file="Inc/page_Cls.asp"-->
<%
Dim Action,WhereSql,OrderSql,Order,PageInfo,Title
If Not BBS94KK.Founduser Then BBS94KK.GoToErr(10)
Order=Request.querystring("Order")
Action=Lcase(Request.querystring("Action"))
If Action="today" Then
	BBS94KK.Head "今日到访会员"
	WhereSql="IsDel=0 And DATEDIFF('d',[LastTime],'"&BBS94KK.NowBbsTime&"')<1"
Else
	BBS94KK.Head "查看用户列表"
	WhereSql="IsDel=0"
End If
Select Case Action
Case"sex"
	OrderSql="Sex"
Case"coin"
	OrderSql="Coin"
Case"essay"
	OrderSql="EssayNum"
Case"mark"
	OrderSql="Mark"
Case"regtime"
	OrderSql="RegTime"
Case"grade"
	OrderSql="GradeFlag"
Case else
	OrderSql="ID"
End select
IF Order="" Then OrderSql =OrderSql&" Desc"
ShowListTop()
ShowUserList()
BBS94KK.Footer()
Set BBS94KK=Nothing

Sub ShowListTop()
	Response.Write"<div style='text-align:center;width:600px'><div style='float:right'>排序方式：<a href=?Action="&Action&">顺</a> / <a href=?Action="&Action&"&Order=2>倒</a></div>查看按：<a href=?Action=Sex&Order="&Order&">姓别</a>&nbsp;/&nbsp;<a href=?Action=Essay&Order="&Order&">贴数</a>&nbsp;/&nbsp;<a href=?Action=Coin&Order="&Order&">金钱</a>&nbsp;/&nbsp;<a href=?Action=Mark&Order="&Order&">积分</a>&nbsp;/&nbsp;<a href=?Action=RegTime&Order="&Order&">注册时间</a>&nbsp;/&nbsp;<a href=?Action=Grade&Order="&Order&">等级</a>&nbsp;/&nbsp;<a href=?Action=Today>今日到访</a>  </div>"
End Sub
Sub ShowUserList()
	Dim P,Page,arr_Rs,i,Temp,S,PInfo,BgColor
	Page = Request.QueryString("page")
	Set P = New Cls_PageView
	P.strTableName = "[KK_User]"
	P.strPageUrl = "?Action="&Action&"&Order="&Order
	P.strFieldsList = "Name,Sex,Mail,EssayNum,Coin,Mark,RegTime,GradeID,GradeFlag"
	P.strCondiction = WhereSql
	P.strOrderList = OrderSql
	'P.CountSQL=200'为减轻服务器负担，只显示前200名
	P.strPrimaryKey = "ID"
	P.intPageSize = 40
	P.intPageNow = Page
	P.strCookiesName = "User_List"&Action'客户端记录总数
	P.Reloadtime=10'每10分钟更新Cookies
	P.strPageVar = "page"
	P.InitClass
	Arr_Rs = P.arrRecordInfo
	PInfo = P.strPageInfo
	page=P.intPageNow
	Set P = nothing
	S="<div style='text-align:center;border-bottom:1px solid "&BBS94KK.SkinsPIC(0)&";padding:3px;font-weight:bold;BACKGROUND: "&BBS94KK.SkinsPIC(2)&";'><div style=""float:left;width:15%"">用户名</div><div style=""float:left;width:10%"">性别</div><div style=""float:left;width:10%"">E-mail</div><div style=""float:left;width:10%"">发帖数</div><div style=""float:left;width:10%"">金钱</div><div style=""float:left;width:10%"">积分</div><div style=""float:left;width:15%"">注册时间</div><div style=""float:left;width:20%"">等级</div><div style=""clear: both;""></div></div>"
	If IsArray(Arr_Rs) Then
	For i = 0 to UBound(Arr_Rs, 2)
	If I mod 2=0 Then Bgcolor="background:"&BBS94KK.SkinsPIC(1) Else Bgcolor="" 
	If Arr_Rs(1,i) Then Temp="帅哥" Else Temp="靓女"
	S=S&"<div style='text-align:center;border-bottom:1px solid "&BBS94KK.SkinsPIC(0)&";padding:3px;BACKGROUND: "&BBS94KK.SkinsPIC(2)&";"&BgColor&"'><div style=""float:left;width:15%""><a href='UserInfo.asp?Name="&Arr_Rs(0,i)&"'>"&Arr_Rs(0,i)&"</a></div><div style=""float:left;width:10%"">"&Temp&"</div><div style=""float:left;width:10%""><script language=""JavaScript"" type=""text/javascript"">mail('"&BBS94KK.Fun.GetSqlStr(Arr_Rs(2,i))&"')</script></div><div style=""float:left;width:10%"">"&Arr_Rs(3,i)&"</div><div style=""float:left;width:10%"">"&Arr_Rs(4,i)&"</div><div style=""float:left;width:10%"">"&Arr_Rs(5,i)&"</div><div style=""float:left;width:15%"">"&Formatdatetime(Arr_Rs(6,i),1)&"</div><div style=""float:left;width:20%"">"&BBS94KK.GetGradeName(Arr_Rs(7,i),0)&"</div><div style=""clear: both;""></div></div>"
	Next
	End If
	S=S&"<div style=""BACKGROUND: "&BBS94KK.SkinsPIC(2)&";"">"&PInfo&"</div>"
	BBS94KK.ShowTable "用户列表",S
End Sub
%>