www.pudn.com > baxun36.rar > wz_search.asp, change:2006-04-24,size:3829b


<!--#include file="mdb.asp"--> 
<% 
if session("adminlogin")<>sessionvar then 
Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.location.href='index.asp';</script>") 
Response.End 
End if 
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.css" TYPE="text/css"> 
</HEAD> 
<BODY> 
<table width="96%" border="0" cellspacing="1" cellpadding="8" align="center" bgcolor="#999999"> 
  <tr>  
    <td bgcolor="#cccccc" align="center"> 
      网站搜索结果</td> 
  </tr> 
  <tr>  
    <td bgcolor="#eeeeee"><br> 
<table border="1" bordercolor="black" cellspacing="0"> 
<tr> 
<td nowrap>编号</td> 
<td>网站名称</td> 
<td>网站url</td> 
<td nowrap>所属分类</td> 
<td nowrap>网址推荐</td> 
<td>编辑</td> 
<td>删除</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 "没有找到所需记录!" 
response.end 
end if 
r.pagesize=100 
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>"&r("id")&"</td>" 
response.write "<td nowrap>"&r("title")&"</td>" 
response.write "<td nowrap>"&r("url")&"</td>" 
response.write "<td nowrap>"&rr("classname")&"</td>" 
if r("recommend")=1 then 
response.write "<td nowrap><a href='admin_detail_list.asp?pn=1&btj="&r("id")&"'>取消推荐</a></td>" 
else 
response.write "<td nowrap><a href='admin_detail_list.asp?pn=1&recommend="&r("id")&"'>推荐</a></td>" 
end if 
response.write "<td nowrap><a href='wz_edit.asp?id="&r("id")&"' target='wz_edit'>编辑</a></td>"   
response.write "<td nowrap><a href='admin_detail_list.asp?pn=1&delete="&r("id")&"'>删除</a></td></tr>"  
rr.close                    
set rr=nothing 
rowcount=rowcount-1 
r.movenext 
loop 
%> 
</table> 
<% 
ppage=pn-1 
npage=pn+1 
if pn=1 then 
%> 
<a href='<%=request.servervariables("script_name")%>?pn=1&word=<%=word%>&by=<%=by%>'>首页</a> 
<a href='<%=request.servervariables("script_name")%>?pn=<%=r.pagecount%>&word=<%=word%>&by=<%=by%>'>最后一页</a>   
<a href='<%=request.servervariables("script_name")%>?pn=<%=npage%>&word=<%=word%>&by=<%=by%>'>下一页</a>   
每页显示<%=r.pagesize%>个网站,当前第<%=pn%>页,总共<%=r.pagecount%>页   
<%   
elseif pn<r.pagecount then   
%>   
<a href='<%=request.servervariables("script_name")%>?pn=1'>首页</a>   
<a href='<%=request.servervariables("script_name")%>?pn=<%=r.pagecount%>&word=<%=word%>&by=<%=by%>'>最后一页</a>   
<a href='<%=request.servervariables("script_name")%>?pn=<%=ppage%>&word=<%=word%>&by=<%=by%>'>上一页</a>   
<a href='<%=request.servervariables("script_name")%>?pn=<%=npage%>&word=<%=word%>&by=<%=by%>'>下一页</a>   
每页显示<%=r.pagesize%>个网站,当前第<%=pn%>页,总共<%=r.pagecount%>页   
<%   
else   
%>   
<a href='<%=request.servervariables("script_name")%>?pn=1'>首页</a>   
<a href='<%=request.servervariables("script_name")%>?pn=<%=r.pagecount%>&word=<%=word%>&by=<%=by%>'>最后一页</a>   
<a href='<%=request.servervariables("script_name")%>?pn=<%=ppage%>&word=<%=word%>&by=<%=by%>'>上一页</a>   
每页显示<%=r.pagesize%>个网站,当前第<%=pn%>页,总共<%=r.pagecount%>页   
<% 
end if 
r.close 
set r=nothing 
%>   
        
<br><br></td></tr><tr>   
<td align="center" bgcolor="#eeeeee">[<font color="#002288"> <a href="http://www.baxun.com" target="_blank">八讯免费网</a>   
      </font>]</td>  
  </tr>  
</table>  
</BODY>  
</HTML>