<style type="text/css">
<!--
.STYLE2 {color: #FF0000}
.STYLE3 {color: #333333}
-->
</style>


<table width="200" border="0" align="center" cellpadding="1" cellspacing="1" background="<%=weburl%>images/skin<%=cssid%>/z02.jpg">
      <tr>
        <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td height="30" background="<%=weburl%>images/skin<%=cssid%>/z01.jpg"><div align="center"><span style="font-weight: bold; color: #000000">Top Sales</span></div></td>
            </tr>
            <tr>
              <td valign="middle"><table width="90%" height="132" border="0" align="center" cellpadding="0" cellspacing="0">
	<%
set rs555=server.CreateObject("adodb.recordset")
rs555.open "select mingcidate,mingci3,mingci4 from wygkcn_shop order by liulancount desc",conn,1,3
if not rs555.eof then
if datediff("d",rs555("mingcidate"),now())>=1 then
i=1
do while not rs555.eof	
rs555("mingci4")=rs555("mingci3")
rs555("mingci3")=i
rs555.update
i=i+1
rs555.movenext
loop
end if
end if

set rs55=server.CreateObject("adodb.recordset")
rs55.open "select mingcidate,mingci1,mingci2 from wygkcn_shop order by chengjiaocount desc",conn,1,3
if not rs55.eof then
if datediff("d",rs55("mingcidate"),now())>=1 then
i=1
do while not rs55.eof
rs55("mingci2")=rs55("mingci1")
rs55("mingci1")=i
rs55("mingcidate")=now()
rs55.update
i=i+1
rs55.movenext
loop
end if
end if
%>
		  
<%set rs5=server.CreateObject("adodb.recordset")
rs5.open "select top 5 shopid,shopname,shoppic,chengjiaocount,sftc,mingci1,mingci2,shichangjia,huiyuanjia from wygkcn_shop order by mingci1",conn,1,1
i=0
do while not rs5.eof%>
      <tr>
        <td width="43%" height="80" rowspan="2"><a href=<%=weburl%>list.asp?id=<%=rs5("shopid")%> <%if rs5("sftc")="" then%><%else%> target=<%=rs5("sftc")%><%end if%>>
          <%if rs5("shoppic")="" then 
	response.write "<a href="&weburl&"list.asp?id="&rs5("shopid")&" ><img src="&weburl&"img/emptyshop.gif width=85 height=85 border=0></a>"
	else
    response.write "<img src="&weburl&rs5("shoppic")&"  width=70 height=70 border=0>"
    end if%></a></td>
        <td height="22" colspan="2"><%response.write "<a href="&weburl&"list.asp?id="&rs5("shopid")&" title=此商品已成功销售"&rs5("chengjiaocount")&"次><font color="&flxshph&">"
				if len(trim(rs5("shopname")))>25 then
				response.write left(trim(rs5("shopname")),25)&""
				else
				response.write trim(rs5("shopname"))
				end if
				response.write "</font></a>"
				%></td>
        </tr>
      <tr>
        <td width="43%" height="22">Member Price:<%=hb%> <%=rs5("huiyuanjia")%></td>
        <td width="14%"><%if rs5("mingci1")<rs5("mingci2") then
response.Write("<font color='#ff0000'>↑</font>")
elseif rs5("mingci1")>rs5("mingci2") then
response.Write("<font color='green'>↓</font>")
else
response.Write("<font color='#000000'>…<font>")
end if%></td>
      </tr>
      <tr>
        <td colspan="3"><img src="<%=weburl%>images/xuxian.gif" width="163" height="1" /></td>
      </tr>
	  <%i=i+1
			  if i>=10 then exit do
			  rs5.movenext
			  loop
			  rs5.close
			  set rs5=nothing%>
    </table></td>
            </tr>
        </table></td>
      </tr>
    </table>
