<!--#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="unnamed1">
    <TR><form method=post action=?> 
      <TD height=30>&nbsp;&nbsp;<font color=red>您的位置：</font><a href="index.asp">首页</a>&gt;&gt; <a href="jetway.asp" target="_blank">全部分类</a>&gt;&gt; <a href=lb.asp?lbid=<%=request("lbid")%> target=_blank> 
        <%set rs = conn.execute("select * from lb where lbid="&request("lbid")&"")
	  Response.Write(""&rs("lbname")&"")
	  rs.close%></a>&gt;&gt; <a href=?lbid=<%=request("lbid")%>&xlbid=<%=request("xlbid")%>&xlbname=<%=request("xlbname")%> target=_blank><%=request("xlbname")%></a>&gt;&gt; <a href=?lbid=<%=request("lbid")%>&xlbid=<%=request("xlbid")%>&xlbname=<%=request("xlbname")%>&slbname=<%=request("slbname")%> target=_blank><%=request("slbname")%></a>&gt;&gt; &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=red>排序：</font><select class="wenbenkuang" name=sortby onChange="self.location=document.all.sortby.value">
	<option value="?lbid=<%=request("lbid")%>&xlbname=<%=request("xlbname")%>&slbname=<%=request("slbname")%>&xlbid=<%=request("xlbid")%>" selected>按上架最新时间</option>
	<option value="?lbid=<%=request("lbid")%>&xlbname=<%=request("xlbname")%>&slbname=<%=request("slbname")%>&xlbid=<%=request("xlbid")%>&sorttype=time">按上架最早时间</option>
	<option value="?lbid=<%=request("lbid")%>&xlbname=<%=request("xlbname")%>&slbname=<%=request("slbname")%>&xlbid=<%=request("xlbid")%>&sorttype=renqi">按人气由高至低</option>
	<option value="?lbid=<%=request("lbid")%>&xlbname=<%=request("xlbname")%>&slbname=<%=request("slbname")%>&xlbid=<%=request("xlbid")%>&sorttype=price">按价格由低至高</option>
	<option value="?lbid=<%=request("lbid")%>&xlbname=<%=request("xlbname")%>&slbname=<%=request("slbname")%>&xlbid=<%=request("xlbid")%>&sorttype=dprice">按价格由高至低</option>
	</select>
</td></form></tr>
<tr><td>

        <table width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td width="10">&nbsp;</td>
            <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 slb like '%"&request("slbname")&"%' and 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="98%" cellpadding="5" cellspacing="0" class="table-shang">
	<tr> 
	<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><img src=image/ring02.gif border=0>&nbsp;<%=rs("mc")%></a><br>简评：<%js=trim(rs("jp"))
js = Replace(js,"<br>","")
response.write left(js,78)&"..."
%><br>&nbsp;&nbsp;<font color=#ff0000>市场价：<s>￥<%=rs("jg1")%>元</s>&nbsp; 会员价：￥<%=rs("jg2")%>元</font><br>&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><%
i=i+1
 rs.MoveNext                                              
 wend 
%>
              <table width="98%" cellpadding="0" cellspacing="0" class="table-shang">
                <tr>
                  <td align="center" valign="bottom"><br>
                    <%
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")&"&slbname="&request("slbname")&"&xlbid="&request("xlbid")&">页次："& page &"/"& rs.pagecount &"页 每页"& rs.pagesize &" 共"& rs.recordcount &"条记录"&_
					" <br>分页："

	if p*10>0 then response.write "<a href='?lbid="&request("lbid")&"&xlbname="&request("xlbname")&"&slbname="&request("slbname")&"&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")&"&slbname="&request("slbname")&"&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")&"&slbname="&request("slbname")&"&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
rs.close
set rs=nothing%>
                  </td>
                </tr>
              </table>
              
              
            </td>
          </tr>
        </table></TD>
    </TR>
</TABLE>
<!--#include file="inc_end.asp"-->