📄 chatbest.asp
字号:
<%
Response.Expires=0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"
nowpage=Request("page")
if nowpage="" then nowpage=1
nowpage=int(nowpage)
if nowpage<1 then nowpage=1
howturn=Request("turn")
del=CStr(Request("del"))
if howturn="" then howturn="value"
if howturn<>"" and howturn<>"value" and howturn<>"user" and howturn<>"monthv" and howturn<>"times" and howturn<>"grade" then Response.Redirect "err.asp?kind=22"
Set Conn=server.createobject("ADODB.CONNECTION")
Conn.Open Application("zzbird_conn")
if del="yes" then
sql="update userinfo set lastmonth="&month(date)&",monthv=0 where lastmonth<>"&month(date)
conn.Execute(sql)
end if
Set Rs=server.createobject("adodb.recordset")
sql="select * from userinfo order by "&howturn&" desc"
rs.open sql,conn,3,3
rs.pagesize=15 '每页显示数
howpage=rs.pagecount '共几页
if nowpage>howpage then nowpage=howpage
if rs.recordcount<>0 then rs.absolutepage=nowpage '当前页
dim tuser
dim tvalue
dim tmonthv
dim ttimes
dim tgrade
set tuser=Rs("user")
set tvalue=Rs("value")
set tmonthv=Rs("monthv")
set ttimes=Rs("times")
set tgrade=Rs("grade")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>聊神排行榜</title>
<style>
<!--
input { width:100%; height:18; font-size:9pt }
-->
</style>
<script language="javascript">
function openwin(user){
window.open("seeinfo.asp?user="+user,"newwindow","height=310,width=290,left=150,top=60,resizable=no,scrollbars=auto,status=no,toolbar=no,menubar=no,location=no");
}
</script>
</head>
<body oncontextmenu=self.event.returnValue=false style="border: 3px double buttonface; font-size:10pt" bgcolor="buttonface" link="#000000" vlink="#000000" alink="#800000">
<form method="POST" action="findotherok.asp" name="myform">
<fieldset style="padding: 2">
<legend><font color="#A20000"><img border="0" src="images/top.gif">聊神排行榜</font></legend>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-size: 10pt" bordercolor="#111111" width="100%" id="AutoNumber2">
<tr>
<td width="100%" style="border: 2px inset #FFFFFF" colspan="2">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-size: 10pt" width="100%" id="AutoNumber1">
<tr>
<td width="10%" height="16"><input type="button" value="名次" name="B8" onclick="alert('不能以此作为排序依据。只能以“总积分”,“月积分”,“来访次数”,“用户等级”作为排序依据。');"></td>
<td width="19%" height="16"><input type="button" value="用户昵称" name="b2" <%if howturn="user" then%>style="border: 2px inset #D4D0C8"<%else%> onclick="location.href='chatbest.asp?turn=user';"<%end if%>></td>
<td width="14%" height="16"><input type="button" value="总积分" name="b4" <%if howturn="value" then%>style="border: 2px inset #D4D0C8"<%else%> onclick="location.href='chatbest.asp?turn=value';"<%end if%>></td>
<td width="14%" height="16"><input type="button" value="月积分" name="b5" <%if howturn="monthv" then%>style="border: 2px inset #D4D0C8"<%else%> onclick="location.href='chatbest.asp?turn=monthv';"<%end if%>></td>
<td width="14%" height="16"><input type="button" value="来访次数" name="b6" <%if howturn="times" then%>style="border: 2px inset #D4D0C8"<%else%> onclick="location.href='chatbest.asp?turn=times';"<%end if%>></td>
<td width="14%" height="16"><input type="button" value="用户等级" name="b3" <%if howturn="grade" then%>style="border: 2px inset #D4D0C8"<%else%> onclick="location.href='chatbest.asp?turn=grade';"<%end if%>></td>
<td width="15%" height="16"><input type="button" value="详细资料" name="b7" onclick="alert('不能以此作为排序依据。只能以“总积分”,“月积分”,“来访次数”,“用户等级”作为排序依据。');"></td>
</tr>
<%for i=1 to rs.pagesize
if not Rs.Eof then%>
<tr>
<td width="10%" height="16"><%=(nowpage-1)*rs.pagesize+i%></td>
<td width="20%" height="16"><%=tuser%></td>
<td width="14%" height="16"><%=tvalue%></td>
<td width="14%" height="16"><%=tmonthv%></td>
<td width="14%" height="16"><%=ttimes%></td>
<td width="14%" height="16"><%=tgrade%></td>
<td width="14%" height="16"><a href=javascript:openwin("<%=tuser%>");>查看</a></td>
</tr>
<%
rs.movenext
else
%>
<tr>
<td width="10%" height="16"></td>
<td width="20%" height="16"></td>
<td width="14%" height="16"></td>
<td width="14%" height="16"></td>
<td width="14%" height="16"></td>
<td width="14%" height="16"></td>
<td width="14%" height="16"></td>
</tr>
<%end if
next%>
</table>
</td>
</tr>
<tr>
<td width="61%">共<font color="#A20000"><%=rs.recordcount%></font>条,分<font color="#A20000"><%=howpage%></font>页
,当前<select size="1" name="nowpage" style="font-size: 8pt; color:#A20000" onchange="window.open(this.options[this.selectedIndex].value,'_self')">
<%for i=1 to howpage%>
<option value="chatbest.asp?turn=<%=howturn%>&page=<%=i%>" <%if nowpage=i then%>selected<%end if%>><%=i%></option>
<%next%>
</select>页</td>
<td width="39%" align="right"><%if nowpage=1 or rs.recordcount=0 then%><font color="#808080">首页 上页</font> <%else%><a href="chatbest.asp?turn=<%=howturn%>&page=1">首页</a> <a href="chatbest.asp?turn=<%=howturn%>&page=<%=nowpage-1%>">上页</a><%end if
if nowpage=howpage then%>
<font color="#808080">下页 末页</font><%else%>
<a href="chatbest.asp?turn=<%=howturn%>&page=<%=nowpage+1%>">下页</a> <a href="chatbest.asp?turn=<%=howturn%>&page=<%=howpage%>">末页</a><%end if%></td>
</tr>
</table>
</fieldset><div align="center">
<input type="button" value=" 确 定 " name="B9" style="width: 76; height: 22" onclick="javascript:window.close();">
<input type="button" value=" 取 消 " name="B3" style="width: 76; height: 22" onclick="javascript:window.close();"></div>
<div align="right">
<a href="http://aspxer.com/go.aspx?action=nowchat" target="_blank"><font style="font-size: 8pt" color="#808080">NowChat 2.2 - Powered by 喳喳鸟</font></a></div>
</form>
</body>
</html>
<%
Rs.Close
Set Rs=Nothing
Conn.Close
Set Conn=Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -