top10.asp

来自「大家好」· ASP 代码 · 共 56 行

ASP
56
字号
<%@ language="vbscript" %>
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.open application("dbcon_connectionstring")
set rs=server.createobject("ADODB.RecordSet")
sqltext="select top 10 username,lives from user_info order by lives desc"
rs.open sqltext,conn,1,1
%>
<html>

<head>
<meta http-equiv="Content-Language" content="content=" text/html; charset="gb2312&quot;">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style type="text/css">
<!--
-->
</style>
<title>TOP 10</title>
<link rel="stylesheet" href="club.css">
</head>

<body bgcolor="#FFFFF0">
<span class="title"></span> <span class="p9"></span> 
<table border="1" width="60%" cellspacing="0" cellpadding="4" bordercolordark="#FFFFFF"
bordercolorlight="#000000" align="center">
  <tr bgcolor="#FFFFF0"> 
    <td colspan="3" align="center">【积分TOP 10】 </td>
  </tr>
  <tr> 
    <td width="33%" bgcolor="#B6C8FE" align="center">排行</td>
    <td width="33%" bgcolor="#B6C8FE" align="center">姓名</td>
    <td width="33%" bgcolor="#B6C8FE" align="center">积分</td>
  </tr>
  <%for i=1 to 10%> 
  <tr> 
    <td width="33%" bgcolor="#EBE7FE" align="center"><font color="#0000FF"><strong><%=i%></strong></font></td>
    <td width="33%" bgcolor="#EBE7FE" align="center"><a
    href="userdet.asp?username=<%=rs("username")%>"><%=rs("username")%></a></td>
    <td width="33%" bgcolor="#EBE7FE" align="center"><font color="#FF0000"><%=rs("lives")%></font> 
    </td>
  </tr>
  <%rs.movenext
if rs.eof then
exit for
end if
next
rs.close
conn.close
set rs=nothing
set conn=nothing
%> 
</table>
</body>
</html>

⌨️ 快捷键说明

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