📄 jsclass.asp
字号:
<%
on error resume next
dim conn
dim dbpath
set conn=server.createobject("adodb.connection")
DBPath = Server.MapPath("download.asa")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
%>
<%
dim shu,news,classid
if request.querystring("shu")="" or request.querystring("shu")=0 then
shu=10
else
shu=CINT(request.querystring("shu"))
end if
set rs=server.createobject("adodb.recordset")
if request("classid")<>"" then
classid = request("classid")
set rs=conn.execute("SELECT Nclass.Nclassid,Nclass.Nclass,download.id,download.showname,download.classid,download.Nclassid,download.dateandtime,download.hots FROM download,Nclass where download.classid="&cstr(classid)&" and download.Nclassid=Nclass.Nclassid order by download.id desc")
else
set rs=conn.execute("SELECT Nclass.Nclassid,Nclass.Nclass,download.id,download.showname,download.classid,download.Nclassid,download.dateandtime,download.hots FROM download,Nclass where download.Nclassid=Nclass.Nclassid order by download.id desc")
end if
if rs.eof and rs.bof then %>
document.write('<p align="center">Sorry! 没有软件</p>');
<% else
news=1
do while not rs.eof%>
document.write('<TR><TD>[<A href="sort.asp?classid=<%=rs("classid")%>&nclassid=<%=rs("nclassid")%>"><%=rs("nclass")%></A>] <A href="list.Asp?id=<%=rs("id")%>" title="<%=rs("showname")%>" target="_blank"><%if len(rs("showname"))>16 then%><%=left(rs("showname"),16)%>...<%else%><%=rs("showname")%><%end if%></A> <FONT color="#666666">(<%=month(rs("dateandtime"))%>/<%=day(rs("dateandtime"))%>)</FONT><%if rs("dateandtime")>=date() then%><FONT color="#ff0000">新!</FONT><%end if%><%if rs("hots")=1 then%><FONT color="#ff0000">(推荐)</FONT><%end if%></TD></TR>');
<% news=news+1
if news>shu then exit do
rs.movenext
loop
end if
Rs.Close
set Rs=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -