approve.jsp
上传用户:junmaots
上传日期:2022-07-09
资源大小:2450k
文件大小:3k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@page contentType="text/html; charset=GBK" language="java" %>
  2. <%@page import="com.mycompany.news.service.NewsService"%>
  3. <%@page import="com.mycompany.news.dao.impl.*"%>
  4. <%@page import="com.mycompany.news.dto.*"%>
  5. <%@page import="java.text.SimpleDateFormat"%>
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  7. <html>
  8.  <head>
  9. <link href="./css/common.css" rel="stylesheet" type="text/css">
  10. <meta http-equiv="Content-Type" content="text/html; charset=gbk">
  11.    <title>新闻信息</title>
  12.  </head>
  13.  
  14. <%
  15. Long id=Long.valueOf(request.getParameter("id"));
  16. SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
  17. NewsService service = new NewsService();
  18. service.setNewsDAO(new NewsDAOImpl());
  19. News news = service.getByID(id.longValue());
  20. java.util.List attachments = service.getAttachments(id.longValue());
  21. %>
  22. <body leftmargin="40" bgcolor="#FAFAFA" background="./images/line.gif">
  23. <table  align="center"  border=0 width="90%" cellpadding=0 cellspacing=20 bgcolor=#EFEFEF>
  24. <TR>
  25.  <TD bgColor=#000000 height=1></TD>
  26. </TR>  
  27. <tr>
  28.  <td width="90%">
  29.   <table  width="100%" background="./images/left1.gif">
  30.     <tr>
  31.      <td align="center">
  32.  <font size='4'>
  33.  <b><%=news.getSubject()%>(访问次数 <%=service .getVisitCount(id.longValue())%>)</b>
  34.  </font>
  35.      </td>
  36.    </tr>
  37.   <tr>
  38.      <td align="right" >
  39.      <font size='3'>
  40.      <b>作者(<%=news.getAuthor()%>)-- <%=sdf.format(news.getShowTime())%></b>
  41.      </font>
  42.      </td>
  43.   </tr>
  44.   </table>
  45. </tr>
  46. <TR>
  47.  <TD bgColor=#000000 height=1 width="60%"></TD>
  48. </TR>    
  49. <tr>
  50.  <td colspan='4' align="left" bgColor="#CCCCCC">
  51.          <%=news.getContent()%>
  52. </td>
  53.  </tr>
  54. <%for(int i=0;i<attachments.size();i++){
  55. NewsAttachment attachment = (NewsAttachment )attachments.get(i);
  56. if(service.isImage(attachment)){
  57. %>
  58. <tr>
  59.  <td align="right"><%=attachment.getAttachmentName()%>
  60.  <a href="<%=request.getContextPath()%>/servlet/download?id=<%=attachment.getAttachmentId()%>">
  61.  <image border="0" width="200" height="100" src="<%=request.getContextPath()%>/servlet/download?id=<%=attachment.getAttachmentId()%>">
  62.  </a>
  63.  </td>
  64.  
  65. </tr>
  66. <%
  67. }
  68. %>
  69. <%}%>
  70. <%for(int i=0;i<attachments.size();i++){
  71. NewsAttachment attachment = (NewsAttachment )attachments.get(i);
  72. if(!service.isImage(attachment)){
  73. %>
  74. <tr>
  75.  <td align="right"><a href="<%=request.getContextPath()%>/servlet/download?id=<%=attachment.getAttachmentId()%>">附件:<%=attachment.getAttachmentName()%></a></td>
  76. </tr>
  77. <%
  78. }
  79. %>
  80. <%}%>
  81. <tr>
  82.  <td align="center">
  83.  审核结果:
  84.  <input type="radio" name="a">同意
  85.  <input type="radio" name="a">不同意
  86.  <input type='button' value='提交审核'>
  87.  </td>
  88. </tr>
  89. </table>
  90.  
  91. </body>
  92. </html>