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

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">
  3.               <tr> 
  4.                 <td> </td>
  5.               </tr>
  6.               <tr> 
  7.                 <td align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="18">
  8.                     <tr> 
  9.                       <td align="center"> <img border="0" src="img/promo_list_top.gif" width="100%" height="4"></td>
  10.                     </tr>
  11.                     <tr> 
  12.                       <td align="center" height="20" bgcolor="#DBC2B0"> <b>站内公告</b></td>
  13.                     </tr>
  14.                     <tr> 
  15.                       <td bgcolor="#F5EFE7"> 
  16.                         <% 
  17.  int i=0;
  18. sql="select * from pub order by ID DESC";
  19. rs=mdb.executeQuery(sql);
  20. if(!rs.next())
  21.  {
  22.             %>
  23.                         <p style="margin:0 5; ">暂无公告<br>
  24.                           <%
  25.  }
  26. else{
  27.   rs.previous();
  28.   while(rs.next())
  29.   {
  30. i=i+1;
  31. %>
  32.                         <p style="margin:5; "><b><%=rs.getString("title")%></b><br>
  33.                           <%=rs.getString("msg")%> <br>
  34.                           <%=rs.getDate("date")%></p>
  35.                         <%
  36.    if(i>=3){
  37.    break;
  38.    } 
  39.   }
  40. }
  41. %>
  42.                       </td>
  43.                     </tr>
  44.                   </table></td>
  45.               </tr>
  46.               <tr> </table>