?? toplist.asp
字號:
<!--#include file="conn.asp"-->
<!-- #include file="inc/char.asp" -->
<!-- #include file="inc/const.asp" -->
<!-- #include file="chkuser.asp" -->
<!--#include file="inc/grade.asp"-->
<!--#include file="inc/theme.asp"-->
<%
dim orders,ordername
dim currentpage,page_count,Pcount
currentPage=request("page")
if not isInteger(request("orders")) or request("orders")="" then
orders=1
else
orders=request("orders")
end if
select case orders
case 1
orders=1
ordername="發(fā)貼總數(shù)Top10"
case 2
orders=2
ordername="最新用戶注冊"
case 7
orders=7
ordername="所有用戶列表"
case 8
orders=8
ordername="管理團(tuán)隊(duì)"
case else
orders=1
ordername="發(fā)貼總數(shù)Top10"
end select
stats=ordername
call nav()
call headline(1)
%>
<table width="<%=tablewidth%>" bgcolor=<%=Tablebackcolor%> cellspacing=0 border=0 bordercolor=<%=Tablebackcolor%> align=center>
<tr>
<td>
<table cellpadding=6 cellspacing=1 border=0 width=100%>
<form method="POST" action="toplist.asp">
<tr bgcolor=<%=aTableTitlecolor%>>
<td colspan=5 valign=top width=350><font color="<%=TableFontColor%>"> >> <B><%=ordername%></B> <<<BR>
<BR>
總注冊用戶數(shù): <%=allusers()%> 人 發(fā)貼總數(shù): <%=gettipnum()%> 篇</font></td>
<td colspan=6 align=right>
<select name=orders onchange='javascript:submit()'>
<option value=1 <%if orders=1 then%>selected<%end if%>>發(fā)貼總數(shù)Top10</option>
<option value=2 <%if orders=2 then%>selected<%end if%>>最新注冊用戶</option>
<option value=7 <%if orders=7 then%>selected<%end if%>>所有用戶列表</option>
<option value=8 <%if orders=8 then%>selected<%end if%>>管理團(tuán)隊(duì)</option>
</select>
</td>
</tr></form>
<tr bgcolor=<%=TabletitleColor%> style=color:<%=TableFontColor%>>
<td align=center><font color="<%=TableFontColor%>"><b>用戶名</b></font></td>
<td align=center><font color="<%=TableFontColor%>"><b>Email</b></font></td>
<td align=center><font color="<%=TableFontColor%>"><b>OICQ</b></font></td>
<td align=center><font color="<%=TableFontColor%>"><b>主頁</b></font></td>
<td align=center><font color="<%=TableFontColor%>"><b>短消息</font></td>
<td align=center><font color="<%=TableFontColor%>"><b>注冊時(shí)間</b></font></td>
<td align=center><font color="<%=TableFontColor%>"><b>等級狀態(tài)</b></font></td>
<td align=center><font color="<%=TableFontColor%>"><b>發(fā)貼總數(shù)</b></font></td>
<td align=center><font color="<%=TableFontColor%>"><b>
<% if orders=4 then
response.write "存款"
elseif orders=5 then
response.write "百萬富翁本月得分"
elseif orders=6 then
response.write "百萬富翁通關(guān)次數(shù)"
else
response.write "財(cái)產(chǎn)"
end if
%>
</b></font></td>
</tr>
<%
if currentpage="" or not isInteger(currentpage) then
currentpage=1
else
currentpage=clng(currentpage)
if err then
currentpage=1
err.clear
end if
end if
dim rs,sql
set rs=server.createobject("adodb.recordset")
select case orders
case 1
sql="select top 10 username,useremail,userclass,oicq,homepage,article,addDate,userwealth as wealth from [user] order by article desc"
case 2
sql="select top 10 username,useremail,userclass,oicq,homepage,article,addDate,userwealth as wealth from [user] order by AddDate desc"
case 7
sql="select username,useremail,userclass,oicq,homepage,article,addDate,userwealth as wealth from [user] order by AddDate desc"
case 8
sql="select username,useremail,userclass,oicq,homepage,article,addDate,userwealth as wealth from [user] where userclass>=19 order by userclass desc,article desc"
case else
sql="select top 10 username,useremail,userclass,oicq,homepage,article,addDate,userwealth as wealth from [user] order by article desc"
end select
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>
<tr bgcolor=<%=TableBodyColor%>>
<td colspan=9><font color="<%=TableContentColor%>"> 還沒有任何用戶數(shù)據(jù)。</font></td>
</tr>
<%
else
rs.PageSize = MaxAnnouncePerpage
rs.AbsolutePage=currentpage
page_count=0
totalrec=rs.recordcount
while (not rs.eof) and (not page_count = rs.PageSize)
%>
<tr bgcolor=<%=TableBodyColor%>>
<td> <a href="dispuser.asp?name=<%=htmlencode(rs("username"))%>" target=_blank><%=htmlencode(rs("username"))%></a></td>
<td align=center><a href=mailto:<%=rs("useremail")%>><img border=0 src="<%=picurl&P_Email%>"></a></td>
<td align=center>
<%if rs("oicq")="" or isnull(rs("oicq")) then%>
沒有
<%else%>
<a href=http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=rs("oicq")%> target=_blank><img src="<%=picurl&P_oicq%>" alt="查看 OICQ:<%=rs("oicq")%> 的資料" border=0 width=16 height=16></a>
<%end if%>
</td>
<td align=center>
<%if rs("homepage")="" or isnull(rs("homepage")) then%>
沒有
<%else%>
<a href=<%=rs("homepage")%> target=_blank><img border=0 src=<%=picurl&P_homepage%>></a>
<%end if%>
</td>
<td align=center><a href=javascript:openScript('messanger.asp?action=new&touser=<%=htmlencode(rs("username"))%>',400,300)><img src="<%=picurl&P_sms%>" border=0></a></td>
<td align=center><font color="<%=TableContentColor%>"><%=rs("addDate")%></font></td>
<td align=center> <font color="<%=TableContentColor%>"><%=grade(rs("userclass"))%></font><br>
</td>
<td align=center><font color="<%=TableContentColor%>"><%=rs("article")%></font></td>
<td align=center><font color="<%=TableContentColor%>"><%=rs("wealth")%></font></td>
</tr>
<%
page_count = page_count + 1
rs.movenext
wend
end if
function allusers()
tmprs=conn.execute("Select count(userid) from [user]")
allusers=tmprs(0)
set tmprs=nothing
if isnull(allusers) then allusers=0
end function
function gettipnum()
tmprs=conn.execute("Select Count(announceID) from bbs1")
gettipnum=tmprs(0)
set tmprs=nothing
if isnull(gettipnum) then gettipnum=0
end function
%>
</table>
</td></tr>
</table>
<%
Pcount=rs.PageCount
response.write "<table border=0 cellpadding=0 cellspacing=3 width="""&tablewidth&""" align=center>"&_
"<tr><td valign=middle nowrap>"&_
"<font color="&bodyfontcolor&">頁次:<b>"¤tpage&"</b>/<b>"&Pcount&"</b>頁"&_
"每頁<b>"&MaxAnnouncePerpage&"</b> 用戶數(shù)<b>"&totalrec&"</b></font></td>"&_
"<td valign=middle nowrap><font color="&bodyfontcolor&"><div align=right><p>分頁: "
if currentpage > 4 then
response.write "<a href=""?page=1&orders="&orders&""">[1]</a> ..."
end if
if Pcount>currentpage+3 then
endpage=currentpage+3
else
endpage=Pcount
end if
for i=currentpage-3 to endpage
if not i<1 then
if i = clng(currentpage) then
response.write " <font color="&AlertFontColor&">["&i&"]</font>"
else
response.write " <a href=""?page="&i&"&orders="&orders&""">["&i&"]</a>"
end if
end if
next
if currentpage+3 < Pcount then
response.write "... <a href=""?page="&Pcount&"&orders="&orders&""">["&Pcount&"]</a>"
end if
response.write "</p></div></font></td></tr></table>"
call endline()
%>
<!--#include file="footer.asp"-->
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -