📄 prod2.asp
字号:
<!--#include file="../include/dbopenbd.asp"-->
<!--#include file="checkadmin.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="manage.css" type="text/css">
</head>
<BODY background="../images/admin/back.gif">
<form name=form1 action=prod1.asp method=post>
<input type=hidden name=search value="yes">
<input type=hidden name=sql value="">
</form>
<%
session("sql")=""
if request("search")="ok" then
sql="select * from s_produc where ProdId is not null"
if request("fenlei")<>"" then
tmp=split(request("fenlei"),"^")
sql=sql & " and LarCode='"&tmp(0)&"' and MidCode='"&tmp(1)&"'"
end if
'response.write request("qname")
if request("name_key")<>"" then sql=sql & " and ProdName like '%"&buyoktxtcheck(request("name_key"))&"%'"
if request("id_key")<>"" then sql=sql & " and ProdId='"&buyoktxtcheck(request("id_key"))&"'"
if request("jj_key")<>"" then sql=sql & " and ProdDisc like '%"&buyoktxtcheck(request("jj_key"))&"%'"
if request("nr_key")<>"" then sql=sql & " and MemoSpec like '%"&buyoktxtcheck(request("nr_key"))&"%'"
If isNumeric(request("jg1_key")) then sql=sql & " and PriceList>="&request("jg1_key")
If isNumeric(request("jg2_key")) then sql=sql & " and PriceList<="&request("jg2_key")
if request("tj_key")="1" then sql=sql&" and Remark='1'"
if request("tj_key")="2" then sql=sql&" and Remark='0'"
if request("tej_key")="1" then sql=sql&" and tejia='1'"
if request("tej_key")="2" then sql=sql&" and tejia='0'"
if request("zt_key")="1" then sql=sql&" and Online='1'"
if request("zt_key")="2" then sql=sql&" and Online='0'"
if paixu="1" then sql=sql&" order by adddate desc"
if paixu="2" then sql=sql&" order by adddate"
if paixu="3" then sql=sql&" order by prodid desc"
if paixu="4" then sql=sql&" order by adddate"
if paixu="5" then sql=sql&" order by prodname"
if paixu="6" then sql=sql&" order by ClickTimes desc"
session("sql")=sql
'response.write session("sql")
'response.end
response.write "<script language='javascript'>"
response.write "document.form1.submit();"
'response.write "document.form1.sql="""&sql&""";"
'response.write "alert(document.form1.sql.value);"
'response.write "location.href='prod1.asp?search=yes';"
response.write "</script>"
response.end
end if
%>
<table width="98%" border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
<tr><td colspan=2 class=td height=18>商品高级搜索</td></tr>
<tr><td width=20% align=center>根据商品类别</td><td>
<form name=search action=prod2.asp method=post>
<input type=hidden name='search' value='ok'>
<% Dim a,b,c
set rs=server.createobject("adodb.recordset")
sql="select distinct LarCode,LarSeq,MidCode,midSeq from s_class order by LarSeq,MIdSeq"
rs.Open sql,conn,1,1
response.write "<select name='fenlei'>"
response.write "<option value='' selected>选择商品分类</option>"
if not (rs.bof and rs.eof) then
Do While Not rs.eof
a=rs("larcode")
response.write "<option value='"&rs("larCode")&"^"&rs("MidCode")&"'>"&rs("LarCode")&" >> "&rs("MidCode")&"</option>"
rs.movenext
if rs.eof then exit do
if rs("larcode")<>a then response.write "<option value=''>--------------------------</option>"
loop
response.write "<option value=''>--------------------------</option>"
response.write "<option value='未归类^未归类'>所有未归类的商品</option>"
end if
rs.close
%>
</td></tr>
<tr><td width=20% align=center> 根据商品名称
</td><td><input type=text name="name_key" size=40 maxlength=20></td></tr>
<td width=20% align=center>根据商品编号
</td><td><input type=text name="id_key" size=40 maxlength=20></td></tr>
<td width=20% align=center>根据商品简介
</td><td><input type=text name="jj_key" size=40 maxlength=20></td></tr>
<td width=20% align=center>根据商品内容
</td><td><input type=text name="nr_key" size=40 maxlength=20></td></tr>
<td width=20% align=center>根据商品价格
</td><td>价格范围:从 <input type=text name="jg1_key" size=5 maxlength=4> 元 至 <input type=text name="jg2_key" size=5 maxlength=4> 元</td></tr>
<td width=20% 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" checked>全部</td></TR>
<td width=20% 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" checked>全部</td></TR>
<td width=20% align=center>根据商品状态
</td><td><input type="radio" name="zt_key" value="1">显示 <input type="radio" name="zt_key" value="2">关闭 <input type="radio" name="zt_key" value="3" checked>全部</td></TR>
<td width=20% align=center>搜索结果排序方式
</td><td><input type="radio" name="paixu" value="1" checked>时间降 <input type="radio" name="paixu" value="2">时间升<input type="radio" name="paixu" value="3">编号降 <input type="radio" name="paixu" value="4">编号升 <input type="radio" name="paixu" value="5">名称 <input type="radio" name="paixu" value="6">点击数</td></TR>
<tr><td colspan=2><INPUT name=action TYPE="submit" value="开始搜索"></td></tr>
</form>
</table>
<br>
<font color=red>※提示:</font><br>支持模糊搜索,可根据一个或多个条件进行搜索,非搜索条件可空出。
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -