<!--#include file="inc_top.asp" -->
<!--#include file="conn/inc_banner.asp" -->
<table width="762" bgcolor="#ffffff" align="center" cellpadding="0" cellspacing="0" class="pian">
<%
If Request("Page")=Empty Then
  Page=1
Else
  Page=cint(Request("Page"))
End If
key=nohack(Request("key"))
If Request("lbid")=Empty Then
  lbid=0
Else
  lbid=cint(Request("lbid"))
End If
Set rs=Server.CreateObject("ADODB.Recordset")
if lbid=0 then
sql="select * from chanpin where cang=0 and (mc like '%" & key & "%' or jp like '%" & key & "%' or js like '%" & key & "%' or cj like '%" & key & "%') order by id desc"
else
sql="select * from chanpin where cang=0 and lbid="&lbid&" and (mc like '%" & key & "%' or jp like '%" & key & "%' or js like '%" & key & "%' or cj like '%" & key & "%') order by id desc"
end if
rs.open sql,conn,1,1 
if rs.eof then
response.write "<tr><td align=center height=300><br>非常抱谦，未找到符合您搜索关键字的信息。<br><br><a href=guestbook.asp><img src=image/quehuodj.gif border=0></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=index.asp><img src=image/quehuodj2.gif border=0></a></td></tr>"
rs.close
set rs=nothing
else
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%>
<tr>
<td height="0" valign="top">
      <table width="761" height="30" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="center" valign="middle" bgcolor="#FF9900"><span style="color: #FFFFFF">　　符合搜索关键字&quot;<%=key%>&quot;的，共有<%=rs.RecordCount%>笔资料，每页显示<%=RS.PageSize%>笔，目前显示第<%=page%>/<%=rs.pagecount%>页</span></td>
        </tr>
      </table>
      <table width="761" align="center" cellpadding="5" cellspacing="0">
        <%
i=1
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
%><tr bgcolor=#f9f9f9 onMouseOver=this.style.backgroundColor='#EDF6FF' onMouseOut=this.style.backgroundColor='#f9f9f9'>
          <td width="120" 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 valign="top"><a href=product.asp?id=<%=rs("id")%> target=_blank style="font-weight: bold"> 
            <%mc=rs("mc")
			If xz="mc" Then 
  mc=Replace(mc, key ,"<font color=#ff0000>"&key&"</font>")
  end if
  response.write mc%>
            </a><br>
            
            简评：
            <%jp=left(rs("jp"),100)
	If xz="jp" Then 
  jp=Replace(jp, key ,"<font color=#ff0000>"&key&"</font>")
  end if
  response.write jp%>            <br>市场价：<s>￥<%=jg1%>元</s>&nbsp; <font color=#ff0000>会员价：￥<%=jg2%>元</font>&nbsp;&nbsp;<a href="addcart.asp?cpid=<%=rs("id")%>"  target=blank onFocus="this.blur()">购买</a> 
          <a href="addfav.asp?cp_id=<%=rs("id")%>" target="_blank" onFocus="this.blur()">收藏</a></td>
	</tr>
        <%
i=i+1
 rs.MoveNext                                              
 loop 
%>
      </table>
    </td>
  </tr></table>
<% end if%>

<table width="760" height="30" align="center" cellpadding="0" cellspacing="0">
        <form name=form method=post action=>
          <tr> 
            <td valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <div align="center">
              <%
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")&"&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")&"&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")&"&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%> 
            </div></td>
          </tr>
        </form>
</table>
<table width="0" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<!--#include file="inc_end.asp" -->
