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

百货/超市行业

开发平台:

Java

  1. <%@ page contentType="text/html;charset=GBK" language="java" import="java.sql.*,java.util.*" errorPage="" %>
  2. <html>
  3. <%@ include file="top.jsp"%>
  4. <link href="css.css" rel="stylesheet" type="text/css">
  5.         <div align="center">
  6.           <center>
  7.         
  8.     <table width="760" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" >
  9.       <!--DWLayoutTable-->
  10.       <%
  11.   String str=request.getParameter("news_id");
  12.   if(str==""){str="1";}
  13.   int news_id=Cint(str);
  14.       sql="select * from news where news_id="+news_id;
  15.       rs=mdb.executeQuery(sql);
  16.       if (rs.next())
  17.       {%>
  18.       <tr> 
  19.         <td width="760"  height="25" valign="top" ><table width="100%" border="0" cellpadding="0" cellspacing="0">
  20.             <!--DWLayoutTable-->
  21.             <tr> 
  22.               <td width="760"  height="25" valign="top" ><div align="center"><A href="allnews.asp">新闻中心</A>>><%=rs.getString("news_title")%></div></td>
  23.             </tr>
  24.           </table></td>
  25.       </tr>
  26.       <tr> 
  27.         <td height="200" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
  28.             <!--DWLayoutTable-->
  29.             <tr> 
  30.               <td width="760" height="200" valign="top"><div align="center">日期:<%=rs.getDate("news_date")%></div>
  31.                 <div align="center"> 
  32.                   <div align="left"> 
  33.                     <pre><%=rs.getString("news_content")%></pre>
  34.                   </div>
  35.                 </div></td>
  36.             </tr>
  37.           </table></td>
  38.       </tr>
  39.     </table>
  40.           </center>
  41. </div>
  42.           <%}
  43.   else{
  44.   out.print("此新闻不存在或已经被删除!");
  45.   }
  46. %>
  47. <%@ include file="copy.jsp"%>
  48. </body>
  49. </html>