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

📄 research.asp

📁 BJXSHOP购物管理系统是一个功能完善、展示信息丰富的电子商店销售平台;针对企业与个人的网上销售系统;开放式远程商店管理;完善的订单管理、销售统计、结算系统;强力搜索引擎支持;提供网上多种在线支付方
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="connection.asp"-->
<!--#include file="webconfig.asp"-->
<%dim action,searchkey,anclassid,jiage,datestart,dateend
anclassid=request("anclassid")
jiage=request("jiage")
action=request.QueryString("action")
searchkey=replace(request.QueryString("searchkey"),"'","")
datestart=request("datestart")
dateend=request("dateend")
if anclassid="" then anclassid=request.QueryString("anclassid")
if jiage="" then jiage=request.QueryString("jiage")
if action="" then action=int(request("action"))
if searchkey="" then searchkey=replace(trim(request("searchkey")),"'","")
if datestart="" then datestart=request.QueryString("datestart")
if dateend="" then dateend=request.QueryString("dateend")
if not isdate(datestart) or not isdate(dateend) then
Response.write "<script language=javascript>alert('日期格式填写错误');;window.location.reload('javascript:history.go(-1)')</script>"
response.End
end if
datestart=cdate(datestart)
dateend=cdate(dateend)

%>
<%call sss()%>
<html>
<head>
<title><%=webname%>--商品搜索结果</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/default.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<!--#include file="webtop.asp"-->
<table width="776" height="5" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="5"></td>
  </tr>
</table>
<table width="778" border="0" align="center" cellpadding="1" cellspacing="1">
  <tr> 
    <td bgcolor="#FDFADD" style="padding-left:6px"><%if searchkey="" then
	response.write "对不起,请您输入查询关键字"
	response.End
	else
	response.write "您查询的关键字是:<font color=red>"&searchkey&"</font>"
	end if%></td>
  </tr>
</table>
<%'开始分页
				Const MaxPerPage=22 
   				dim totalPut   
   				dim CurrentPage
   				dim TotalPages
   				dim j
   				dim sql
    				if Not isempty(request("page")) then
      				currentPage=Cint(request("page"))
   				else
      				currentPage=1
   				end if 
				
set rs=server.CreateObject("adodb.recordset")
if jiage="" then  '//普通查询
select case action
case "1"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,bookdate,dazhe from shop_books where bookname like '%"&searchkey&"%' and bookdateorder between #"&datestart&"# and #"&dateend&"# order by bookdateorder desc",conn,1,1
case "2"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,bookdate,dazhe from shop_books where bookzz like '%"&searchkey&"%'  and bookdateorder between #"&datestart&"# and #"&dateend&"# order by bookdateorder desc",conn,1,1
case "3"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,bookdate,dazhe from shop_books where bookchuban like '%"&searchkey&"%'  and bookdateorder between #"&datestart&"# and #"&dateend&"# order by bookdateorder desc",conn,1,1
case "4"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,isbn,queshu,bookdate,dazhe from shop_books where isbn='"&searchkey&"' and bookdateorder between #"&datestart&"# and #"&dateend&"# order by bookdateorder desc",conn,1,1
end select
else
'//高级查询
if anclassid<>0 then  '//判断查询分类,分类不为空时。  
if jiage<>0 then  '判断价格,如果受限制。
select case action
case "1"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,bookdate,dazhe from shop_books where bookname like '%"&searchkey&"%' and huiyuanjia<"&jiage&" and anclassid="&anclassid&" and bookdateorder between #"&datestart&"# and #"&dateend&"# order by bookdateorder desc",conn,1,1
case "2"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,bookdate,dazhe from shop_books where bookzz like '%"&searchkey&"%' and huiyuanjia<"&jiage&" and anclassid="&anclassid&" and bookdateorder between #"&datestart&"# and #"&dateend&"# order by bookdateorder desc ",conn,1,1
case "3"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,bookdate,dazhe from shop_books where bookchuban like '%"&searchkey&"%' and huiyuanjia<"&jiage&" and anclassid="&anclassid&" and bookdateorder between #"&datestart&"# and #"&dateend&"#  order by bookdateorder desc",conn,1,1
case "4"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,isbn,bookdate,dazhe from shop_books where isbn='"&searchkey&"' and huiyuanjia<"&jiage&"  and anclassid="&anclassid&" and bookdateorder between #"&datestart&"# and #"&dateend&"#  order by bookdateorder desc",conn,1,1
end select
else '//价格不受限制。
select case action
case "1"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,bookdate,dazhe from shop_books where bookname like '%"&searchkey&"%'  nd anclassid="&anclassid&" and bookdateorder between #"&datestart&"# and #"&dateend&"#  order by bookdateorder desc",conn,1,1
case "2"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijiaqueshu,,bookdate,dazhe from shop_books where bookzz like '%"&searchkey&"%'  and anclassid="&anclassid&" and bookdateorder between #"&datestart&"# and #"&dateend&"# order by bookdateorder desc ",conn,1,1
case "3"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,bookdate,dazhe from shop_books where bookchuban like '%"&searchkey&"%' and anclassid="&anclassid&" and bookdateorder between #"&datestart&"# and #"&dateend&"#  order by bookdateorder desc",conn,1,1
case "4"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,isbn,bookdate,dazhe from shop_books where isbn='"&searchkey&"'  and anclassid="&anclassid&" and bookdateorder between #"&datestart&"# and #"&dateend&"#  order by bookdateorder desc",conn,1,1
end select
end if

else  '//分类为空。
if jiage<>0 then '判断价格,如果受限制。
select case action
case "1"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,bookdate,dazhe from shop_books where bookname like '%"&searchkey&"%' and huiyuanjia<"&jiage&" and bookdateorder between #"&datestart&"# and #"&dateend&"#  order by bookdateorder desc",conn,1,1
case "2"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,bookdate,dazhe from shop_books where bookzz like '%"&searchkey&"%'  and huiyuanjia<"&jiage&" and bookdateorder between #"&datestart&"# and #"&dateend&"#  order by bookdateorder desc",conn,1,1
case "3"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,bookdate,dazhe from shop_books where bookchuban like '%"&searchkey&"%' and huiyuanjia<"&jiage&" and bookdateorder between #"&datestart&"# and #"&dateend&"#  order by bookdateorder desc",conn,1,1
case "4"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,isbn,bookdate,dazhe from shop_books where isbn='"&searchkey&"' and huiyuanjia<"&jiage&" and bookdateorder between #"&datestart&"# and #"&dateend&"# order by bookdateorder desc ",conn,1,1
end select
else '如果价格不受限制。
select case action
case "1"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,bookdate,dazhe from shop_books where bookname like '%"&searchkey&"%'  and bookdateorder between #"&datestart&"# and #"&dateend&"#  order by bookdateorder desc",conn,1,1
case "2"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,bookdate,dazhe from shop_books where bookzz like '%"&searchkey&"%'  and bookdateorder between #"&datestart&"# and #"&dateend&"#  order by bookdateorder desc",conn,1,1
case "3"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,bookdate,dazhe from shop_books where bookchuban like '%"&searchkey&"%'  and bookdateorder between #"&datestart&"# and #"&dateend&"#  order by bookdateorder desc",conn,1,1
case "4"
rs.open "select bookid,bookname,bookzz,bookchuban,shichangjia,huiyuanjia,tuantijia,queshu,isbn,bookdate,dazhe from shop_books where isbn='"&searchkey&"' and bookdateorder between #"&datestart&"# and #"&dateend&"#  order by bookdateorder desc",conn,1,1
end select
end if
end if
end if


		  
				if err.number<>0 then
				response.write "数据库中无数据"
				end if
				
  				if rs.eof And rs.bof then
       				Response.Write "<p align='center' > <font size=2>对不起,没有查询到您需要的图书!</font></p>"
   				else
	  				totalPut=rs.recordcount

      				if currentpage<1 then
          				currentpage=1
      				end if

      				if (currentpage-1)*MaxPerPage>totalput then
	   					if (totalPut mod MaxPerPage)=0 then
	     					currentpage= totalPut \ MaxPerPage
	   					else
	      					currentpage= totalPut \ MaxPerPage + 1
	   					end if
      				end if

⌨️ 快捷键说明

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