<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<html><head><title><%=webname%>--产品排行</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {font-weight: bold}
.style3 {font-size: 14pt}
.style4 {font-size: 14}
.style5 {font-size: 14px}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onMouseOver="window.status='【<%=webname%>】<%=weburl%> 如果您喜欢本站,别忘了把本站介绍给您的好友哦！：）';return true">
<!--#include file="top.asp"-->
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center" class="table-zuoyou" bordercolor="#CCCCCC">
<tr> 
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF"> 
<table class="table-shangxia" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30">　 
<%set rs=server.CreateObject("adodb.recordset")
	rs.open "select * from shop_anclass order by anclassidorder",conn,1,1
	if rs.eof and rs.bof then
	response.write "目前还没有分类"
	else%>
                  <select name="anclassid" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" > 
                    <option selected>==请选择产品分类==</option>
                    <option value=bookorder.asp?id=0>查讯总体排行</option>
                    <%do while not rs.eof%>
                    <option value="bookorder.asp?id=<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
                    <%rs.movenext
		loop
		end if
		rs.close
		set rs=nothing
		%>
                  </select> 
          </td>
        </tr>
          </table>
          
			<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
			<tr><td bgColor=#ffffff colSpan=2 height=1></TD></tr>
			<tr> 
			<td width=50% height=30 align=center>产品销售排行榜</td>
			<td width=50% height=30 align=center>热点产品排行榜</td>
			</tr>
			<tr valign=top> 
			<td height="200" colspan="5" bgcolor="#FFFFFF"> 
                <%dim anclassid,rs2,xx
	anclassid=request.QueryString("id")
	set rs=server.CreateObject("adodb.recordset")
	set rs2=server.CreateObject("adodb.recordset")
	if anclassid=0 or anclassid="" then
	rs.open "select top 20 bookid,bookzz,bookchuban,bookname,pingji,pingjizong,pingpai from shop_books where info=0 order by chengjiaocount desc",conn,1,1
	rs2.open "select top 20 bookid,bookzz,bookchuban,bookname,pingji,pingjizong,pingpai from shop_books where info=0 order by liulancount desc",conn,1,1
	else
	rs.open "select top 20 bookid,bookzz,bookchuban,bookname,pingji,pingjizong,pingpai from shop_books where info=0 and anclassid="&anclassid&" order by chengjiaocount desc",conn,1,1
	rs2.open "select top 20 bookid,bookzz,bookchuban,bookname,pingji,pingjizong,pingpai from shop_books where info=0 and anclassid="&anclassid&" order by liulancount desc",conn,1,1
	end if
	if rs.eof and rs.bof then
	response.write "<div align=center>目前还没有任何产品</div>"
	'response.End
	else
	dim i
	i=0
	%>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr><td width="50%" valign="top"> 
				<%i=0
			rs.movefirst
			do while not rs.eof
			i=i+1%>
                      <table width="100%" border="0" cellspacing="2" cellpadding="2">
                        <tr> 
                        <td valign="top"> 
                        <table class="table-xia" width="100%" border="0" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td > 
                              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td width="60%"><a href="list.asp?id=<%=rs("bookid")%>" ><font color="#999999">查看详细信息</font></a></td>
                                      <td width="40%" align="right"> 
                                        <%if rs("pingjizong")>0 and rs("pingji")>0 then
xx=rs("pingjizong")\rs("pingji")
else
xx=5
end if
response.write "<img src=images/level"&xx&".gif alt=评论星级 align=top>"
%>
                                      </td></tr></table>
									  </td></tr>
									  <tr><td><img src="images/ring01.gif">
							<%response.write "<a href=list.asp?id="&rs("bookid")&" >"
					  if len(trim(rs("bookname")))>27 then
					  response.write left(trim(rs("bookname")),25)&"..."
					  else
					  response.write trim(rs("bookname"))
					  end if
					  response.write "</a>"					  
					  %>
					  </td>
					  </tr><tr>
					  <td><a href="gouwu.asp?id=<%=rs("bookid")%>&action=add"target="_blank"><img src="images/buy.gif" border=0></a>　<a href="shoucang.asp?id=<%=rs("bookid")%>&action=add" target="_blank"><img src="images/aad.gif" border=0></a></td>
					  </tr>
					  </table>
					  </td>
					  </tr>
					  </table>
                      <%
			if i=3 then exit do
			rs.movenext
			loop%>
                    </td>
                    <td class="table-zuo" width="50%" valign="top"> 
                      <%i=0
		  rs2.movefirst
		  do while not rs2.eof
		  i=i+1%>
                      <table width="100%" border="0" cellspacing="2" cellpadding="2">
                        <tr> 
                          <td valign="top">
						  <table class="table-xia" width="100%" border="0" cellpadding="0" cellspacing="0">
                          <tr> 
                            <td> 
                              <table width="100%" border="0" cellspacing="0" cellpadding="0">
							  <tr>
							  <td width="60%"><a href="list.asp?id=<%=rs2("bookid")%>" ><font color="#999999">查看详细信息</font></a>
							  </td>
							  <td width="40%" align="right"> 
							<%if rs2("pingjizong")>0 and rs2("pingji")>0 then
xx=rs2("pingjizong")\rs2("pingji")
else
xx=5
end if
response.write "<img src=images/level"&xx&".gif alt=评论星级 align=absbottom>"
%>
							</td></tr></table>
                            </td></tr>
							<tr><td><img src="images/ring01.gif">
                              <%response.write "<a href=list.asp?id="&rs2("bookid")&" >"
					  if len(trim(rs2("bookname")))>27 then
					  response.write left(trim(rs2("bookname")),25)&"..."
					  else
					  response.write trim(rs2("bookname"))
					  end if
					  response.write "</a>"					  
					  %>
					  </td>
					  </tr><tr>
					  <td><a href="gouwu.asp?id=<%=rs("bookid")%>&action=add" target="_blank"><img src="images/buy.gif" border=0></a>　<a href="shoucang.asp?id=<%=rs("bookid")%>&action=add" target="_blank"><img src="images/aad.gif" border=0></a></td>
					  </tr>
					  </table>
					  </td>
					  </tr>
					  </table>
                      <%if i>=3 then exit do
			rs2.movenext
			loop%>
                    </td>
                  </tr>
                </table>
                
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                    <td width="50%" valign="top"> 
                      <%i=4
			if rs.recordcount>=4 then
			rs.absoluteposition=4
		    do while not rs.eof
		  i=i+1%>
                      <table width="100%" border="0" cellspacing="2" cellpadding="2">
                        <tr>
						<td>
						<table class="table-xia" width="100%" border=0 cellpadding=0 cellspacing=0>
						<tr> 
						<td>
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
						<td width="60%"><a href="list.asp?id=<%=rs("bookid")%>" ><font color="#999999">查看详细信息</font></a>
						</td>
						<td width="40%" align="right"> 
                                        <%if rs("pingjizong")>0 and rs("pingji")>0 then
xx=rs("pingjizong")\rs("pingji")
else
xx=5
end if
response.write "<img src=images/level"&xx&".gif alt=评论星级 align=top>"
%>
						</td></tr></table>
						</td></tr>
						<tr><td><img src="images/ring01.gif">
                              <%response.write "<a href=list.asp?id="&rs("bookid")&" >"
					  if len(trim(rs("bookname")))>27 then
					  response.write left(trim(rs("bookname")),25)&"..."
					  else
					  response.write trim(rs("bookname"))
					  end if
					  response.write "</a>"					  
					  %>
                      </td></tr></table>
                      </td></tr></table>
                      <%
			if i>20 then exit do
			rs.movenext
			loop
			end if%>
                    </td>
                    <td class="table-zuo" width="50%" valign="top"> 
                      <%i=4
			if rs2.recordcount>=4 then
		  rs2.absoluteposition=4
		  do while not rs2.eof
		  i=i+1%>
                      <table width="100%" border="0" cellspacing="2" cellpadding="2">
                        <tr>
						<td>
						<table class="table-xia" width="100%" border=0 cellpadding=0 cellspacing=0>
						<tr>
						<td>
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							  <tr>
							  <td width="60%"><a href="list.asp?id=<%=rs2("bookid")%>" ><font color="#999999">查看详细信息</font></a>
							  </td>
							  <td align="right"> 
                                        <%if rs2("pingjizong")>0 and rs2("pingji")>0 then
xx=rs2("pingjizong")\rs2("pingji")
else
xx=5
end if
response.write "<img src=images/level"&xx&".gif alt=评论星级 align=top>"
%>
							</td></tr></table>
							</td></tr>
							<tr><td><img src="images/ring01.gif">
                              <%response.write "<a href=list.asp?id="&rs2("bookid")&" >"
					  if len(trim(rs2("bookname")))>27 then
					  response.write left(trim(rs2("bookname")),25)&"..."
					  else
					  response.write trim(rs2("bookname"))
					  end if
					  response.write "</a>"					  
					  %>
                      </td></tr></table>
                      </td></tr></table>
                      <%if i>20 then exit do
			rs2.movenext
			loop
			end if
			rs.close
			rs2.close
			set rs=nothing
			set rs2=nothing
			%>
</td>
</tr>
</table>
<%end if%>
</td>
</tr>
</table>
</td>
</tr>
</table>

<!--#include file="copyright.asp"-->
</body>
</html>