middle.jsp
上传用户:szlmxq
上传日期:2014-01-31
资源大小:740k
文件大小:4k
源码类别:

Applet

开发平台:

Java

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