📄 index.asp
字号:
<%else%>
<%
do while not rs.eof
%>
<option <%if request("Nclassid")<>"" then%><%if cint(rs("Nclassid"))=cint(request("Nclassid")) then%> selected <%end if%><%end if%>value="<%=rs("Nclassid")%>"><%=rs("Nclass")%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
</form>
</td>
<td width=15%>
<form action="index.asp" method=get>
<select name="order" size="1" style='background-color:#CCCCFF' onchange='javascript:submit()'>
<option selected value="id">按序号排序</option>
<option value="showname">按标题排序</option>
<option value="hot">按推荐排序</option>
<option value="hits">按下载排序</option>
<option value="dateandtime">按日期排序</option>
<option value="size">按大小排序</option>
</select>
<input type=hidden name=updown value="desc">
<input type=hidden name=classid value="<%=request("classid")%>">
<input type=hidden name=Nclassid value="<%=request("Nclassid")%>">
</form>
</td>
</tr></table>
<%
if request("Nclassid")="" then
sql="select id,showname,note,dayhits,weekhits,lasthits,hits,dateandtime,hot,size,orders from download where "&classid&" stop=0 "
sql=sql&" order by "&order_name&" "&updown
else
sql="select id,showname,note,dayhits,weekhits,lasthits,hits,dateandtime,hot,size,orders from download where "&classid&" "&Nclassid&" stop=0 "
sql=sql&" order by "&order_name&" "&updown
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>没有或没有找到任何程序</p>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"index.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"index.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"index.asp"
end if
end if
rs.close
end if
sub showContent
dim i
i=0
%> <center><div align=center>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<%if request("updown")="" then%>
<tr>
<td width="41%" bgcolor="#CCCCFF" height=22><a href="index.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=showname&updown=desc" title="点击按升序排列"><font style='TEXT-DECORATION: underline'>软件名称和简介</font></a></td>
<td width="11%" bgcolor="#CCCCFF" align="center"><a href="index.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=hot&updown=desc" title="点击按升序排列"><font style='TEXT-DECORATION: underline'>推荐</font></a></td>
<td width="20%" bgcolor="#CCCCFF" align="center"><a href="index.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=dateandtime&updown=desc" title="点击按升序排列"><font style='TEXT-DECORATION: underline'>更新日期</font></a></td>
<td width="14%" bgcolor="#CCCCFF" align="center"><a href="index.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=orders&updown=desc" title="点击按升序排列"><font style='TEXT-DECORATION: underline'>授权形式</font></a></td>
<td width="14%" bgcolor="#CCCCFF" align="center"><a href="index.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=size&updown=desc" title="点击按升序排列"><font style='TEXT-DECORATION: underline'>文件大小</font></a></td>
</tr>
<%else%>
<tr>
<td width="41%" bgcolor="#CCCCFF" height=22><a href="index.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=showname" title="点击按降序排列"><font style='TEXT-DECORATION: underline'>软件名称和简介</font></a></td>
<td width="11%" bgcolor="#CCCCFF" align="center"><a href="index.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=hot" title="点击按降序排列"><font style='TEXT-DECORATION: underline'>推 荐</font></a></td>
<td width="20%" bgcolor="#CCCCFF" align="center"><a href="index.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=dateandtime" title="点击按降序排列"><font style='TEXT-DECORATION: underline'>更新日期</font></a></td>
<td width="14%" bgcolor="#CCCCFF" align="center"><a href="index.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=orders" title="点击按降序排列"><font style='TEXT-DECORATION: underline'>授权形式</font></a></td>
<td width="14%" bgcolor="#CCCCFF" align="center"><a href="index.asp?classid=<%=request("classid")%>&Nclassid=<%=request("Nclassid")%>&order=size" title="点击按降序排列"><font style='TEXT-DECORATION: underline'>文件大小</font></a></td>
</tr>
<%end if%>
<%do while not rs.eof%>
<tr>
<td width="100%" colspan="5" height=22><IMG SRC="CLICK.GIF"><a href="list.asp?id=<%=rs("id")%>" title="点击查看详细介绍"><%=rs("showname")%></a></td>
</tr>
<tr>
<td width="41%" height=22> <%if len(rs("note"))>18 then%><%=left(rs("note"),18)%>……<%else%><%=rs("note")%><%end if%></td>
<td width="11%" align=center><%if rs("hot")>3 then%><font color=red>推荐</font><%end if%></td>
<td width="20%" align=center><%=rs("dateandtime")%></td>
<td width="14%" align=center><%=rs("orders")%></td>
<td width="14%" align=center><%=rs("size")%></td>
</tr>
<tr>
<td width="100%" colspan="5" height=22>
本日下载:
<%if day(rs("lasthits"))=day(now()) and month(rs("lasthits"))=month(now()) and year(rs("lasthits"))=year(now()) then%>
<font color=red><%=rs("dayhits")%></font><%else%><font color=red>0</font><%end if%>
本周:
<%
p_year=CInt(year(Now()))-CInt(year(rs("lasthits")))
p_month=CInt(month(Now()))-CInt(month(rs("lasthits")))
p_day=CInt(day(Now()))-CInt(day(rs("lasthits")))
period_time=((p_year*12+p_month)*30+p_day)
if cint(period_time)>=cint(7) then
%>0<%else%>
<%=rs("weekhits")%><%end if%>
总计:<%=rs("hits")%>
</td>
</tr>
<tr>
<td background=../images/bg02.gif height=1 colspan="5" width=85%>
</td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
</center></div>
<%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<form method=Post action="&filename&"?classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&order="&request("order")&"&updown="&request("updown")&">"
response.write "<p align='right'><font color='red'>"&Nclassname&"</font>"
if CurrentPage<2 then
response.write ""&totalnumber&"个 首页 上一页 "
else
response.write ""&totalnumber&"个 <a href="&filename&"?page=1&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&order="&request("order")&"&updown="&request("updown")&">首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&order="&request("order")&"&updown="&request("updown")&">上一页</a> "
end if
if n-currentpage<1 then
response.write "下一页 尾页"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&order="&request("order")&"&updown="&request("updown")&">"
response.write "下一页</a> <a href="&filename&"?page="&n&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&order="&request("order")&"&updown="&request("updown")&">尾页</a>"
end if
response.write " 页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
response.write " <b>"&maxperpage&"</b>个软件/页 "
%>
转到:<select name='page' size='1' style='background-color:#CCCCFF' onchange='javascript:submit()'>
<%for i = 1 to n%>
<option value='<%=i%>' <%if cint(Page)=cint(i) then%> selected <%end if%>>第<%=i%>页</option>
<%next%>
</select>
</p></form>
<%
end function
%>
<!--#include file=query.asp-->
<%
set rs=nothing
conn.close
set conn=nothing
%>
</td>
</tr>
</table>
</div>
<table border="0" width="763" align=center bgcolor="#FFFFFF" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
</td>
</tr>
<tr>
<td background=images/bg02.gif height=1>
</td>
</tr>
<tr>
<td width="100%">
<!--#include file="myads.asp"--></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -