www.gusucode.com > 黑鹰自助链管理系统 1.1 商业版码程序 > search.asp

    <!--#include file="mdb.asp"-->
<%
dim by,word,pn
by=request("by")
word=request("word")
pn=request("pn")
if by="url" then
sql="select * from detail where url like '%"&word&"%'"
else
sql="select * from detail where title like '%"&word&"%'"
end if
%>
<HTML>
<HEAD>
<TITLE>网站搜索结果</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<LINK REL="stylesheet" HREF="css/style.css" TYPE="text/css">
</HEAD>
<BODY>

<table width=760 border=0 align=center cellpadding=3 cellspacing=1 bordercolorlight=#cecece bordercolordark=#ffffff bgcolor="#999999">
<tr>
<td height=25 bgcolor=#ececec colspan=8>&nbsp;<font color=#FF0000>★<B>网站搜索结果</B>★</font> → 你输入的关键字是 → [ <font color=#FF0000><%=word%></font> ]</td></tr>
<tr>
<td width=150 height=30 align=middle bgcolor="#FFFFFF"><B>网站名称</B></td>
<td align=middle bgcolor="#FFFFFF"><B>所属分类</B></td>
<td align=middle bgcolor="#FFFFFF"><B>网站介绍</B></td>
<td align=middle bgcolor="#FFFFFF"><B>网站url</B></td>
</tr>
<tr>
<%
if pn="" then pn=1
set r=server.createobject("adodb.recordset")
r.open sql,conn,1,3
if  r.eof or r.bof then
response.write "<td height=25 align=middle colspan=4 bgcolor=#FFFFFF>在本站没有找到有关 <B>"&word&"</B> 记录的网站!</td></tr>"
response.write "</table>"
response.end
end if
r.pagesize=20
r.absolutepage=pn
rowcount=r.pagesize
do while not r.eof and not r.bof and rowcount>0
set rr=server.createobject("adodb.recordset")
rr.open "select * from feilei where classid="&r("classid"),conn,1,3
response.write "<td height=25 vAlign=top bgcolor=#FFFFFF><A HREF=showurl.asp?id="&r("id")&" target=_blank>"&r("title")&"</A></td>"
response.write "<td vAlign=top bgcolor=#FFFFFF><font color=#FF0000>"&rr("classname")&"</font></td>"
response.write "<td vAlign=top bgcolor=#FFFFFF>  "&r("memo")&"</td>"
response.write "<td vAlign=top bgcolor=#FFFFFF>"&r("url")&"</td></TR>"
rr.close                   
set rr=nothing
rowcount=rowcount-1
r.movenext
loop
%>
</table>
</BODY>
</HTML>