<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="fuction.asp" -->
<html>
<head>
<title><%=webname%>--商品排行</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onMouseOver="window.status='【<%=webname%>】<%=weburl%> 如果您喜欢本站,别忘了把本站介绍给您的好友哦！：）';return true">
<!--#include file="webtop.asp" -->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="1" bgcolor="C9C9C8"><img src="../images/block.gif" width="1" height="1"></td>
    <td> <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="100"><img src="images/block.gif" width="1" height="1"> <br><table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
              <tr> 
                <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
              </tr>
              <tr> 
                <td height="25" bgcolor="efefef"><strong>&nbsp;&nbsp;<img src="images/dot_03.gif" width="9" height="9" border="0"> 
                  </strong><b>销售排行</b></td>
              </tr>
              <tr> 
                <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
              </tr>
            </table>
            <br> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="table-xia">
              <tr> 
                <td height="27"> <div align="right"> 
                    <%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="select2" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" >
                      <option selected>--请选择商品分类--</option>
                      <option value=shoporder.asp?id=0>查讯总体排行</option>
                      <%do while not rs.eof%>
                      <option value="shoporder.asp?id=<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
                      <%rs.movenext
		loop
		end if
		rs.close
		set rs=nothing
		%>
                    </select>
                  </div></td>
              </tr>
            </table>
            <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1">
              <tr> 
                <td valign=bottom height="30">　</td>
                <td height="30">　</td>
                <td height="30"><b>销售排行榜</b></td>
                <td height="30">　</td>
                <td height="30"><b>热点商品排行榜</b></td>
              </tr>
              <tr valign="top"> 
                <td height="225" colspan="5" bgcolor="#FFFFFF"> 
                  <%
	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 shopid,shopzz,shopchuban,shopname,pingji,pingjizong,pingpai from shop_snsn order by chengjiaocount,sx desc",conn,1,1
	rs2.open "select top 20 shopid,shopzz,shopchuban,shopname,pingji,pingjizong,pingpai from shop_snsn order by liulancount desc",conn,1,1
	else
	'yaosxia
     if Not isChkInteger(anclassid) then
    %>
                  <script language=javascript>
		alert("参数错误！");
		window.close();
	</script>
                  <%
    response.end
     end if
	rs.open "select top 20 shopid,shopzz,shopchuban,shopname,pingji,pingjizong,pingpai from shop_snsn where anclassid="&anclassid&" order by chengjiaocount desc",conn,1,1
	rs2.open "select top 20 shopid,shopzz,shopchuban,shopname,pingji,pingjizong,pingpai from shop_snsn where anclassid="&anclassid&" order by liulancount desc",conn,1,1
	end if
	if rs.eof and rs.bof then
	response.write "<div align=center>目前还没有任何商品</div>"
	else
	dim i
	i=0
	%>
                  <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                    <tr bgcolor="#FFFFFF"> 
                      <td width="10%" height="105" valign="top"> 
                        <%do while not rs.eof
		 i=i+1%>
                        <table width="80%" height="70" border="0" align="center" cellpadding="3" cellspacing="3">
                          <tr> 
                            <td height="58"> <div align="center"><img src="images/paihang/top<%=i%>.gif"></div></td>
                          </tr>
                        </table>
                        <%
			  if i>=3 then exit do
			  rs.movenext
			  loop%>
                      </td>
                      <td width="44%" valign="top"> 
                        <%i=0
		  rs.movefirst
		  do while not rs.eof
		  i=i+1%>
                        <table width="99%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" class="table-xia">
                          <tr> 
                            <td height="21" bgcolor="#FFFFFF" style="padding-left:20px"> 
                              <table width="100%" height="17" border="0" cellpadding="0" cellspacing="0">
                                <tr> 
                                  <td width="56%"><a href="list.asp?id=<%=rs("shopid")%>" target=_blank>查看详细信息</a> 
                                    &nbsp; </td>
                                  <td width="44%" style="padding-left:20px"> 
                                    <%if rs("pingjizong")>0 and rs("pingji")>0 then
xx=rs("pingjizong")\rs("pingji")
else
xx=5
end if
response.write "<img src=images/pingji/"&xx&".gif alt=评论星级 align=top>"
%>
                                  </td>
                                </tr>
                              </table></td>
                          </tr>
                          <tr> 
                            <td height="22" bgcolor="#FFFFFF" style="padding-left:6px"> 
                              <%response.write "<a href=list.asp?id="&rs("shopid")&" target=_blank>"
					  if len(trim(rs("shopname")))>24 then
					  response.write left(trim(rs("shopname")),24)&"..."
					  else
					  response.write trim(rs("shopname"))
					  end if
					  response.write "</a>"					  
					  %>
                            </td>
                          </tr>
                          <tr> 
                            <td bgcolor="#FFFFFF" > <a href="gouwu.asp?id=<%=rs("shopid")%>&action=add"><img src="images//gm.gif" border="0"></a>&nbsp;&nbsp;<a href="shoucang.asp?id=<%=rs("shopid")%>&action=add"><img src="images//shc.gif" border="0"></a></td>
                          </tr>
                        </table>
                        <%
			if i=3 then exit do
			rs.movenext
			loop%>
                      </td>
                      <td width="40%" valign="top"> 
                        <%i=0
		  rs2.movefirst
		  do while not rs2.eof
		  i=i+1%>
                        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" class="table-xia">
                          <tr> 
                            <td height="21" bgcolor="#FFFFFF" style="padding-left:20px"> 
                              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                <tr> 
                                  <td width="57%"><a href="list.asp?id=<%=rs2("shopid")%>" target=_blank>查看详细信息</a> 
                                    &nbsp; </td>
                                  <td width="43%" style="padding-left:20px"> 
                                    <%if rs2("pingjizong")>0 and rs2("pingji")>0 then
