<LINK href="images/newhead.css" type=text/css rel=stylesheet>
<style type=text/css>
.pic1{MARGIN-TOP: -117px;MARGIN-left:0px}
.pic3{MARGIN-TOP: -90px;MARGIN-left:0px}
.pic2{padding-top:6px}
</style>

<%
if mosi="0" then
call xinpin()
call midbanner()
call tuijian()
elseif mosi="1" then
call tuijian()
call midbanner()
call xinpin()
elseif mosi="2" then
call xinpin()
call midbanner()
elseif mosi="3" then
call tuijian()
call midbanner()
end if

sub xinpin()
response.write "<table border=0 cellpadding=0 cellspacing=0 width=588 style='word-break:break-all'>"
response.write "<tr><td><a href=class.asp?action=new><img width=588 src=images/title1.gif border=0 alt='浏览全部新商品'></a></td></tr>"
response.write "</table>"

response.write "<table border=0 cellpadding=2 bgcolor='#FFFFFF' cellspacing=0 width=588>"
set rs=conn.execute("select  * from bproduc where online=true order by AddDate desc")
if rs.bof and rs.eof then
response.write "<tr><td height=150 align=center>暂时没有商品</td></tr>"
else
   k=1
   Do While Not rs.eof
	response.write "<tr>"
    for i=1 to 4
	k=k+1
%>
<td align='center' valign='top' class='yc' width='140'>

<table width=100% border=0 cellspacing=0 cellpadding=1 valign=middle align=center>
<tr><td align="center" valign="middle"><a href='list.asp?ProdId=<%=rs("ProdId")%>'>
<img  border=0 onload='DrawImage(this)' 
alt='<%=rs("ProdName")%>' 
src='<%=rs("ImgPrev")%>' style="border: 1px solid #FF0066"></a>
<p class="pic1">　</td></tr>
<tr>
<td align=center>
<table align=center>
        <tr>
          <td align=center><a href='list.asp?ProdId=<%=rs("ProdId")%>'><%=lleft(rs("ProdName"),18)%></a></td>
        </tr>
        <tr>
          <td align=center><%=rs("PriceOrigintext")%>￥<strike><%=FormatNum(rs("PriceOrigin"),2)%></strike></td>
        </tr>
        <tr>
          <td align=center><font color="#FF0000"><%=rs("PriceListtext")%>￥<%=FormatNum(rs("PriceList"),2)%></font></td>
        </tr>
        <tr>
          <td align=center><font color="#FF0000"><%=rs("zidingyi2")%>￥<%	if request.cookies("buyok")("userid")="" then 
	response.write "<font color=red>"&huiyuanjia&"</font><br>"
	else
	response.write "<font color=red>"&FormatNum(rs("PriceList")*checkuserkou()/10,2)&"</font><br>"
	end if
%>
            </font></td>
        </tr>
      </table>
</td>
</tr>
<%
	response.write "</table></td>"
	rs.movenext
	if k>prompt_num then exit do
	if rs.eof then exit do
   	next
	loop
	end if
	set rs=nothing
	response.write "<table border=0 cellpadding=0 cellspacing=0 width=588 style='word-break:break-all'></table>"
end sub

sub midbanner()
%>



  <% 
if rs_pay("xuanze3")=1 then
%>
<table><tr><td width="588" height="2"></td></tr></table>
  <TABLE cellSpacing=0 cellPadding=0 width=588 align=center bgColor=#ffffff 
border=0>
    <TBODY>
      <TR> <td width=8 align=right>
	<img border=0 width=8 height=80 src='images/kong.gif'>
	</td>

        <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
            <TBODY>
              <TR> 
                    <TD><table width="580" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor=#FFFFFF>
	<tr><td align=center><a href='<%=hf30url%>' title='<%=hf30tit%>' target=_blank>
	<img border=0 width=580 src='<%=hf30pic%>'></a>
	</td></tr>
</table></TD>
              </TR>
            </TBODY>
          </TABLE></TD>
      </TR>
    </TBODY>
  </TABLE>
  <% end if %>
  
    <% 
if rs_pay("xuanze3")=2 then
%>
<table><tr><td width="588" height="2"></td></tr></table>
  <TABLE cellSpacing=0 cellPadding=0 width=588 align=center bgColor=#ffffff 
border=0>
    <TBODY>
      <TR>  <td width=8 align=right>
	<img border=0 width=8 height=80 src='images/kong.gif'>
	</td>
        <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
            <TBODY>
              <TR> 
                    <TD><table width="580" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor=#FFFFFF>
	<tr><td align=center><a href='<%=hf31url%>' title='<%=hf31tit%>' target=_blank>
	<img border=0 width=290 src='<%=hf31pic%>'></a>
	</td><td align=center><a href='<%=hf32url%>' title='<%=hf32tit%>' target=_blank>
	<img border=0 width=290 src='<%=hf32pic%>'></a>
	</td></tr>
</table></TD>
              </TR>
            </TBODY>
          </TABLE></TD>
      </TR>
    </TBODY>
  </TABLE>
  <% end if %>

    <% 
