middle.jsp
上传用户:helenhuo66
上传日期:2007-06-01
资源大小:865k
文件大小:3k
源码类别:

百货/超市行业

开发平台:

Java

  1.     <table><tr><td height="118"> 
  2. <%
  3.  sql="select  * from logo  ";
  4.  rs=mdb.executeQuery(sql);
  5.  if(!rs.next())
  6.  {
  7.         
  8.    out.print("暂且没有广告");         
  9. }else{
  10. %>
  11.   <a href="<%=rs.getString("url")%>"target="_blank"><img src="<%=rs.getString("banner")%>" width="395" height="118" border="0"></a>
  12.                                 </p>
  13. <%
  14. }
  15. %>
  16. <!---产品显示-->
  17.  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="60">
  18.     <tr> 
  19.        <td colspan="2"> 
  20.           <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="151" id="AutoNumber1" height="20" background="img/fu.gif">
  21.                <tr>
  22.                     <td align="center" width="82"><b>精品推荐</b></td>
  23.                     <td align="center"> </td>
  24.                </tr>
  25.           </table>
  26.        </td>
  27.    </tr>
  28.    <tr> 
  29.        <td> 
  30.            <tr> 
  31. <%
  32. sql="select top 10 * from hw where tuijian=-1 order by hw_id DESC";
  33. rs=mdb.executeQuery(sql);
  34. if(!rs.next())
  35. {
  36.             %>
  37.                   <td width="128" valign="top" align="left" bgcolor="#FFFFFF"><div align="center">
  38.                         暂且没有推荐商品<br></div>
  39.                  </td>
  40.  <%
  41.  }
  42. i=0;
  43.  while(rs.next())
  44.  {
  45.    i=i+1;
  46. %>
  47.                 <td align="left" bgcolor="#FFFFFF"> 
  48.                       <table width="147" border="0" align="center" cellpadding="3" cellspacing="0">
  49.                           <tr> 
  50.                               <td valign="bottom" width="285"> 
  51.                                   <div align="center">
  52.                     <table width="200" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
  53.                       <tr> 
  54.                         <td valign="bottom" align="center">商品名称:<%=rs.getString("hw_name")%></td>
  55.                       </tr>
  56.                       <tr> 
  57.                         <td align="center"><a href="views.jsp?hw_id=<%=rs.getInt("hw_id")%>">
  58.                         <img border="0" src="<%=rs.getString("hw_pic")%>" width="114" height="83" vspace="6"></a></td>
  59.                       </tr>
  60.                       <tr> 
  61.                         <td align="center">会员价:<%=rs.getInt("hw_cash")%>元</td>
  62.                       </tr>
  63.                       <tr> 
  64.           
  65.                            <table width="100%" border="0" cellspacing="0" cellpadding="0" height="60">
  66.                        <tr> 
  67.                            <td colspan="2"> 
  68.                              <table border="0" cellpadding="0" cells          <td valign="top" align="center">
  69.                                       <a target="_blank" href="views.jsp?hw_id=<%=rs.getInt("hw_id")%>">详情</a> 
  70.                                       <a href='javascript:openbag(<%=rs.getInt("hw_id")%>)'>定购<img border="0" src="img/order.gif"></a></td>
  71.                                            </tr>
  72.                              </table>
  73.                                        </div>
  74.                                   </td>
  75.                             </tr>
  76.                             <tr> 
  77.                                     <td  height="1" width="285"></td>
  78.                             </tr>
  79.                     </table>
  80.           </td>
  81.           <%
  82. if(i%2==0&i>=2)
  83. {
  84. %>
  85.         </tr>
  86.         <tr> 
  87.           <%
  88.          }
  89. if(i>=10) {
  90.    break;
  91.    }
  92. }
  93. %>
  94.         </tr>
  95.       </table>
  96. <!- 产品显示结束-->
  97.     </td>
  98. </tr></table>