xx=rs2("pingjizong")\rs2("pingji")
else
xx=5
end if
response.write "<img src=images/pingji/"&xx&".gif alt=评论星级 align=absbottom>"
%>
                                  </td>
                                </tr>
                              </table></td>
                          </tr>
                          <tr> 
                            <td height="22" bgcolor="#FFFFFF" style="padding-left:6px"> 
                              <%response.write "<a href=list.asp?id="&rs2("shopid")&" target=_blank>"
					  if len(trim(rs2("shopname")))>24 then
					  response.write left(trim(rs2("shopname")),24)&"..."
					  else
					  response.write trim(rs2("shopname"))
					  end if
					  response.write "</a>"					  
					  %>
                            </td>
                          </tr>
                          <tr> 
                            <td bgcolor="#FFFFFF" > <a href="gouwu.asp?id=<%=rs("shopid")%>&action=add"><img src="images//gm.gif" border="0"></a>&nbsp;&nbsp;<a href="shoucang.asp?id=<%=rs("shopid")%>&action=add"><img src="images//shc.gif" border="0"></a></td>
                          </tr>
                        </table>
                        <%if i>=3 then exit do
			rs2.movenext
			loop%>
                      </td>
                    </tr>
                  </table><br>
                  <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr bgcolor="#FFFFFF"> 
                      <td width="10%" height="58" valign="top"> 
                        <%if rs.recordcount>=4 then
			rs.absoluteposition=4
			i=3
			do while not rs.eof
		 
		 i=i+1%>
                        <table width="80%" height="51" border="0" cellpadding="3" cellspacing="2">
                          <tr> 
                            <td height="46"> <div align="center"><img src="images/paihang/top<%=i%>.gif"></div></td>
                          </tr>
                        </table>
                        <%
			  if i>=20 then exit do
			  rs.movenext
			  loop
			  end if%>
                      </td>
                      <td width="44%" valign="top"> 
                        <%i=4
			if rs.recordcount>=4 then
			rs.absoluteposition=4
		    do while not rs.eof
		  i=i+1%>
                        <table width=99% height="43" border=0 cellpadding=0 cellspacing=1 bgcolor="#CCCCCC" class="table-xia">
                          <tr> 
                            <td height="21" bgcolor="#FFFFFF" style="padding-left:20px"> 
                              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr> 
                                  <td width="59%" height="18"><a href="list.asp?id=<%=rs("shopid")%>" target=_blank>查看详细信息</a> 
                                    &nbsp; </td>
                                  <td width="43%" style="padding-left:20px"> 
                                    <%if rs("pingjizong")>0 and rs("pingji")>0 then
xx=rs("pingjizong")\rs("pingji")
else
xx=5
end if
response.write "<img src=images/pingji/"&xx&".gif alt=评论星级 align=top>"
%>
                                  </td>
                                </tr>
                              </table></td>
                          </tr>
                          <tr> 
                            <td height="22" bgcolor="#FFFFFF" style="padding-left:6px"> 
                              <%response.write "<a href=list.asp?id="&rs("shopid")&" target=_blank>"
					  if len(trim(rs("shopname")))>24 then
					  response.write left(trim(rs("shopname")),24)&"..."
					  else
					  response.write trim(rs("shopname"))
					  end if
					  response.write "</a>"					  
					  %>
                            </td>
                          </tr>
                        </table>
                        <%
			if i>20 then exit do
			rs.movenext
			loop
			end if%>
                      </td>
                      <td width="40%" valign="top"> 
                        <%i=4
			if rs2.recordcount>=4 then
		  rs2.absoluteposition=4
		  do while not rs2.eof
		  i=i+1%>
                        <table width=100% height="43" border=0 cellpadding=0 cellspacing=1 bgcolor="#CCCCCC" class="table-xia">
                          <tr> 
                            <td height="21" bgcolor="#FFFFFF" style="padding-left:20px"> 
                              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr> 
                                  <td width="59%" height="18"><a href="list.asp?id=<%=rs2("shopid")%>" target=_blank>查看详细信息</a> 
                                    &nbsp; </td>
                                  <td width="43%" style="padding-left:20px"> 
                                    <%if rs2("pingjizong")>0 and rs2("pingji")>0 then
xx=rs2("pingjizong")\rs2("pingji")
else
xx=5
end if
response.write "<img src=images/pingji/"&xx&".gif alt=评论星级 align=top>"
%>
                                  </td>
                                </tr>
                              </table></td>
                          </tr>
                          <tr> 
                            <td height="22" bgcolor="#FFFFFF" style="padding-left:6px"> 
                              <%response.write "<a href=list.asp?id="&rs2("shopid")&" target=_blank>"
					  if len(trim(rs2("shopname")))>24 then
					  response.write left(trim(rs2("shopname")),24)&"..."
					  else
					  response.write trim(rs2("shopname"))
					  end if
					  response.write "</a>"					  
					  %>
                            </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></td>
    <td width="1" bgcolor="C9C9C8"><img src="../images/block.gif" width="1" height="1"></td>
  </tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
