📄 search_more.asp
字号:
<!--#include file="include/dbopenbd.asp"-->
<html>
<title>商品高级搜索-<%=sitename%>-<%=siteurl%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="description" content="<%=sitedescription%>">
<meta name="keywords" content="<%=sitekeywords%>">
<link rel="stylesheet" href="include/css.css" type="text/css">
</head>
<%
action=request("action")
if action="" then
%>
<center>
<!--#include file="a_top.asp"-->
<table width="760" border=0 cellspacing=0 cellpadding=0 align=center bgcolor="#FFFFFF" class="grayline">
<tr><td bgcolor="FFFBF7" align=center valign=top width=185>
<!--#include file="a_login.asp" -->
<!--#include file="a_tree.asp" -->
</td>
<td bgcolor="#CCCCCC" width="1"></td>
<td width=569 align=center valign=top>
<TABLE border=0 width=100% cellspacing="2" cellpadding="2" align=center>
<tr><td height=30>目前位置:<a href=main.asp>首页</a> > 商品高级搜索</td></tr>
<tr><td width="569" align="center" height="1" background="images/small/bgline.gif"></td></tr>
</table>
<p align=left><font color=red> <b>根据以下一个或多个复合条件搜索商品:</b></font>
<table width="90%" align=center border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
<form name=search action=search_more.asp method=post>
<tr><td width=25% align=center>根据商品类别</td><td>
<%
set rs=server.createobject("adodb.recordset")
sql="select distinct LarCode,LarSeq from s_class order by LarSeq"
rs.Open sql,conn,1,1
response.write "<select name='fenlei'>"
response.write "<option value='' selected>选择要搜索的商品分类</option>"
if rs.bof and rs.eof then
response.write "<option selected value=''>-暂无分类-</option>"
else
Do While Not rs.eof
response.write "<option value='"&rs("larCode")&"'>"&rs("LarCode")&"</option>"
rs.movenext
if rs.eof then exit do
loop
response.write "<option value='未归类'>所有未归类商品</option>"
end if
rs.close
set rs=nothing
%>
</td></tr>
<tr><td width=25% align=center> 根据商品名称
</td><td><input type=text name=name_key size=20 maxlength=20></td></tr>
<td width=25% align=center>根据商品编号
</td><td><input type=text name=id_key size=20 maxlength=20></td></tr>
<td width=25% align=center>根据商品简介
</td><td><input type=text name=jj_key size=20 maxlength=20></td></tr>
<td width=25% align=center>根据商品内容
</td><td><input type=text name=nr_key size=20 maxlength=20></td></tr>
<td width=25% align=center>根据商品价格
</td><td>价格范围:从 <input type=text name=jg1_key size=5 maxlength=4> 元 至 <input type=text name=jg2_key size=5 maxlength=5> 元</td></tr>
<td width=25% align=center>根据是否推荐
</td><td><input type="radio" name="tj_key" value="1">是 <input type="radio" name="tj_key" value="2">否 <input type="radio" name="tj_key" value="3">全部</td></TR>
<td width=25% align=center>根据是否特价
</td><td><input type="radio" name="tej_key" value="1">是 <input type="radio" name="tej_key" value="2">否 <input type="radio" name="tej_key" value="3">全部</td></TR>
<td width=25% align=center>搜索结果排序方式
</td><td><input type="radio" name="paixu" value="1" checked>按上架日期<br><input type="radio" name="paixu" value="2">按上架日期(倒序)<br><input type="radio" name="paixu" value="3">按编号(由大到小)<br><input type="radio" name="paixu" value="4">按编号(由小到大)<br><input type="radio" name="paixu" value="5">按商品名称<br><input type="radio" name="paixu" value="6">按热门程度</td></TR>
<tr><td colspan=2><INPUT name="action" TYPE="hidden" value="ok"><INPUT name=action TYPE="submit" value="开始搜索"></td></tr>
</form>
</table>
<p align=left><font color=red> <b>根据订单号查询订单详情:</b></font>
<table width="90%" align=center border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
<form name="youkeorder" action="youke_order.asp" method="post">
<td width=25% align=center>订单号
</td><td><input type="text" name="ordernum" size=20 maxlength=20 value=""> [请填写完整的订单号]</td></tr>
<tr><td colspan=2><INPUT name="action" TYPE="hidden" value="ok"><INPUT name=action TYPE="submit" value="查询订单"></td></tr>
</form>
</table>
</TD></TR></TABLE>
<!--#include file="a_bottom.asp"-->
</body></center>
</html>
<%
else
call check_path() '保证此页的调用是合法的
'开始搜索
if trim(request("jg1_key"))<>"" then
if not isNumeric(trim(request("jg1_key"))) then mGoBack "您填写的内容不符合要求,价格必须是数字,请检查!"
end if
if trim(request("jg2_key"))<>"" then
if not isNumeric(trim(request("jg2_key"))) then mGoBack "您填写的内容不符合要求,价格必须是数字,请检查!"
end if
if trim(request("name_key"))<>"" then addsql=addsql+" and prodname like '%"&aspsql(request("name_key"))&"%'"
if trim(request("ID_key"))<>"" then addsql=addsql+" and prodID like '%"&aspsql(request("ID_key"))&"%'"
if trim(request("jj_key"))<>"" then addsql=addsql+" and ProdDisc like '%"&aspsql(request("jj_key"))&"%'"
if trim(request("nr_key"))<>"" then addsql=addsql+" and MemoSpec like '%"&aspsql(request("nr_key"))&"%'"
if request("tj_key")="1" then addsql=addsql+" and remark='1'"
if request("tj_key")="2" then addsql=addsql+" and remark='0'"
if request("tej_key")="1" then addsql=addsql+" and tejia='1'"
if request("tej_key")="2" then addsql=addsql+" and tejia='0'"
if trim(request("fenlei"))<>"" then addsql=addsql+" and larcode='"&aspsql(request.form("fenlei"))&"'"
if trim(trim(request("jg1_key")))<>"" then addsql=addsql+" and PriceList>"&aspsql(request("jg1_key"))
if trim(trim(request("jg2_key")))<>"" then addsql=addsql+" and PriceList<"&aspsql(request("jg2_key"))
if request("paixu")="1" then orderby=" order by adddate desc"
if request("paixu")="2" then orderby=" order by adddate"
if request("paixu")="3" then orderby=" order by prodid desc"
if request("paixu")="4" then orderby=" order by adddate"
if request("paixu")="5" then orderby=" order by prodname"
if request("paixu")="6" then orderby=" order by ClickTimes desc"
if addsql="" then
response.cookies("buyok")("search")=""
Response.Redirect("search_more.asp")
else
dim keywords(3)
keywords(1)=request("name_key")
keywords(2)=request("jj_key")
keywords(3)=request("nr_key")
for i=1 to 3
keyword=keywords(i)
if keyword<>"" then
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from s_key where keywords='"&keyword&"'"
rs.open sql,conn,1,3
if not (rs.eof and rs.bof) then
rs("num")=rs("num")+1
rs("keydate")=now()
else
rs.addnew
rs("keywords")=keyword
rs("keydate")=now()
end if
rs.update
rs.close
set rs=nothing
end if
next
sql="select * from s_produc where ProdId is not null" + addsql +orderby
response.cookies("buyok")("search")=sql
Response.Redirect("search.asp")
end if
end if
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -