<!--#include file="Inc.asp"-->
<!--#include file="ydzq1.asp"-->
<%
call head()
Dim p,gettxt,yd
TP=trim(request.querystring("TP"))
if TP="" or Isnumeric(TP)= false then TP=0
TP=clng(TP)
if TP=1 then 
gettxt="order by id desc"
yd="最新会员"


elseif TP=2 then 
gettxt="order by myjb+bank desc"
yd="金币排名"
elseif TP=3 then 
gettxt="order by myjy desc"
yd="经验排名"


elseif TP=4 then 
gettxt="order by mysellnum desc"
yd="发帖排名"


elseif TP=5 then 
gettxt="order by myrelnum desc"
yd="回帖排名"


elseif TP=6 then 
gettxt="order by myphotonum desc"
yd="相册排名"
else
gettxt="order by id asc"
yd="所有会员"
end If
Call saycarda(""&yd&"")


Response.write "<a href=""index.asp?sid="&sid&"&amp;saytk="&saytk&""">社区</a>"

   Response.write ">><a href=""bbslist.asp?sid="&sid&"&amp;saytk="&saytk&""">排行</a><br/>"






set rs=Server.CreateObject("ADODB.Recordset")
rsppl="select * from Users "&gettxt&""
rs.open rsppl,conn,1,1
If Not rs.eof	Then
	Dim PageSize,i
	PageSize=10						
	Dim Count,page,pagecount,gopage			
	gopage="hotman.asp?TP="&TP&"&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;"
	Count=rs.recordcount	
	page=int(request.QueryString ("page"))
	if page<=0 or page="" then page=1		
	pagecount=(count+pagesize-1)\pagesize	
        if page>pagecount then page=pagecount
	rs.move(pagesize*(page-1))
	For i=1 To PageSize     						
	If rs.eof Then Exit For
   Response.write ""&i+(page-1)*PageSize&"."
   if TP=1 then
   Response.write "<a href=""uinfo.asp?id="&rs("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&""">"&ubb(rs("name"))&"(ID:"&usb(rs("id"))&")</a><br/>"

   elseif TP=2 then
   Response.write "<a href=""uinfo.asp?id="&rs("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&""">"&ubb(rs("name"))&"(金币:"&usb(rs("myjb"))+rs("bank")&")</a><br/>"
     elseif TP=3 then
   Response.write "<a href=""uinfo.asp?id="&rs("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&""">"&ubb(rs("name"))&"(经验:"&usb(rs("myjy"))&")</a><br/>"


   elseif TP=4 then
   Response.write "<a href=""alist.asp?ids="&rs("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&""">"&ubb(rs("name"))&"(发帖:"&usb(rs("mysellnum"))&")</a><br/>"

     elseif TP=5 then
   Response.write "<a href=""alist.asp?ids="&rs("id")&"&amp;sid="&sid&"&amp;TP=2&amp;saytk="&saytk&""">"&ubb(rs("name"))&"(回帖:"&usb(rs("myrelnum"))&")</a><br/>"

     elseif TP=6 then
   Response.write "<a href=""photo.asp?ids="&rs("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&""">"&ubb(rs("name"))&"(相片:"&usb(rs("myphotonum"))&")</a><br/>"

   else
   Response.write "<a href=""uinfo.asp?id="&rs("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&""">"&ubb(rs("name"))&"(ID:"&usb(rs("id"))&")</a><br/>"
  end if
	rs.moveNext
 	Next
	if page-pagecount<0 then response.write "<a href="""&gopage&"page="&page+1&""">下一页</a>"&chr(13)
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上一页</a>"&chr(13)

response.write "<br/>("&page&"/"&pagecount&")共"&count&"人"
if saytk=1 then
	if pagecount>1 then response.write "<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""2""/><a href="""&gopage&"page=$(page)"">页</a>"
end if
Else
response.write"暂时没有记录！"
end if
rs.close
set rs=nothing
conn.close
set conn=Nothing
   Response.write "<br/>---------<br/>"
   Response.write "<a href=""bbslist.asp?sid="&sid&"&amp;saytk="&saytk&""">社区排行</a>"
   Response.write "<br/><a href=""show.asp?sid="&sid&"&amp;saytk="&saytk&""">我的空间</a>"
   Response.write "<br/><a href=""index.asp?sid="&sid&"&amp;saytk="&saytk&""">社区首页</a>"
call headsay()
%>