<META http-equiv=Content-Type content="text/html; charset=gb2312">
<%	
		  rs.open "select top 4 id,name,pic,price1,price2,viewnum,stock from product where stock >= 0 order by viewnum desc",conn,1,1
		  if rs.eof and rs.bof then
		   rs.close
		  response.write "<table CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=""100%""><tr><td align=center>对不起，请您先到后台添加商品！</td></tr></table>"
		  else
%> 
            <TABLE cellSpacing=0 cellPadding=0 width=564 align=center border=0>
              <TBODY>
				<tr><td colSpan=4 height=30><img src="images/hot.gif" border="0" usemap="#Maphot"></td></tr>
              <TR>
			  <% dim k
			 k=0
			  do while not rs.eof %>
                <TD width=140 border="0" align=center>
                  <TABLE cellSpacing=0 cellPadding=0 width="140" border=0>
                  <TBODY>
				  <tr><td height="140" width="140" colspan="2" align="center" background="images/136.jpg"> 
				  <A  HREF=product.asp?id=<%=rs("id")%> TARGET=_blank>
				  <IMG SRC=<%if trim(rs("pic"))="" then %>
				  images/emptybook.gif
				  <% else %>
				  <% = trim(rs("pic")) %>
				  <% end if%> BORDER=0 width="<% = webimg9 %>" height="<% = webimg10 %>" alt="该商品被浏览<% = rs("viewnum") %>次"></A></td></tr>
                    <TR> 
                      <TD colSpan=2>&nbsp;<FONT COLOR=#FF6600><%=trim(rs("name"))%></FONT></TD>
                    </TR>
                    <TR height=20> 
                      <TD width="40%" align=right>市场价：</TD>
                      <TD width="60%"><%=trim(rs("price1"))%>&nbsp;元</TD>
                    </TR>
                    <TR height=20> 
                      <TD align=right>会员价：</TD>
                      <TD><FONT COLOR=#FF6600><%=trim(rs("price2"))%></FONT>&nbsp;元</TD>
                    </TR>
                    <TR height=20> 
                      <TD align=right>节　省：</TD>
                      <TD><%=FormatNumber(rs("price1")-rs("price2")) %>&nbsp;元</TD>
                    </TR>
                   <% if rs("stock") > 0 then %> <TR>
                      <TD align="center" colspan="2"><a href="check.asp?ProdId=<% = rs("id") %>" target="_blank"><img src=images/skin/default/addto.gif align=absmiddle border=0></a></TD>
                    </TR>
					<% else %>
					<tr><td colspan="2" align="center"><font color="#FF6600">暂时缺货</font></td></tr>
					<% end if %>
                  </TBODY>
                </TABLE></TD>
				<% rs.movenext 
					k=k+1
				if rs.eof then 
		  exit do
	  end if 
	  	if k>=4 then exit do
	  loop 
	  rs.close
	   %>
                </TR></TBODY></TABLE>
		<% end if %>
<map name="Maphot">
  <area shape="rect" coords="25,10,108,29" href="hot.asp" target="_blank" alt="关注排行">
  <area shape="rect" coords="490,11,536,27" href="hot.asp" target="_blank" alt="关注排行">
</map>
