⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wz_search.asp

📁 网址使用源码
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
if Session("isAdmin")<>true Then
Response.Write "非法闯入!"
Response.End
End if
%>
<%
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>编辑</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>"
response.write "<td nowrap><a href='wz_edit.asp?id="&r("id")&"' target='wz_edit'>编辑</a></td>"
response.write "<td nowrap><a href='detail.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  
%>
      <br>
      <br></td>
  </tr>
</table> 
</BODY> 
</HTML> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -