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

<table width="760" bgcolor="#ffffff" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="table-zuoyou">
  <tr>
    <td width="170" height="350" valign="top" class="table-you"> 
	<!--#include file="conn/logininc.asp" -->
	<!--#include file="conn/searchinc.asp" -->
	<!--#include file="conn/fenleiinc.asp" -->
    </td>
    <td width="590" valign="top">
    <!--#include file="conn/bannerinc.asp" -->
    <table width="100%" align="center" cellpadding="0" cellspacing="0" class="table-shang">
<%
If request("page")="" or isempty(request("page")) Then
  Page=1
Else
  Page=cint(Request("Page"))
End If
key=trim(Request("key"))
key=Replace(key, "'", "''")
userlb=trim(Request("userlb"))
fw1=Request("fw1")
fw2=Request("fw2")
if fw1="" then
fw1="0"
end if
if fw2="" then
fw2="10000"
end if
tj=Request("tj")
fs=Request("fs")

Set rs=Server.CreateObject("ADODB.Recordset")
if userlb="" then
sql="select * from chanpin where userid="&userid&" and jg2 between "&fw1&" and "&fw2&" and (mc like '%" & key & "%' or jp like '%" & key & "%' or js like '%" & key & "%' or cj like '%" & key & "%') and cang=0 order by "&tj&" "&fs&""
else
sql="select * from chanpin where userid="&userid&" and userlb='"&userlb&"' and jg2 between "&fw1&" and "&fw2&" and (mc like '%" & key & "%' or jp like '%" & key & "%' or js like '%" & key & "%' or cj like '%" & key & "%') and cang=0 order by "&tj&" "&fs&""
end if
rs.open sql,conn,1,1 
if rs.eof then
   response.write "<tr><td><br>&nbsp;&nbsp;非常抱谦，未找到符合您搜索关键字的信息。<br></td></tr><tr><td align=center height=60><a href=guestbook.asp?userid="&userid&"><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>"
end if
rs.pagesize = 8
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 valign="middle" height="30">&nbsp;&nbsp;所有<font color=#ff0000><%=userlb%></font>分类符合搜索关键字&quot;<font color=#ff0000><%=key%></font>&quot;的，共有<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" class="table-shang">
        <%
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> 
          <td width="120" height="100" align="center" valign="middle"><a href="xiangxi.asp?userid=<%=userid%>&id=<%=rs("id")%>" onFocus="this.blur()" target="_blank"><img src="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=xiangxi.asp?userid=<%=userid%>&id=<%=rs("id")%>  target="_blank"> 
            <%mc=rs("mc")
			If xz="mc" Then 
  mc=Replace(mc, key ,"<font color=#ff0000>"&key&"</font>")
  end if
  response.write mc%>
            </a><br>市场价：<s>￥<%=jg1%>元</s>&nbsp; <font color=#ff0000>会员价：￥<%=jg2%>元</font><br>简评：
            <%jp=left(rs("jp"),60)
	If xz="jp" Then 
  jp=Replace(jp, key ,"<font color=#ff0000>"&key&"</font>")
  end if
  response.write jp%>...
            <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="addcart.asp?userid=<%=userid%>&cpid=<%=rs("id")%>" target="_blank" onFocus="this.blur()"><img src="../image/buy_on.gif" width="65" height="20" border="0" alt="购买"></a> 
            <a href="huiyuan-2.asp?userid=<%=userid%>&cp_id=<%=rs("id")%>" onFocus="this.blur()" target="_blank"><img src="../image/aad.gif" width="65" height="20" border="0"  alt="收藏"></a> 
          </td>
        </tr><tr> 
          <td height="1" background="../image/1x3.gif" colspan="2"></td>
        </tr><%
i=i+1
 rs.MoveNext                                              
 loop 
%>
      </table>
      <table width="98%" height="30" align="center" cellpadding="0" cellspacing="0">
        <form name=form method=post action=?key=<%=request("key")%>&userid<%=userid%>&userlb=<%=userlb%>&fw1=<%=request("fw1")%>&fw2=<%=request("fw2")%>&tj=<%=request("tj")%>&fs=<%=request("fs")%>>
          <tr> 
            <td valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <%
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='?userid="&userid&"&key="&request("key")&"&userlb="&userlb&"&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='?userid="&userid&"&key="&request("key")&"&userlb="&userlb&"&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='?userid="&userid&"&key="&request("key")&"&userlb="&userlb&"&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  onkeydown=onlyNum();> <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="bd.asp" -->
