<% OPTION EXPLICIT %> 处理 SSI 文件时出错
当前位置 > 文字教程 > asp教程
Tag:入门,文摘,实例,技巧,iis,表单,对象,上传,数据库,记录集,session,cookies,存储过程,注入,分页,安全,优化,xmlhttp,fso,jmail,application,防盗链,stream,组件,md5,乱码,缓存,加密,验证码,算法,ubb,正则表达式,水印,,日志,压缩,url重写,控件,函数,破解,触发器,socket,ADO,初学,聊天室,留言本,视频教程

仿照CHINAASP论坛中TOP10写的部分显示代码

文章类别:asp | 发表日期:2008-10-5 20:42:27

hawkfly 发表于2000-11-8 17:43:只是刚刚写完,未做优化,具体可参照CHINAASP论坛TOP10修改
<% @ 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%" bgcolor="#FFFFFF" 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%" bgcolor="#FFFFFF" 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%" bgcolor="#FFFFFF" 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,top=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%" bgcolor="#FFFFFF" 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,top=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,top=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,top=100,toolbar=no,status=no')"><font color=#0000CC><%=rs("UserName")%></font></td>
<% rs.movenext%>
<%
next
end if %>

</table>

</body>

</html>

视频教程列表
文章教程搜索
 
Asp推荐教程
Asp热门教程
看全部视频教程
购买方式/价格
购买视频教程: 咨询客服
tel:15972130058