如何编写TOP 10之类的排行榜?
<% @ LANGUAGE="VBscript" %>
<% OPTION EXPLICIT %>
<!--#include file="DataConn.asp"-->
<!--#include file="FuncSet.asp"-->
<% dim rs,sql,IDa,IDb,s,RegUser,a,b,c
Set rs=Server.CreateObject("ADODB.recordset")
sql="Select from UserInfo ORDER BY iPerience DESC"
rs.Open sql,ConnStr,1,1
RegUser=rs.RecordCount
IDa=1
IDb=2
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="pragma" content="no-cache">
<link rel="stylesheet" type="text/css" href="Site.css">
<title>山水盈盈之论坛大英雄</title>
</head>
<body class="detail">
<table border="0" width="70%" cellpadding="0" align="center">
<tr>
<td width="16%" align="center"><font color="#0000A0">名次</font></td>
<td width="16%" class="Listline" align="center"><font color="#0000A0">网名</font></td>
<td width="17%" class="Listline" align="center"><font color="#0000A0">帖数</font></td>
<td width="17%" align="center"><font color="#0000A0">名次</font></td>
<td width="17%" class="Listline" align="center"><font color="#0000A0">网名</font></td>
<td width="17%" class="Listline" align="center"><font color="#0000A0">帖数</font></td>
</tr>
<% if RegUser<10 then
a=RegUser/2
else
a=5
end if
for s=1 to a
%>
<tr>
<td width="16%" align="center" valign="bottom"><font size="2"
color="#0000A0"><b><%=IDa%></b></font> </td>
<td class="Listline" align="center" style="cursor:hand" onmouseup="window.open('UserInfo.asp?UserName=<%=rs("UserName")%>','Call','width=350,height=400,left=300,=100,toolbar=no,status=no')"><font color=#0000CC><%=rs("UserName")%></font></td>
<td class="Listline" align="center"><%=rs("iPerience")%></td>
</td>
<%rs.movenext%>
<td width="17%" align="center" valign="bottom"><font size="2"
color="#0000A0"><b><%=IDb%></b></font> </td>
<td class="Listline" align="center" style="cursor:hand" onmouseup="window.open('UserInfo.asp?UserName=<%=rs("UserName")%>','Call','width=350,height=400,left=300,=100,toolbar=no,status=no')"><font color=#0000CC><%=rs("UserName")%></font></td>
<td class="Listline" align="center"><%=rs("iPerience")%></td>
</tr>
<%
IDa=IDa+2
IDb=IDb+2
rs.movenext
next
%>
<% if RegUser>20 then
for b=11 to 15 %>
<td class="Listline" align="center" style="cursor:hand" onmouseup="window.open('UserInfo.asp?UserName=<%=rs("UserName")%>','Call','width=350,height=400,left=300,=100,toolbar=no,status=no')"><font color=#0000CC><%=rs("UserName")%></font></td>
<% rs.movenext%>
<%
next
end if %>
<% if RegUser>20 then
for c=16 to 20 %>
<td class="Listline" align="center" style="cursor:hand" onmouseup="window.open('UserInfo.asp?UserName=<%=rs("UserName")%>','Call','width=350,height=400,left=300,=100,toolbar=no,status=no')"><font color=#0000CC><%=rs("UserName")%></font></td>
<% rs.movenext%>
<%
next
end if %>
</table>
</body></html>
[1]
编程语言
- 宿迁百度关键词排名指南:实现精准营销的关键
- 四川SEO优化怎么做网络推广
- 立昂技术备案老域名收购:如何为您的业务赋能
- 安徽百度关键词seo贵不贵,一般需要多少钱
- 吉林百度快照排名怎么做电话营销
- 多伦新手做SEO怎么做
- 甘肃优化关键词排名推广怎么做论坛营销
- 沙雅SEO网站推广:提升您的在线可见性
- 四川SEO优化如何提升销售额和销售量
- 聂荣网站排名优化:提升网站可见性的全方位指
- 涞水SEO:提升地方企业在线可见性的策略
- 辽宁百度seo排名怎样做网站排名
- 临湘哪有关键词排名优化:提升网站可见度的关
- 黑龙江百度网站优化有没有优惠
- 凉城优化关键词排名推广:提升您的网络可见性
- 萝北整站优化:提升您网站流量和排名的全面指