📄 select.asp
字号:
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
bookname=trim(request("bookname"))
booktype=trim(request("booktype"))
publishing=trim(request("publishing"))
money1=trim(request("money1"))
money2=trim(request("money2"))
date1=trim(request("date1"))
date11=trim(request("date11"))
date2=trim(request("date2"))
date22=trim(request("date22"))
date3=trim(request("date3"))
date33=trim(request("date33"))
date111=date1&"-"&date2&"-"&date3
date222=date11&"-"&date22&"-"&date33
if len(bookname)<>0 and booktype<>"不清楚" and len(publishing)<>0 then
sql="select * from xhbook where bookname like '%"&bookname&"%' and booktype='"&booktype&"' and publishing like '%"&publishing&"%' and bookmoney>="&money1&" and bookmoney<="&money2&" and xhdate between #"&date111&"# and #"&date222&"# order by id desc"
end if
if len(bookname)<>0 and booktype<>"不清楚" and len(publishing)=0 then
sql="select * from xhbook where bookname like '%"&bookname&"%' and booktype='"&booktype&"' and bookmoney>="&money1&" and bookmoney<="&money2&" and xhdate between #"&date111&"# and #"&date222&"# order by id desc"
end if
if len(bookname)<>0 and booktype="不清楚" and len(publishing)<>0 then
sql="select * from xhbook where bookname like '%"&bookname&"%' and publishing like '%"&publishing&"%' and bookmoney>="&money1&" and bookmoney<="&money2&" and xhdate between #"&date111&"# and #"&date222&"# order by id desc"
end if
if len(bookname)<>0 and booktype="不清楚" and len(publishing)=0 then
sql="select * from xhbook where bookname like '%"&bookname&"%' and bookmoney>="&money1&" and bookmoney<="&money2&" and xhdate between #"&date111&"# and #"&date222&"# order by id desc"
end if
rs.open sql,db,1,3
%>
<style type="text/css">
<!--
table {
font-size: 9pt;
text-decoration: none;
border: 1px solid #000000;
}
-->
</style>
<%if rs.eof or rs.bof then
response.write "对不起没有搜索到记录"
response.end
else
dim pagenum,i
i=0
rs.pagesize=5
pagecount1=rs.pagecount
if request.querystring("pagenum")=0 or request.querystring("pagenum")="" then
pagenum=1
else
pagenum=request.querystring("pagenum")
rs.absolutepage=trim(request.querystring("pagenum"))
end if
%>
<style type="text/css">
<!--
a {
font-size: 9pt;
text-decoration: none;
}
-->
</style>
<style type="text/css">
<!--
p {
font-size: 9pt;
text-decoration: none;
}
-->
</style>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
<tr align="center" bgcolor="#006699">
<td width="220"><font color="#FFFFFF">书籍名称</font></td>
<td width="181"><font color="#FFFFFF">出版社</font></td>
<td width="102"><font color="#FFFFFF">书籍类型</font></td>
<td width="140"><font color="#FFFFFF">出版日期</font></td>
<td width="91"><font color="#FFFFFF">价格</font></td>
</tr>
<%
do while not rs.eof and i<=5
%>
<tr align="center">
<td><%=rs("bookname")%></td>
<td><%=rs("publishing")%></td>
<td><%=rs("booktype")%></td>
<td><%=rs("xhdate")%></td>
<td><font color="#FF0000"><%=rs("bookmoney")%>元</font></td>
</tr>
<%
i=i+1
rs.movenext
loop
rs.close
set rs=nothing
%>
<%end if%>
</table>
<p align="center">
<%
response.write "<a href=select.asp?pagenum=1&bookname="&bookname&"&booktype="&booktype&"&publishing="&publishing&"&money1="&money1&"&money2="&money2&"&date1="&date1&"&date2="&date2&"&date3="&date3&"&date11="&date11&"&date22="&date22&"&date33="&date33&">首页</a>"
%>
<%
if pagenum>1 then
response.write "<a href=select.asp?pagenum="&(pagenum-1)&"&bookname="&bookname&"&booktype="&booktype&"&publishing="&publishing&"&money1="&money1&"&money2="&money2&"&date1="&date1&"&date2="&date2&"&date3="&date3&"&date11="&date11&"&date22="&date22&"&date33="&date33&">上一页</a> "
else
response.write "上一页 "
end if
if pagenum<pagecount1 then
response.write "<a href=select.asp?pagenum="&(pagenum+1)&"&bookname="&bookname&"&booktype="&booktype&"&publishing="&publishing&"&money1="&money1&"&money2="&money2&"&date1="&date1&"&date2="&date2&"&date3="&date3&"&date11="&date11&"&date22="&date22&"&date33="&date33&">下一页</a> "
else
response.write "下一页"
end if
%>
<%
response.write "<a href=select.asp?pagenum="&pagecount1&"&bookname="&bookname&"&booktype="&booktype&"&publishing="&publishing&"&money1="&money1&"&money2="&money2&"&date1="&date1&"&date2="&date2&"&date3="&date3&"&date11="&date11&"&date22="&date22&"&date33="&date33&">尾页</a>"
%>
</p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -