📄 search-end.asp
字号:
<!--#include file="header.asp" -->
<!--#include file="conn/nosql.asp" -->
<table width="778" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="185" valign="top" class="table-right">
<!--#include file="left.asp" --> </td>
<td width="600" height="350" valign="top"> <%
if Request("clid")<>"" or Request("claid")<>"" then
key=nosql(Request("key"))
fw=Request("fw")
clid=clng(Request("clid"))
claid=clng(Request("claid"))
tj=nosql(Request("tj"))
tactic=nosql(Request("tactic"))
else
Response.Write("请先选择产品分类!!")
response.end
end if
Set rs=Server.CreateObject("ADODB.Recordset")
add=" and clid="&clid&" and claid="&claid&" "
select case fw
case ""
sql="select proname,info,proid from sia_product where (proname like '%" & key & "%' or info like '%" & key & "%') "&add&" and hide=false order by "&tj&" "&tactic&""
case "0"
sql="select proname,info,proid from sia_product where disprice between "&fw&" and "&fw&"+9 "&add&" and (proname like '%" & key & "%' or info like '%" & key & "%') and hide=false order by "&tj&" "&tactic&""
case "10"
sql="select proname,info,proid from sia_product where disprice between "&fw&" and "&fw&"+9 "&add&" and (proname like '%" & key & "%' or info like '%" & key & "%') and hide=false order by "&tj&" "&tactic&""
case "20"
sql="select proname,info,proid from sia_product where disprice between "&fw&" and "&fw&"+9 "&add&" and (proname like '%" & key & "%' or info like '%" & key & "%') and hide=false order by "&tj&" "&tactic&""
case "30"
sql="select proname,info,proid from sia_product where disprice between "&fw&" and "&fw&"+9 "&add&" and (proname like '%" & key & "%' or info like '%" & key & "%') and hide=false order by "&tj&" "&tactic&""
case "40"
sqlstr="select proname,info,proid from sia_product where disprice between "&fw&" and "&fw&"+9 "&add&" and (proname like '%" & key & "%' or info like '%" & key & "%') and hide=false order by "&tj&" "&tactic&""
case "50"
sql="select proname,info,proid from sia_product where disprice between "&fw&" and "&fw&"+9 "&add&" and (proname like '%" & key & "%' or info like '%" & key & "%') and hide=false order by "&tj&" "&tactic&""
case "60"
sql="select proname,info,proid from sia_product where disprice >= "&fw&" "&add&" and hide=false and (proname like '%" & key & "%' or info like '%" & key & "%') order by "&tj&" "&tactic&""
end select
rs.open sql,conn,1,1
if rs.eof then
response.write "<br>非常抱谦,未找到符合您搜索关键字的信息。"
end if%> <%
rs.pagesize = 8
if request("page")="" or isempty(request("page")) then
page = 1
else
page=int(request("page"))
end if
if page>rs.pagecount then
page=rs.pagecount
end if
if not rs.BOF then
Rs.Move Rs.PageSize*(page-1)
end if%> <br>
<table width="98%" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"> 符合搜索关键字"<font color=#ff0000><%=key%></font>"的,共有<%=rs.RecordCount%>笔资料,每页显示<%=RS.PageSize%>笔,目前显示第<font color=#ff0000><%=page%></font>/<%=rs.pagecount%>页</td>
</tr>
</table>
<table width=98% border=0 align="center" cellpadding=0 cellspacing=0>
<%
i=1
while not rs.eof and i<=rs.pagesize%>
<tr>
<td height=50 valign=top class="table-bottom"><img src=images/i-5.gif width="17" height="17" align="absmiddle"> <a href= product.asp?proid=<%=rs("proid")%>>
<%proname=rs("proname")
proname=Replace(proname, key ,"<font color=#ff0000>"&key&"</font>")
response.write proname%>
</a><br> <%info=left(rs("info"),100)
info=Replace(info, key ,"<font color=#ff0000>"&key&"</font>")
response.write info%></td>
</tr>
<%i=i+1
rs.MoveNext
wend
%>
</table>
<table width="98%" height="30" align="center" cellpadding="0" cellspacing="0">
<form name=form method=post action=?key=<%=request("key")%>&clid=<%=request("clid")%>&claid=<%=request("claid")%>&fw=<%=request("fw")%>&tj=<%=request("tj")%>&tactic=<%=request("tactic")%>>
<tr>
<td valign="bottom"> <%
if rs.recordcount<>0 then
if page-1 mod 10=0 then
p=(page-1) \ 10
else
p=(page-1) \ 10
end if
response.write " >>分页:"
if p*10>0 then response.write "<a href='?key="&request("key")&"&clid="&request("clid")&"&claid="&request("claid")&"&fw="&request("fw")&"&tj="&request("tj")&"&tactic="&request("tactic")&"&page="&p*10&"' title=上十页>[<<]</a> "
uming_i=1
for ii=p*10+1 to P*10+10
if ii=page then
response.write "<font color=#ff0000>["+Cstr(ii)+"]</font> "
else
response.write "<a href='?key="&request("key")&"&clid="&request("clid")&"&claid="&request("claid")&"&fw="&request("fw")&"&tj="&request("tj")&"&tactic="&request("tactic")&"&page="&ii&"'>["+Cstr(ii)+"]</a> "
end if
if ii=rs.pagecount then exit for
uming_i=uming_i+1
next
if ii<=rs.pagecount and uming_i=11 then response.write "<a href='?key="&request("key")&"&clid="&request("clid")&"&claid="&request("claid")&"&fw="&request("fw")&"&tj="&request("tj")&"&tactic="&request("tactic")&"&page="&ii&"' title=下十页>[>>]</a> "
response.write(" 跳页:<input type=text name=page size=2 maxlength=3 class=textbox> <input type=submit name=Submit2 value=Go class=textbox-1>")
end if%> </td>
</tr>
</form>
</table></td>
</tr>
</table>
<!--#include file="footer.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -