www.gusucode.com > 黑鹰自助链管理系统 1.1 商业版码程序 > adminhymm/wz_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&"%' and zhang<=1 order by yl_intime desc"
else
sql="select * from detail where title like '%"&word&"%' and zhang<=1 order by yl_intime desc"
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=100% border=0 align=center cellpadding=5 cellspacing=1 bordercolorlight=#cecece bordercolordark=#ffffff bgcolor="#000000">
<tr>
<td height=25 bgcolor=#ececec align=middle colspan=6>&nbsp;<font color=#FF0000>★<B>网站搜索结果</B>★</font></td></tr>
<tr>
<td nowrap bgcolor="#FFFFFF">编号</td>
<td bgcolor="#FFFFFF">网站名称</td>
<td bgcolor="#FFFFFF">网站url</td>
<td nowrap bgcolor="#FFFFFF">所属分类</td>
<td bgcolor="#FFFFFF">编辑</td>
<td bgcolor="#FFFFFF">删除</td>
</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 "<tr><td height=25 colspan=6 align=middle bgcolor=#FFFFFF>没有找到所需记录!</td></tr>"
response.end
end if
r.pagesize=50
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 nowrap bgcolor=#FFFFFF>"&r("id")&"</td>"
response.write "<td nowrap bgcolor=#FFFFFF>"&r("title")&"</td>"
response.write "<td nowrap bgcolor=#FFFFFF>"&r("url")&"</td>"
response.write "<td nowrap bgcolor=#FFFFFF>"&rr("classname")&"</td>"
response.write "<td nowrap bgcolor=#FFFFFF><a href='wz_edit.asp?id="&r("id")&"'>编辑</a></td>"  
response.write "<td nowrap bgcolor=#FFFFFF><a href='admin_detail_verity.asp?pn=1&delete="&r("id")&"'>删除</a></td></tr>" 
rr.close                   
set rr=nothing
rowcount=rowcount-1
r.movenext
loop
%>
<tr>
<td height=25 bgcolor=#ececec colspan=6>&nbsp;
<%  
ppage=pn-1  
npage=pn+1  
totalpage=r.pagecount  
if cint(totalpage)>cint(pn) then  
%> 
每页显示<%=r.pagesize%>个网站,当前第<%=pn%>页,总共<%=totalpage%>页
<a href='<%=request.servervariables("script_name")%>?pn=1'>首页</a>  
<a href='<%=request.servervariables("script_name")%>?pn=<%=ppage%>'>上一页</a>  
<a href='<%=request.servervariables("script_name")%>?pn=<%=npage%>'>下一页</a>  
<a href='<%=request.servervariables("script_name")%>?pn=<%=totalpage%>'>尾页</a>  
<%  
else  
if pn=1 then  
%>
每页显示<%=r.pagesize%>个网站,当前第<%=pn%>页,总共<%=totalpage%>页  
<a href='<%=request.servervariables("script_name")%>?pn=1'>首页</a>  
<a href='<%=request.servervariables("script_name")%>?pn=<%=npage%>'>下一页</a>  
<a href='<%=request.servervariables("script_name")%>?pn=<%=totalpage%>'>尾页</a>  
<%  
else  
%>
每页显示<%=r.pagesize%>个网站,当前第<%=pn%>页,总共<%=totalpage%>页
<a href='<%=request.servervariables("script_name")%>?pn=1'>首页</a>
<a href='<%=request.servervariables("script_name")%>?pn=<%=ppage%>'>上一页</a>
<a href='<%=request.servervariables("script_name")%>?pn=<%=totalpage%>'>尾页</a>
<%  
end if
end if
%>
</td></tr>
</table>
</BODY> 
</HTML>