if rs_pay("xuanze3")=3 then
%>
<table><tr><td width="588" height="2"></td></tr></table>
  <TABLE cellSpacing=0 cellPadding=0 width=588 align=center bgColor=#ffffff 
border=0>
    <TBODY>
      <TR>  <td width=8 align=right>
	<img border=0 width=8 height=80 src='images/kong.gif'>
	</td>
        <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
            <TBODY>
              <TR> 
                    <TD><table width="580" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor=#FFFFFF>
	<tr><td align=center><a href='<%=hf33url%>' title='<%=hf33tit%>' target=_blank>
	<img border=0 width=193 src='<%=hf33pic%>'></a>
	</td><td align=center><a href='<%=hf34url%>' title='<%=hf34tit%>' target=_blank>
	<img border=0 width=193 src='<%=hf34pic%>'></a>
	</td><td align=center><a href='<%=hf35url%>' title='<%=hf35tit%>' target=_blank>
	<img border=0 width=194 src='<%=hf35pic%>'></a>
	</td></tr>
</table></TD>
              </TR>
            </TBODY>
          </TABLE></TD>
      </TR>
    </TBODY>
  </TABLE>
  <% end if %>

    <% 
if rs_pay("xuanze3")=4 then
%>
<table><tr><td width="588" height="2"></td></tr></table>
  <TABLE cellSpacing=0 cellPadding=0 width=588 align=center bgColor=#ffffff 
border=0>
    <TBODY>
      <TR>  <td width=8 align=right>
	<img border=0 width=8 height=80 src='images/kong.gif'>
	</td>
        <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
            <TBODY>
              <TR> 
                    <TD><table width="580" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor=#FFFFFF>
	<tr><td align=center><a href='<%=hf36url%>' title='<%=hf36tit%>' target=_blank>
	<img border=0 width=145 src='<%=hf36pic%>'></a>
	</td><td align=center><a href='<%=hf37url%>' title='<%=hf37tit%>' target=_blank>
	<img border=0 width=145 src='<%=hf37pic%>'></a>
	</td><td align=center><a href='<%=hf38url%>' title='<%=hf38tit%>' target=_blank>
	<img border=0 width=145 src='<%=hf38pic%>'></a>
	</td><td align=center><a href='<%=hf39url%>' title='<%=hf39tit%>' target=_blank>
	<img border=0 width=145 src='<%=hf39pic%>'></a>
	</td></tr>
</table></TD>
              </TR>
            </TBODY>
          </TABLE></TD>
      </TR>
    </TBODY>
  </TABLE>
  <% end if %>


<%
end sub

sub tuijian()
response.write "<table border=0 cellpadding=0 cellspacing=0 width=588 style='word-break:break-all'>"
response.write "<tr><td><a href=class.asp?action=tuijian><img width=588 src=images/c_link.gif border=0 alt='浏览全部推荐商品'></a></td></tr></table>"
response.write "<table border=0 cellpadding=2 bgcolor='#FFFFFF' cellspacing=0 width=588>"
set rs=conn.execute("select  * from bproduc where online=true and Remark='1' order by Tjdate desc,AddDate desc")
if rs.bof and rs.eof then
response.write "<tr><td height=150 align=center>暂时没有推荐商品</td></tr>"
else
   k=1
   Do While Not rs.eof
	response.write "<tr>"
    for i=1 to 4
	k=k+1
%>
<td align='center' valign='top' class='yc' width='140'>

<table width=100% border=0 cellspacing=0 cellpadding=1 valign=middle align=center>
<tr><td align="center" valign="middle"><a href='list.asp?ProdId=<%=rs("ProdId")%>'>
<img  border=0 onload='DrawImage(this)' 
alt='<%=rs("ProdName")%>' 
src='<%=rs("ImgPrev")%>' style="border: 1px solid #FF0066"></a>
<p class="pic1">　</td></tr>
<tr>
<td align=center>
<table align=center>
            <tr>
              <td align=center><a href='list.asp?ProdId=<%=rs("ProdId")%>'><%=lleft(rs("ProdName"),18)%></a></td>
            </tr>
            <tr>
              <td align=center><%=rs("PriceOrigintext")%>￥<strike><%=FormatNum(rs("PriceOrigin"),2)%></strike></td>
            </tr>
            <tr>
              <td align=center><font color="#FF0000"><%=rs("PriceListtext")%>￥<%=FormatNum(rs("PriceList"),2)%></font></td>
            </tr>
            <tr>
              <td align=center><font color="#FF0000"><%=rs("zidingyi2")%>￥<%	if request.cookies("buyok")("userid")="" then 
	response.write "<font color=red>"&huiyuanjia&"</font><br>"
	else
	response.write "<font color=red>"&FormatNum(rs("PriceList")*checkuserkou()/10,2)&"</font><br>"
	end if
%>
                </font></td>
            </tr>
          </table>
</td>
</tr>
<%
	response.write "</table></td>"
	rs.movenext
	if k>newprod_num then exit do
	if rs.eof then exit do
   	next

	loop
	end if
	set rs=nothing
	response.write "<table><tr><td height='5'></td></tr></table>"
end sub
%>