?? search.asp
字號:
<%
set rs_type=server.CreateObject("ADODB.RecordSet")
set rs=server.CreateObject("ADODB.RecordSet")
Function CheckStr(Str)
If Trim(Str)="" Or IsNull(str) Then Exit Function
Checkstr=Replace(Trim(Str),"'","''")
Checkstr=Replace(Trim(Str),"%","''")
End Function
sss=request("sss")
if CheckStr(request("cd"))="" and CheckStr(request("k"))="" then
MaxPerPage=30 '###每頁顯示條數
sePAGE="no"
else
MaxPerPage=10 '###每頁顯示條數
end if
if CheckStr(request("pl"))<>"" then
pl=CheckStr(request("pl"))
else
pl="time"
end if
skN=CheckStr(request("k"))
skP="更新日期"
if CheckStr(request("pl"))="downcount" then
skP="下載次數"
elseif CheckStr(request("pl"))="count" then
skP="人氣瀏覽"
end if
if CheckStr(request("cd"))<>"" then
skN=CheckStr(request("cd"))
skCD=" and cd='"&request("cd")&"'"
end if
%>
<!--#include file="db/user.asp" -->
<!--#include file="head.asp"-->
<div align=center> </div>
<div align=center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="737">
<tr>
<td width="100%" bgcolor="#eeeeee" height="1" colspan="2"></td>
</tr>
<tr>
<td bgcolor="#f7f7f7" height="24"> 您的位置:<a href="./">首頁</a> >> 查找結果 >> 關鍵字:<font color="#FF0000"><%=skN%></font>
[<font color="#008000">盡量不要帶版本號</font>]</td>
<td bgcolor="#f7f7f7" height="24" align="right"></td>
</tr>
<tr>
<td width="100%" bgcolor="#eeeeee" height="1" colspan="2"></td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFFF" height="4" colspan="2"></td>
</tr>
</table>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="737" bgcolor="#FFFFFF" align="center">
<tr>
<td width="2"><img border="0" src="images/c.gif" width="2" height="1"></td>
<td width="188" valign="top" bgcolor="#F7F7F7"> </td>
<td width="4"><img border="0" src="images/c.gif" width="4" height="1"></td>
<td width="572" valign="top">
<table border="0" cellpadding="0" cellspacing="1" width="100%" bgcolor="#FFFFFF">
<tr>
<td width="52%" bgcolor="#CCCCCC" height="24" align="center"><font color="#FFFFFF"><b>軟件名稱</b></font></td>
<td width="12%" bgcolor="#CCCCCC" height="24" align="center"><a href="search.asp?cd=<%=request("cd")%>&pl=time&k=<%=request("k")%>" title="按更新時間重新排列軟件"><font color="#FFFFFF"><b>更新時間</b></font></a></td>
<td width="12%" bgcolor="#CCCCCC" height="24" align="center"><a href="search.asp?cd=<%=request("cd")%>&pl=downcount&k=<%=request("k")%>" title="按下載次數值重新排列軟件"><font color="#FFFFFF"><b>下載次數</b></font></a><a href="search.asp?cd=<%=request("cd")%>&pl=hot&k=<%=request("k")%>" title="按軟件等級重新排列軟件"><font color="#FFFFFF"></font></a></td>
<td width="12%" bgcolor="#CCCCCC" height="24" align="center"><a href="search.asp?cd=<%=request("cd")%>&pl=count&k=<%=request("k")%>" title="按軟件等級重新排列軟件"><font color="#FFFFFF"><b>人氣指數</b></font></a><a href="search.asp?cd=<%=request("cd")%>&pl=downcount&k=<%=request("k")%>" title="按下載次數值重新排列軟件"><font color="#FFFFFF"></font></a></td>
<td width="12%" bgcolor="#CCCCCC" height="24" align="center"><font color="#FFFFFF"><b>文件大小</b></font></td>
</tr>
<%if request("k")="" and request("pl")="" and request("cd")="" then%>
<tr>
<td width="100%" colspan="5" height="138" align="center" bgcolor="#FFFFFF">關鍵詞不能為空!<a href="search.asp?cd=<%=request("cd")%>&pl=downcount&k=<%=request("k")%>" title="按下載次數值重新排列軟件"><font color="#FFFFFF"><b>下載次數</b></font></a></td>
</tr>
<%else
set rs_list=server.CreateObject("ADODB.RecordSet")
set rs_type=server.CreateObject("ADODB.RecordSet")
set rs=server.CreateObject("ADODB.RecordSet")
KN=split(request("k")," ")
for i = 0 to ubound(KN)
KNN=KNN&" or name like '%"&KN(i)&"%' "
next
%>
<%
sql="select * from download where (name like '%"&request("k")&"%'"&KNN&")"&skCD&" order by "&pl&" desc"
rs.open sql,conn,1,1
if rs.eof then
%>
<tr>
<td width="100%" colspan="5" bgcolor="#FFFFFF" align="center" height="160"><img src="images/d_sorryNoSearch.gif" border="0" width="186" height="150"></td>
</tr>
<%else
if sePAGE<>"no" then '###排行方式時只顯示指定數目
rs.pagesize=MaxPerPage '得到每頁數
mpage=rs.pagecount '得到總頁數
allshu=rs.recordcount
if request("page")<>"" then
if cint(request("page"))<1 or cint(request("page"))>mpage then
currentPage=1
else
currentPage=cint(request("page"))
end if
else
currentPage=1
end if
rs.move (currentPage-1)*MaxPerPage
end if '###排行方式時只顯示指定數目
do while not rs.eof%>
<%'''軟件
softname=rs("name")
if request("k")<>"" then
for i = 0 to ubound(KN)
softname=replace(softname,""&KN(i)&"","<font color=#FF0000>"&KN(i)&"</font>")
next
end if%>
<tr height="60">
<td width="52%" bgcolor="#FFFFFF" height="24">·<a target=_blank href="show.asp?id=<%=rs("id")%>"><b><%=softname%></b></a>
</td>
<td width="12%" align="center" bgcolor="#FFFFFF" height="24"><%=year(rs("time"))&"-"&month(rs("time"))&"-"&day(rs("time"))%></td>
<td width="12%" align="center" bgcolor="#FFFFFF" height="24"><%=rs("downcount")%>
</td>
<td width="12%" align="center" bgcolor="#FFFFFF" height="24"><%=rs("count")%></td>
<td width="12%" align="center" bgcolor="#FFFFFF" height="24"><%=rs("size")%></td>
</tr>
<tr height="60">
<td width="100%" bgcolor="#FFFFFF" colspan="5" height="1">
<%if rs("show")<>"" then%>
<%
tempstr=replace(rs("show"),"<br>","")
tempstr=replace(tempstr,"<p>","")
tempstr=replace(tempstr,"<b>","")
tempstr=replace(tempstr,"<","")
tempstr=replace(tempstr," ","")
tempstr=replace(tempstr," ","")
tempstr=replace(tempstr," ","")
show=left(tempstr,100)
if request("k")<>"" and request("kt")<>"軟件名稱" and request("type")<>"cd" then
for i = 0 to ubound(KN)
show=replace(show,""&KN(i)&"","<font color=#FF0000>"&KN(i)&"</font>")
next
end if%>
<%=show%>...
<%else%>
很不錯,自己看看吧!
<%end if%>
</td>
</tr>
<tr height="60">
<td width="100%" bgcolor="#FFFFFF" colspan="5" height="20"> </td>
</tr>
<tr>
<td width="100%" colspan="5" height="1" background="images/bg_dot.gif" bgcolor="#FFFFFF"></td>
</tr>
<%
di=di+1
if di>=MaxPerPage then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
</table>
<%if allshu>0 and skPAGE<>"no" then%>
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td nowrap bgcolor="#F7F7F7"> 共找到<b><%=allshu%></b>條 當前第<b><%=currentPage%></b>/<b><%=mpage%></b>頁 每頁<b><%=MaxPerPage%></b>條</td>
<td bgcolor="#F7F7F7">
<%
pageno=currentPage
%>
<%if cint(pageno)>1 then%>
<a href="search.asp?cd=<%=request("cd")%>&pl=<%=request("pl")%>&k=<%=request("k")%>" title="最前頁">
<%end if%>
首頁</a>
<%if cint(pageno)>1 then%>
<a href="search.asp?cd=<%=request("cd")%>&pl=<%=request("pl")%>&k=<%=request("k")%>&page=<%=pageno-1%>" title="上一頁">
<%end if%>
上一頁</a>
<%
pp=cint(pageno)-5
if pp<1 then
pp=1
end if
for pno=pp to mpage
if len(pno)=1 then
end if
p=p+1
if pno*1=cint(pageno)*1 then
%>
<font color="#FF0000">[<%=pno%>]</font>
<%else%>
<a href="search.asp?cd=<%=request("cd")%>&pl=<%=request("pl")%>&k=<%=request("k")%>&page=<%=pno%>">[<%=pno%>]</a>
<%end if%>
<%
if p>=7 then exit for
next%>
<%if cint(pageno)< mpage then%>
<a href="search.asp?cd=<%=request("cd")%>&pl=<%=request("pl")%>&k=<%=request("k")%>&page=<%=pageno+1%>" title="下一頁">
<%end if%>
下一頁</a>
<%if cint(pageno)< mpage then%>
<a href="search.asp?cd=<%=request("cd")%>&pl=<%=request("pl")%>&k=<%=request("k")%>&page=<%=mpage%>" title="最后頁">
<%end if%>
尾頁</a> </td>
<form method="POST" action="search.asp?cd=<%=request("cd")%>&pl=<%=request("pl")%>&k=<%=request("k")%>">
<td align="right" bgcolor="#F7F7F7">轉到第
<input class=textbox name="page" size="3">
頁
<input align="absmiddle" height="21" name="Submit2" src="images/d_goto.gif" type="image" value="Submit" width="27">
</td>
</form>
</tr>
<tr>
<td width="100%" colspan="5" height="1" background="images/bg_dot.gif" bgcolor="#FFFFFF"></td>
</tr>
</table>
<% end if%>
</center>
</table>
<!--#include file="myads.asp" --></BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -