📄 search1.asp
字号:
if(form1.abc0.checked)
window.open("search1.asp");
if(form1.abc1.checked)
window.open("search.asp");
if(form1.abc2.checked)
return false;
}
</script>
<div align="center">
<table border="0" cellspacing="0" width="339" height="1" cellpadding="0" id="table65">
<tr>
<td width="339" height="1"><form name="form1" onsubmit="return(search4())">
<div align="center"><p align="left">
<input type="text" name="keyword" class=textfield size=14 Arial" onMouseOver="this.focus()" onblur="if (value ==''){value='软件名称或简介'}" onFocus="this.select()" onClick="if(this.value=='软件名称或简介')this.value=''" value="软件名称或简介"><input type="submit" style="COLOR:" rgb(0,0,0); FONT-SIZE: 9pt value="搜索" name="B2"><input
type="checkbox" name="abc0" value="1000n" checked>站内数据<input
type="checkbox" name="abc1" value="skycn">所有数据</p>
</div>
</form>
</td>
</tr>
</table>
</div>
</table>
</TD>
</TR>
</TABLE>
<%
if request("Nclassid")="" then
sql="select id,showname,bb,note,hits,dateandtime,hot,size,system,orders from download where "&classid&" "&findword&" "
sql=sql&" order by id desc"
else
sql="select id,showname,bb,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'>没有或没有找到任何程序<br><br><br><b>提示:搜索软件时请不要填入软件的版本号!</b><br><Br></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,"search.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move(currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"search.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"search.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="100%" id="table66">
<TR bgcolor="#FFCC00">
<TD width="53%" height=25 bgcolor="#F8F4F8">
<div align="center">软件名称和简介</div>
</TD>
<TD width="9%" align="center" bgcolor="#F8F4F8">更新日期</TD>
<TD width="9%" align="center" bgcolor="#F8F4F8">下载次数</TD>
<TD width="11%" align="center" bgcolor="#F8F4F8">文件大小</TD>
</TR>
<%do while not rs.eof%>
<TR bgcolor="#FFFFFF">
<TD width="100%" colspan="4" height=23 bgcolor="#F8F4F8"><img border="0" src="images/aer.gif"><A href="list.asp?id=<%=rs("id")%>"><b> <%=replace(rs("showname"),""&keyword&"","<font color=red>"&keyword&"</font>")%> <%=rs("bb")%></b></A></TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD width="53%" height=22 bgcolor="#F8F4F8">
<%if len(rs("note"))>18 then%>
<%=left(rs("note"),18)%>……
<%else%>
<%=rs("note")%>
<%end if%>
</TD>
<TD width="9%" align=center bgcolor="#F8F4F8"><%=rs("dateandtime")%></TD>
<TD width="9%" align=center bgcolor="#F8F4F8"><%=rs("hits")%></TD>
<TD width="11%" align=center bgcolor="#F8F4F8"><%=rs("size")%></TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD width="100%" colspan="4" height=11 bgcolor="#F8F4F8"> <b>运行环境</b>:<%=rs("system")%>
<b>授权方式</b>:<%=rs("orders")%></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&keyword="&keyword&">首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&"&keyword="&keyword&">上一页</a> "
end if
if n-currentpage<1 then
response.write "下一页 尾页"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&keyword="&keyword&">"
response.write "下一页</a> <a href="&filename&"?page="&n&"&keyword="&keyword&">尾页</a>"
end if
response.write " 页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
response.write " <b>"&maxperpage&"</b>个软件/页 "
%>
<%
end function
%>
<%
set rs=nothing
conn.close
set conn=nothing
%>
</TD>
</TR>
</TABLE>
<br>
</td>
<%end if%>
</tr>
</table>
</TD></TR>
</table>
</TD></TR>
</table>
</div>
</TD>
</TR></TBODY></TABLE>
<!--#include file="footer.asp" -->
</BODY>
<%
function getHTTPPage(url)
on error resume next
dim http
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytes2BSTR(Http.responseBody)
set http=nothing
if err.number<>0 then err.Clear
end function
Function bytes2BSTR(vIn)
dim strReturn
dim i1,ThisCharCode,NextCharCode
strReturn = ""
For i1 = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i1,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i1+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i1 = i1 + 1
End If
Next
bytes2BSTR = strReturn
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -