📄 query.asp
字号:
<TD bgcolor="#FFFFFF" colspan="2" height="22"> <BR>
</TD>
<TD align=right width="28%" height="22" nowrap>
<FORM action="Default.asp" method=get>
总分类:
<SELECT name="classid" size="1" style="color:#008080;font-size: 9pt" onChange='javascript:submit()'>
<%
sql="select class,classid from class"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
%>
<OPTION value="">Not Record!</OPTION>
<%else%>
<%
do while not rs.eof
%>
<OPTION <%if request("classid")<>"" then%><%if cint(rs("classid"))=cint(request("classid")) then%> selected <%end if%><%end if%>value="<%=rs("classid")%>"><%=rs("class")%></OPTION>
<%
rs.movenext
loop
end if
rs.close
%>
</SELECT>
</FORM>
</TD>
<TD width="29%" height="22" nowrap>
<FORM action="Default.asp" method=get>
子分类: <SELECT name="Nclassid" size="1" style="color:#008080;font-size: 9pt" onChange='javascript:submit()'>
<%
if request("classid")="" then
sql="select Nclass,Nclassid from Nclass"
else
sql="select Nclass,Nclassid from Nclass where classid="&request("classid")
end if
rs.open sql,conn,1,1
if rs.bof and rs.eof then
%>
<OPTION value="">Not Record!</OPTION>
<%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>
</TR>
</TABLE>
<%
if request("Nclassid")="" then
sql="select id,showname,note,hits,dateandtime,hot,size,system,orders from download where "&classid&" "&findword&" "
sql=sql&" order by id desc"
else
sql="select id,showname,note,hits,dateandtime,hot,size,system,orders from download where "&classid&" "&Nclassid&" "&findword&" "
sql=sql&" order by id desc"
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,"query.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"query.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"query.asp"
end if
end if
rs.close
end if
sub showContent
dim i
i=0
%>
<TABLE border="0" cellspacing="0" cellpadding="0" align=center width="98%">
<TR>
<TD width="37%" height=22>软件名称和简介</TD>
<TD width="18%" align="center">推荐</TD>
<TD width="18%" align="center">更新日期</TD>
<TD width="13%" align="center">下载次数</TD>
<TD width="14%" align="center">文件大小</TD>
</TR>
<%do while not rs.eof%>
<TR>
<TD width="100%" colspan="5" height=23><A href="list.asp?id=<%=rs("id")%>"><%=replace(rs("showname"),""&keyword&"","<font color=red>"&keyword&"</font>")%></A></TD>
</TR>
<TR>
<TD width="37%" height=22>
<%if len(rs("note"))>18 then%>
<%=left(rs("note"),18)%>……
<%else%>
<%=rs("note")%>
<%end if%>
</TD>
<TD width="18%" align=center>
<%if rs("hot")>3 then%>
<FONT color=red>推荐</FONT>
<%end if%>
</TD>
<TD width="18%" align=center><%=rs("dateandtime")%></TD>
<TD width="13%" align=center><%=rs("hits")%></TD>
<TD width="14%" align=center><%=rs("size")%></TD>
</TR>
<TR>
<TD width="100%" colspan="5" height=11>运行环境:<%=rs("system")%>
授权方式:<%=rs("orders")%></TD>
</TR>
<TR align="center">
<TD width="100%" colspan="5" height=11> </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>
<%
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")&"&action="&request("action")&"&keyword="&keyword&">"
response.write "<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")&"&action="&request("action")&"&keyword="&keyword&">首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&action="&request("action")&"&keyword="&keyword&">上一页</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")&"&action="&request("action")&"&keyword="&keyword&">"
response.write "下一页</a> <a href="&filename&"?page="&n&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&"&action="&request("action")&"&keyword="&keyword&">尾页</a>"
end if
response.write " 页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
response.write " <b>"&maxperpage&"</b>个软件/页 "
%>
转到:
<SELECT name='page' size='1' style="color:#008080;font-size: 9pt" onChange='javascript:submit()'>
<%for i = 1 to n%>
<OPTION value='<%=i%>' <%if cint(Page)=cint(i) then%> selected <%end if%>>第<%=i%>页</OPTION>
<%next%>
</SELECT>
<%
end function
%>
<%
set rs=nothing
conn.close
set conn=nothing
%>
</TD>
</TR>
</TABLE>
</td>
</tr>
</table>
<!--#include file="../end.asp"-->
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -