📄 search.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="fun.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>寻梦书库-搜索书籍</title>
<style type="text/css">
<!--a{color:#009966; text-decoration: none}
a:hover{color:#FF00CC; text-decoration: none}-->
<!--
body,td,th {
font-size: 14px;
color: #009966;
}
body {
background-color: #FFFFFF;
background-image: url(image/bg.gif);
}
-->
</style>
</head>
<!--#include file="middle.asp"-->
<br>
<table width=600 height=32 border=0 align="center" cellPadding=3 cellSpacing=0 style="border-collapse: collapse word-break:break-all">
<tr><td align="center"><font size=5><b>搜 索 结 果</b></font>
</td></tr></table>
<p align=center>
<iframe src="http://union.3721.com/v2/box.htm?p=1006&a=2001&b=1003&m=206701&bw=760&tr=2&st=0" width=760 height=80 marginwidth=0 marginheight=0 FRAMEBORDER=0 SCROLLING=NO ></iframe>
</p>
<table width="510" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td>
<form method="GET" action="search.asp?ki=<%rs=("ki")%>&key=<%rs=("key")%>">
<table align="center" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="500">
<tr>
<td width="100%" height="20" align="center">
重新搜索 <input type="text" style="border-bottom:1px dotted #666666;border-left:0px solid #666666;border-right:0px solid #999999;border-top:0px solid #999999" name="key" size="18">
搜索选项 <select size="1" name="ki">
<option value="1"> 书 籍</option>
<option value="2"> 作 者</option>
</select>
<input type="submit" value="搜 索">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<%
''''''''''''''''''''''''''''''''''''''''''''''''''''''
on error resume next '找不到站点资料时忽略错误
ki=request("ki")
key=request("key")
if len(key)=0 then response.redirect("error.asp?word=请输入搜索关键字!")
if ki=1 then
sql="select*from book where bookname like '%"&key&"%'"
set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open sql,conn,1,1
end if
if ki=2 then
sql="select*from book where zuozhe like '%"&key&"%'"
set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open sql,conn,1,1
end if
Rs.pagesize=18
page=Request("page")
if (page-Rs.pagecount) > 0 then
page=Rs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
Rs.absolutepage=page
%>
<%
if rs.eof then
%>
<table width=640 border=0 align="center" cellPadding=3 cellSpacing=0 style="border-collapse: collapse word-break:break-all">
<tr>
<td colspan="2" style="word-break:break-all">
<br>
<%
response.write" 非常抱歉,没有找到你需要的书籍!<br>"
response.write" 欢迎<b><a href=http://bbs.xxbook.net target=_blank>点击这里</a></b>向我们推荐好书!"
%>
</td>
</tr>
</table>
<%
end if
%>
<%
do while not Rs.eof
i = i + 1
if i > Rs.pagesize then
exit do
end if
%>
<table width=640 border=2 bordercolor="#009966" align="center" cellPadding=3 cellSpacing=0 style="border-collapse: collapse word-break:break-all">
<tr>
<td colspan="2" style="word-break:break-all">
<%=Rs("zuozhe")%>
<a href="bookread.asp?bookid=<%=Rs("bookid")%>&bookname=<%=Rs("bookname")%>" target="_blank"> <b>[<%=Rs("bookname")%>]</a></b><br>
推荐度:<%=encode1(rs("tuijian"))%> 总被阅读<b><%=Rs("hit")%></b>次<br>
<%=Rs("adv")%>
</td></tr></table><br>
<%
Rs.movenext
loop
%>
<br>
<table border=0 cellpadding=0 cellspacing=1 width=640>
<tr><td align="center" style="line-height: 150%">
<p>共搜索到相关书籍<%=Rs.recordcount%>种 <%=page%>/<%=Rs.pagecount%>页
<% if page=1 then %>
<%else%>
<a href=search.asp?page=<%=page-1%>>上一页</a>
<%end if%>
<% if Rs.pagecount-page > 0 then %>
<a href=search.asp?page=<%=page+1%>>下一页</a>
<%else%>
<%end if%>
</td></tr></table>
<br>
<!--#include file="foot.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -