⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 welcomephview.asp

📁 此程序为网上下载
💻 ASP
字号:
<%@ codepage ="936" %>
<%nickname=Session("hxf_u_nickname")
if nickname="" then Response.Redirect "error.asp?id=210"
n=Year(date())
y=Month(date())
r=Day(date())
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(y)=1 then y="0" & y
if len(r)=1 then r="0" & r
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
sj=n & "-" & y & "-" & r & " " & s & ":" & f & ":" & m
sj2=n & "-" & y & "-01 00:00:00"
chatroombgimage=Application("wsaxhxf_c_chatroombgimage")
chatroombgcolor=Application("wsaxhxf_c_chatroombgcolor")
show=Request.QueryString("show")
if show="" then show=0
if Not(IsNumeric(show)) then show=0
if show<0 then show=0
if show>3 then show=3
page=Request.QueryString("page")
if page="" then page=1
if Not(IsNumeric(page)) then page=1
if page<1 then page=1
page=int(page)
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
connstr=Application("wsaxhg_connstr")
conn.open connstr
Select Case show
 Case 0
  sql="SELECT username,times,value,mvalue,hb,regtime,lasttime FROM reginfo WHERE kill='0' ORDER BY value DESC"
  showtype="按“累积分”排名"
 Case 1
  sql="SELECT username,times,value,mvalue,hb,regtime,lasttime FROM reginfo WHERE kill='0' and DateDiff('m',lasttime,#" & sj2 & "#)=0 ORDER BY mvalue DESC"
  showtype="按“月积分”排名,本月未到的不统计"
 Case 2
  sql="SELECT username,times,value,mvalue,hb,regtime,lasttime FROM reginfo WHERE kill='0' ORDER BY hb DESC"
  showtype="按“货币总量”排名"
 Case 3
  sql="SELECT username,times,value,mvalue,hb,regtime,lasttime FROM reginfo WHERE kill='0' ORDER BY times DESC"
  showtype="按“来访次数”排名"
End Select
rs.open sql,conn,1,1
rs.PageSize=10
totalrec=rs.RecordCount
if totalrec=0 then
 rs.close
 conn.close
 set rs=nothing
 set conn=nothing
 Response.Redirect "error.asp?id=201"
end if
totalpage=rs.PageCount
if page>totalpage then page=totalpage
rs.AbsolutePage=page
rs.CacheSize=rs.PageSize%><html>
<head>
<title>聊神榜</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
a{color:blue;text-decoration:none}
a:hover{color:red;text-decoration:none}
a:active{text-decoration:none}
a:visited{text-decoration:none}
td{font-family:'宋体';font-size:9pt}
input{font-family:'宋体';font-size:9pt;background-color:<%=chattablebgcolor%>;color:000000;border: 1 double}
body{font-family:'宋体';font-size:1pt;line-height:160%}
</style>
<script Language=JavaScript>
function gop(){url="welcomephview.asp?show="+document.forms[0].show.value+"&page="+document.forms[0].page.value;this.location.href=url;}
</script>
</head>
<body oncontextmenu=self.event.returnValue=false leftmargin="5" topmargin="5" bgcolor=#DCD8D0>
<a name="begin"></a> 
<div align=center>
<hr noshade size="2" color=009900>
  <table width="430" border="0" cellspacing="0">
    <form method="post" action="javascript:gop()">
<tr> 
<td> 
<table border="0" width="100%" cellspacing="0">
<tr> 
<td>共 <font color=red><%=totalrec%></font> 个 每页 <font color=red><%=rs.PageSize%></font> 个 共 <font color=red><%=totalpage%></font> 页</td>
<td align="right"> 
<input type="text" name="page" size="3" value="<%=page%>">
<input type="submit" name="Submit" value="Go">
<input type="hidden" name="show" value="<%=show%>">
</td>
<td align="right"><%if page-1>0 then%><a href="welcomephview.asp?show=<%=show%>&page=<%=page-1%>">上一页</a><%else%><font color=666666>上一页</font><%end if%> <%if page+1<=totalpage then%><a href="welcomephview.asp?show=<%=show%>&page=<%=page+1%>">下一页</a><%else%><font color=666666>下一页</font><%end if%> <a href=javascript:history.go(0) title=刷新本页>第<%=page%>页</a></td>
</tr>
</table>
</td>
</tr>
</form>
</table>
<hr noshade size="2" color=009900>
  <table width="100%" border="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellpadding="4" cellspacing="1" bgcolor="#319A31" bordercolor="#319A31">
    <tr bgcolor="#339933"> 
      <td align=center width="25"> 
        <div align="left"><font color="#FFFFFF"> 名次</font></div>
      </td>
      <td align=center> 
        <div align="left"><font color="#FFFFFF"> 用户名</font></div>
      </td>
      <td align=center width="45"> 
        <div align="left"><font color="#FFFFFF"> 累积分</font></div>
      </td>
      <td align=center width="45"> 
        <div align="left"><font color="#FFFFFF"> 月积分</font></div>
      </td>
      <td align=center width="45"> 
        <div align="left"><font color="#FFFFFF"> 货币值</font></div>
      </td>
      <td align=center width="45"> 
        <div align="left"><font color="#FFFFFF"> 次数</font></div>
      </td>
      <td align=center width="45"> 
        <div align="left"><font color="#FFFFFF"> 平均</font></div>
      </td>
    </tr>
    <%p=1+(page-1)*rs.PageSize
i=0
Do while (Not rs.Eof) and i<rs.PageSize
i=i+1%>
    <tr bgcolor="#DCD8D0"> 
      <td><%=p%> </td>
      <td><font color=blue><a href='#' onMouseOver="window.status='详细资料。';return true" onMouseOut="window.status='';return true" onClick="window.open('friendqueryview.asp?id=<%=rs("username")%>','ph','width=365,height=235,scrollbars=no')" title="详细信息"><%=rs("username")%></font></td>
      <td<%if show=0 then Response.Write " bgcolor=#FFFFFF"%>> <%=rs("value")%></td>
      <td<%if show=1 then Response.Write " bgcolor=#FFFFFF"%>> 
        <%if DateDiff("m",rs("lasttime"),sj)<>0 then
Response.Write "--"
else
Response.Write rs("mvalue")
end if%>
      </td>
      <td<%if show=2 then Response.Write " bgcolor=#FFFFFF"%>> <%=rs("hb")%></td>
      <td<%if show=3 then Response.Write " bgcolor=#FFFFFF"%>><%=rs("times")%></td>
      <td>
        <%ts=DateDiff("d",rs("regtime"),sj)
if ts<1 then ts=1
Response.Write int(rs("value")/ts)%>
      </td>
    </tr>
    <%rs.MoveNext
p=p+1
Loop
rs.close
conn.close
set rs=nothing
set conn=nothing%>
  </table>
  <hr noshade size="2" color=009900>
</div>
</body>
</html>










⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -