hawkfly 发表于2000-11-8 17:43:只是刚刚写完,未做优化,具体可参照CHINAASP论坛TOP10修改
1 @ LANGUAGE="VBSCRIPT"
1 OPTION EXPLICIT
1 dim rs,sql,IDa,IDb,s,RegUser,a,b,c
2
3Set rs=Server.CreateObject("ADODB.recordset")
4sql="Select * from UserInfo ORDER BY iPerience DESC"
5rs.Open sql,ConnStr,1,1
6RegUser=rs.RecordCount
7
8IDa=1
9IDb=2
1<html>
2<head>
3<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
4<meta content="no-cache" http-equiv="pragma"/>
5<link href="Site.css" rel="stylesheet" type="text/css"/>
6<title>龙虎排行</title>
7</head>
8<body class="detail">
9<table align="center" border="0" cellpadding="0" width="70%">
10<tr>
11<td align="center" bgcolor="#FFFFFF" width="16%"><font color="#0000A0">名次</font></td>
12<td align="center" class="Listline" width="16%"><font color="#0000A0">网名</font></td>
13<td align="center" class="Listline" width="17%"><font color="#0000A0">帖子数</font></td>
14<td align="center" bgcolor="#FFFFFF" width="17%"><font color="#0000A0">名次</font></td>
15<td align="center" class="Listline" width="17%"><font color="#0000A0">网名</font></td>
16<td align="center" class="Listline" width="17%"><font color="#0000A0">帖子数</font></td>
17</tr>
if RegUser<10 then
a=RegUser/2
else
a=5
end if
for s=1 to a
1<tr>
2<td align="center" bgcolor="#FFFFFF" valign="bottom" width="16%"><font color="#0000A0" size="2"><b>```
3=IDa
4```</b></font> </td>
5<td ```','call','width="350,height=400,left=300,top=100,toolbar=no,status=no')&quot;" align="center" class="Listline" onmouseup="window.open('UserInfo.asp?UserName=```
6=rs(" style="cursor:hand" username")=""><font color="#0000CC">```
7=rs("UserName")
8```</font></td>
9<td align="center" class="Listline">```
10=rs("iPerience")
11```</td>
12
rs.movenext
1<td align="center" bgcolor="#FFFFFF" valign="bottom" width="17%"><font color="#0000A0" size="2"><b>```
2=IDb
3```</b></font> </td>
4<td ```','call','width="350,height=400,left=300,top=100,toolbar=no,status=no')&quot;" align="center" class="Listline" onmouseup="window.open('UserInfo.asp?UserName=```
5=rs(" style="cursor:hand" username")=""><font color="#0000CC">```
6=rs("UserName")
7```</font></td>
8<td align="center" class="Listline">```
9=rs("iPerience")
10```</td>
11</tr>
IDa=IDa+2
IDb=IDb+2
rs.movenext
next
if RegUser>20 then
for b=11 to 15
1<td ```','call','width="350,height=400,left=300,top=100,toolbar=no,status=no')&quot;" align="center" class="Listline" onmouseup="window.open('UserInfo.asp?UserName=```
2=rs(" style="cursor:hand" username")=""><font color="#0000CC">```
3=rs("UserName")
4```</font></td>
rs.movenext
next
end if
if RegUser>20 then
for c=16 to 20
1<td ```','call','width="350,height=400,left=300,top=100,toolbar=no,status=no')&quot;" align="center" class="Listline" onmouseup="window.open('UserInfo.asp?UserName=```
2=rs(" style="cursor:hand" username")=""><font color="#0000CC">```
3=rs("UserName")
4```</font></td>
rs.movenext
next
end if
1
2</table>
3</body>
4</html>