<!--#include file="inc_top.asp" -->

<table width="762" bgcolor="#ffffff" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="table-zuoyou">
  <tr>
    <td width="100%" valign="top"> 
      <%
if Request("lbid")<>"" or Request("xlbid")<>"" then
key=trim(Request("key"))
key=Replace(key, "'", "''")
fw1=Request("fw1")
fw2=Request("fw2")
if fw1="" then
fw1="0"
end if
if fw2="" then
fw2="10000"
end if
lbid=Request("lbid")
xlbid=Request("xlbid")
tj=Request("tj")
fs=Request("fs")
else
Response.Write("请先选择产品分类！！")
Response.end
end if
Set rs=Server.CreateObject("ADODB.Recordset")
 add=" and lbid="&lbid&"  and xlbid="&xlbid&" "
sql="select top 299 * from chanpin where jg2 between "&fw1&" and "&fw2&" "&add&" and (mc like '%" & key & "%' or jp like '%" & key & "%' or js like '%" & key & "%' or cj like '%" & key & "%') and cang=0 order by "&tj&" "&fs&""
rs.open sql,conn,1,1 
if rs.eof then
          response.write "<br>非常抱谦，未找到符合您搜索关键字的信息。"
      end if%>
      <%
 rs.pagesize = 16
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%>
      <table width="98%" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td valign="middle" align="center" height="32">共有<font color=#ff0000><%=rs.RecordCount%></font>个产品，每页显示<%=RS.PageSize%>个，目前显示第<font color=#ff0000><%=page%></font>/<%=rs.pagecount%>页</td>
        </tr>
      </table>
      <table width="98%" align="center" cellpadding="5" cellspacing="0">
<tr>
<%
i=1
j=0
dim jg1,jg2,jgshang,shuqian,shuhou
do while not rs.eof and i<=rs.pagesize
jg1=rs("jg1")
jg2=rs("jg2")
if jg1<>0 then
jgshang=formatnumber(jg2/jg1,2)*100
shuqian=int(jgshang/10)
shuhou=jgshang mod 10
else
shuqian=0
shuhou=0
end if
%>
<td width="49%" height="200" valign="top">
     <table class="table-shang">
        <tr> 
          <td colspan="2" valign="middle"><img src="image/arrow01.gif" border="0"> 
            <a href=product.asp?id=<%=rs("id")%> target=_blank> 
            <%mc=rs("mc")
			If xz="mc" Then 
  mc=Replace(mc, key ,"<font color=#ff0000>"&key&"</font>")
  end if
  jg1=rs("jg1")
  jg2=rs("jg2")
  jg3=jg1-jg2
  response.write "<font color=#006600>"&mc&"</font>"%>
            </a></td>
        </tr>
        <tr> 
          <td width="130" height="100" align="center" valign="middle"><a href="product.asp?id=<%=rs("id")%>" onFocus="this.blur()" target=_blank><img src="user/image_cp/<%=rs("xt")%>" width="75" height="75" border="0"></a><P style="MARGIN-TOP: -30px" align=right><IMG height=36 src="image/zhekou/<%=shuqian%>d.gif" width=20><IMG height=38 src="image/zhekou/<%=shuhou%>z.gif" width=17></P></td>
          <td width="250" align="left">市场价：<s>￥<%=jg1%>元</s><br>
            会员价：<font color=red>￥<%=jg2%>元</font><br>
            您节省了：<%=jg3%>元<br>
            <a href="addcart.asp?cpid=<%=rs("id")%>"  target="_blank" onFocus="this.blur()"><img src="image/mycart.gif" width="90" height="20" border="0"></a> 
          </td>
        </tr>
        <tr> 
          <td colspan="2" valign="middle"> 
            <%jp=left(rs("jp"),80)
						If xz="jp" Then 
  jp=Replace(jp, key ,"<font color=#ff0000>"&key&"</font>")
  end if
  response.write jp%>
          </td></tr></table></td>
<%
i=i+1
j=j+1
if j=2 then
j=0
response.write "</tr><tr>"
end if
 rs.MoveNext                                              
 loop 
%>
</tr></table>
      <table width="98%" height="30" align="center" cellpadding="0" cellspacing="0">
        <form name=form method=post action=?key=<%=request("key")%>&lbid=<%=request("lbid")%>&xlbid=<%=request("xlbid")%>&fw1=<%=request("fw1")%>&fw2=<%=request("fw2")%>&tj=<%=request("tj")%>&fs=<%=request("fs")%>>
          <tr> 
            <td valign="middle" align="center" height="30"><%
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")&"&lbid="&request("lbid")&"&xlbid="&request("xlbid")&"&fw1="&request("fw1")&"&fw2="&request("fw2")&"&tj="&request("tj")&"&fs="&request("fs")&"&page="&p*10&"' title=上十页>[&lt;&lt;]</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")&"&lbid="&request("lbid")&"&xlbid="&request("xlbid")&"&fw1="&request("fw1")&"&fw2="&request("fw2")&"&tj="&request("tj")&"&fs="&request("fs")&"&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")&"&lbid="&request("lbid")&"&xlbid="&request("xlbid")&"&fw1="&request("fw1")&"&fw2="&request("fw2")&"&tj="&request("tj")&"&fs="&request("fs")&"&page="&ii&"' title=下十页>[&gt;&gt;]</a>   "
response.write(" 　跳页：<input type=text name=page size=2 maxlength=3 class=wenbenkuang> <input type=submit name=Submit2 value=Go class=go-wenbenkuang>")
end if
rs.close
set rs=nothing%> </td>
          </tr>
        </form>
      </table></td>
  </tr>
</table>
<!--#include file="inc_end.asp" -->
