
<table width="345" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="50%"> 
      <%	 
		  rs.open "select top 1 id,name,pic,price1,price2,adddate,stock from product where stock >= 0 order by discount asc",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=100% border=0>
        <tbody> 
        <tr> 
          <td height="143" width=184 colspan="2" align="center"> <a  href=product.asp?id=<%=rs("id")%> target=_blank> 
            </a> 
            <table class="kuang" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td> 
                  <table border="0" cellspacing="2" cellpadding="2">
                    <tr> 
                      <td><a  href=product.asp?id=<%=rs("id")%> target=_blank><img  alt=上市日期<%=trim(rs("adddate"))%> src=<%if trim(rs("pic"))="" then %>
				  images/emptybook.gif
				  <% else %>
				  <% = trim(rs("pic")) %>
				  <% end if%> border=0 width="<% = webimg9 %>" height="<% = webimg10 %>"></a></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr align="center"> 
          <td colspan=2> 
            <% if len(trim(rs("name")))>19 then
				response.write left(trim(rs("name")),18)&"..."
				else
				response.write trim(rs("name"))
				end if
				response.write "</font></a>"
				%>
          </td>
        </tr>
        <% if rs("stock") > 0 then %>
        <tr align="center"> 
          <td colspan="2"><font color="#FF0000"><img 
                                src="img/good_price_sale.gif" 
                                align=absMiddle width="14" height="13">&nbsp;&nbsp;</font><s><%=formatnumber(rs("price1"),0)%></s> 
            → <img src="img/good_price.gif" 
                                align=absMiddle width="14" height="13">&nbsp;&nbsp;<font color=#FF6600><%=formatnumber(rs("price2"),0)&"元"%></font></td>
        </tr>
        <% else %>
        <tr> 
          <td colspan="2" align="center"><font color="#FF6600">暂时缺货</font></td>
        </tr>
        <% end if %>
        </tbody> 
      </table>
      <% end if 
		 rs.close
		%>
    </td>
    <td width="50%" valign="top"> 
      <table align="center" cellspacing=0 cellpadding=0 width=100% border=0>
        <tbody> 
        <tr> 
          <td valign=top> 
            <table cellspacing=0 cellpadding=0 width="100%" border=0>
              <tbody> 
              <%

			i=0
			rs.open "select top 10 id,discount,name from product where stock >= 0 order by discount asc",conn,1,1
			if rs.eof and rs.bof then
		   rs.close
			response.write "<br>目前没有特价商品"
			end if
			do while not rs.eof
			i=i+1
			%>
              <tr> 
                <td height="25"> 
                  <%
			if len(trim(rs("name")))>12 then
			response.write "<img src=image/dot3.gif><a href=product.asp?id="&rs("id")&" target=_blank>"&left(trim(rs("name")),11)&"..</a>&nbsp;<font size=1 color=#FF6600>"&rs("discount")*100&"%</font><br>"
			else
			response.write "<img src=image/dot3.gif><a href=product.asp?id="&rs("id")&" target=_blank>"&trim(rs("name"))&"</a>&nbsp;<font size=1 color=#FF6600>"&rs("discount")*100&"%</font><br>"
			end if 
			%>
                </td>
              </tr>
              <tr>
               <TD height="1" bgcolor="#F0F0F0"></TD>
              </tr>
              <%
			if i>=10 then exit do
			rs.movenext
			loop
			rs.close

			%>
              </tbody> 
            </table>
          </td>
        </tr>
        </tbody> 
      </table>
    </td>
  </tr>
</table>
