<!--#include file="inc_top.asp" -->
<!--#include file="conn/inc_banner.asp" -->
<!--搜索区域-->
<table width="762" bgcolor=#f7f7f7 border="0" align="center" cellpadding="0" cellspacing="0" class="pian">
    <TR><form method=post action=?lbid=<%=request("lbid")%>&xlbname=<%=request("xlbname")%>&xlbid=<%=request("xlbid")%>>
      <TD height=30 bgcolor="#FF9900">&nbsp;<font color="#FFFFFF">&nbsp;您的位置：</font><a href="index.asp"><font color="#FFFFFF">首页</a>&gt;&gt;</font> <a href="jetway.asp" target="_blank"><font color="#FFFFFF">全部分类</a>&gt;&gt;</font> <a href=lb.asp?lbid=<%=request("lbid")%> target=_blank>
	  <font color="#FFFFFF"><%set rs = conn.execute("select * from lb where lbid="&request("lbid")&"")
	  Response.Write(""&rs("lbname")&"")
	  rs.close%>
      </a>&gt;&gt; </font><a href=?lbid=<%=request("lbid")%>&xlbid=<%=request("xlbid")%>&xlbname=<%=request("xlbname")%> target=_blank><font color="#FFFFFF"><%=request("xlbname")%></a>&gt;&gt;</font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#FFFFFF">请选择排序方式：</font>
      <select class="wenbenkuang" name=sortby onChange="self.location=document.all.sortby.value">
	    <option value="?lbid=<%=request("lbid")%>&xlbid=<%=request("xlbid")%>&xlbname=<%=request("xlbname")%>" selected>按上架最新时间</option>
	    <option value="?lbid=<%=request("lbid")%>&xlbid=<%=request("xlbid")%>&xlbname=<%=request("xlbname")%>&sorttype=time">按上架最早时间</option>
	    <option value="?lbid=<%=request("lbid")%>&xlbid=<%=request("xlbid")%>&xlbname=<%=request("xlbname")%>&sorttype=renqi">按人气由高至低</option>
	    <option value="?lbid=<%=request("lbid")%>&xlbid=<%=request("xlbid")%>&xlbname=<%=request("xlbname")%>&sorttype=price">按价格由低至高</option>
	    <option value="?lbid=<%=request("lbid")%>&xlbid=<%=request("xlbid")%>&xlbname=<%=request("xlbname")%>&sorttype=dprice">按价格由高至低</option>
	    </select>
      </font></td>
    </form></tr>
<tr><td>

<%
orderby=request("sorttype")
select case orderby
	case "time"
	orderby="id"
	case "renqi"
	orderby="rq"
	case "price"
	orderby="jg2"
	case "dprice"
	orderby="jg2 DESC"
	case else
	orderby="id DESC"
end select

Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from chanpin where xlbid="&request("xlbid")&" and cang=0 order by "&orderby&""
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
i=1
dim jg1,jg2,jgshang,shuqian,shuhou
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
%> 
	<table width="761" cellpadding="5" cellspacing="0">
<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><strong><%=rs("mc")%></strong></a><br>
	      简评：<%js=trim(rs("jp"))
js = Replace(js,"<br>","")
response.write left(js,78)&"..."
%><br>
	  <font color=#000000>市场价：<s>￥<%=rs("jg1")%>元</s></font><font color=#ff0000>&nbsp; 会员价：￥<%=rs("jg2")%>元</font>&nbsp;&nbsp;<a href="addcart.asp?cpid=<%=rs("id")%>" target=blank onFocus="this.blur()">购卖</a>&nbsp;&nbsp;<a href="addfav.asp?cp_id=<%=rs("id")%>" target="_blank" onFocus="this.blur()">收藏</a></td>
	</tr>
	</table>


	</td>
	</tr>
	</table></TD>
  </TR>
</TABLE>
<table width="98%" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="bottom"><br>
  <%
i=i+1
rs.MoveNext                                              
wend 
%>
  <% 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 "<form name=form method=post action=?lbid="&request("lbid")&"&xlbname="&request("xlbname")&"&xlbid="&request("xlbid")&">页次："& page &"/"& rs.pagecount &"页 每页"& rs.pagesize &" 共"& rs.recordcount &"条记录"&_
					"分页："

	if p*10>0 then response.write "<a href='?lbid="&request("lbid")&"&xlbname="&request("xlbname")&"&xlbid="&request("xlbid")&"&sorttype="&request("sorttype")&"&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='?lbid="&request("lbid")&"&xlbname="&request("xlbname")&"&xlbid="&request("xlbid")&"&sorttype="&request("sorttype")&"&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='?lbid="&request("lbid")&"&xlbname="&request("xlbname")&"&xlbid="&request("xlbid")&"&sorttype="&request("sorttype")&"&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></form>")
end if%>
	</td>
  </tr>
</table>
<!--#include file="inc_end.asp"-->