jstop.asp
来自「超炫电台程序开发了两个版本了」· ASP 代码 · 共 37 行
ASP
37 行
<!--#include file="Config.asp" -->
<%
on error resume next
dim shu,cut
if Trim(Request.QueryString("shu"))="" or Trim(Request.QueryString("shu"))="0" then
shu=10
else
shu=cint(Request.QueryString("shu"))
end if
if Trim(Request.QueryString("cut"))="" or Trim(Request.QueryString("cut"))="0" then
cut=50
else
cut=cint(Request.QueryString("cut"))
end if
set rs=server.createobject("adodb.recordset")
if Trim(Request.QueryString("CateID"))<>"" and Trim(Request.QueryString("CateID"))<>"0" then
sql="select top "& shu &" SoftID,SoftName,SoftVer,AllHits from "&CategoryName&"_SoftInfo where CateID="&Trim(Request.QueryString("CateID"))&" order by AllHits desc"
elseif Trim(Request.QueryString("SubCateID"))<>"" and Trim(Request.QueryString("SubCateID"))<>"0" then
sql="select top "& shu &" SoftID,SoftName,SoftVer,AllHits from "&CategoryName&"_SoftInfo where SubCateID="&Trim(Request.QueryString("SubCateID"))&" order by AllHits desc"
else
sql="select top "& shu &" SoftID,SoftName,SoftVer,AllHits from "&CategoryName&"_SoftInfo order by AllHits desc"
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then %>
document.write('<p align="center">Sorry! 没有歌曲</p>');
<% else
do while not rs.eof %>
document.write('<li><a href="<%=url%>SoftView.Asp?SoftID=<%=rs("SoftID")%>" title="<%=rs("SoftName")&" "&rs("SoftVer")%>"><%=cutStr(rs("SoftName")&" "&rs("SoftVer"),cut) %></a> <font color=#ff0000>(<%=rs("AllHits")%>)</font></li>');
<% rs.movenext
loop
end if
rs.close
set Rs=nothing
CloseDatabase
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?