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

Applet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=GBK" language="java" import="java.sql.*" errorPage="" %>
  2. <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#F5EFE7" style="border-collapse: collapse" bordercolor="#111111">
  3.                 <tr> 
  4.                   <td height="18"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="23">
  5.                       <tr> 
  6.                         <td align="center" height="4"> <img border="0" src="img/promo_list_top.gif" width="100%" height="4"></td>
  7.                       </tr>
  8.                       <tr> 
  9.                         <td align="center" height="19" bgcolor="#DBC2B0"> <b>商品分类</b></td>
  10.                       </tr>
  11.                     </table></td>
  12.                 </tr>
  13.                 <tr> 
  14.                   <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
  15.                       <tr> 
  16.                         <td> <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" height="16">
  17.                             <tr> 
  18.                               <td height="16" valign="top"> 
  19.                                 <%
  20. sql="select * from sort";
  21. rs=mdb.executeQuery(sql);
  22. if(!rs.next()){
  23. out.print("没有任何分类"); 
  24. }
  25. else 
  26. {
  27. rs.previous();
  28.   while(rs.next()) 
  29.    {
  30. %>
  31.                                 <table cellspacing=0 cellpadding=0 width=95% background="" 
  32.                   border=0>
  33.                                   <tbody>
  34.                                     <tr height=22> 
  35.                                       <td width=34 align="center"><img 
  36.                       src="img/dot.gif" width="15" height="15"></td>
  37.                                       <td width="124"><a href="sort.jsp?sort_id=<%=rs.getInt("sort_id")%>"><u><%=rs.getString("sort_name")%></u></a></td>
  38.                                     </tr>
  39.                                   </tbody>
  40.                                 </table>
  41.                                 <% 
  42.    }
  43. }
  44.  
  45. %>
  46.                               </td>
  47.                             </tr>
  48.                           </table></td>
  49.                       </tr>
  50.                     </table></td>
  51.                 </tr>
  52.               </table>