notice_show.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page language="java"  contentType="text/html;charset=gb2312" %>
  2. <%@ page import = "java.net.URLEncoder"%>
  3. <%@ page import = "java.sql.ResultSet"%>
  4. <%@ page import = "java.sql.SQLException"%>
  5. <%@ page import = "java.util.Properties"%>
  6. <HTML><HEAD><TITLE>查看通知</TITLE>
  7. <META http-equiv=Content-Type content="text/html; charset=gb2312">
  8. <link rel="stylesheet" href="../common.css" type="text/css">
  9. <META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
  10. <BODY text=#000000 bgColor=#ffffff >
  11. <table width="494" border="0" align="center" cellpadding="0" cellspacing="0">
  12.   <tr> 
  13.     <td height="23" valign="bottom" background="../images/tab-b-top.gif">     <span class="right-title">查 
  14.       看 通 知</span></td>
  15.   </tr>
  16.   <tr> 
  17.     <td height="255" align="center" valign="top" background="../images/tab-b-back.gif"> 
  18.       <jsp:useBean id="cfgparser" scope="page" class="fan.util.CFGParser"/>
  19.         <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  20.         <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  21.         <%
  22. String priv="admin";
  23. String priv1="notice_public";
  24. if (!privilege.isUserPrivValid(request,priv) && !privilege.isUserDepartmentPrivValid(request,priv1))
  25. {
  26. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  27. return;
  28. }
  29. String id = fchar.getNullString(request.getParameter("id"));
  30. if (id.equals(""))
  31. {
  32. out.print(fchar.makeErrMsg("缺少需求信息标识符!"));
  33. return;
  34. }
  35. %>
  36.         <jsp:useBean id="conn" scope="page" class="com.redmoon.oa.db.Conn"/>
  37.         <jsp:setProperty name="conn" property="POOLNAME" value="ttoa"/>
  38.         <%
  39. String title="",content="",mydate="",filename="",extname="",author="";
  40. int isdel = 0;
  41. String sql = "select title,content,mydate,filename,extname,author from notice where id="+id;
  42. ResultSet rs = null;
  43. try {
  44. rs = conn.executeQuery(sql);
  45. if (rs!=null && rs.next())
  46. {
  47. title = rs.getString("title");
  48. content = rs.getString("content");
  49. mydate = rs.getString("mydate").substring(0,10);
  50. filename = fchar.getNullStr(rs.getString("filename"));
  51. extname = rs.getString("extname");
  52. author = rs.getString("author");
  53. }
  54. }
  55. catch (SQLException e) {
  56. out.println(e.getMessage());
  57. }
  58. finally {
  59. if (rs!=null) {
  60. rs.close();
  61. rs = null;
  62. }
  63. if (conn!=null) {
  64. conn.close();
  65. conn = null;
  66. }
  67. }
  68. %>
  69.         <br>
  70.       <table width="90%" border="0" align="center" cellpadding="2" cellspacing="0">
  71.         <tr bgcolor="#C4DAFF"> 
  72.           <td width="19%" class="stable">发送者:</td>
  73.           <td width="81%" class="stable"><%=author%> </td>
  74.         </tr>
  75.         <tr bgcolor="#FFFFFF"> 
  76.           <td bgcolor="#eeeeee" class="stable">日&nbsp;&nbsp;&nbsp;&nbsp;期:</td>
  77.           <td class="stable"><%=mydate%></td>
  78.         </tr>
  79.         <tr bgcolor="#FFFFFF"> 
  80.           <td valign="top" bgcolor="#eeeeee" class="stable">附&nbsp;&nbsp;&nbsp;&nbsp;件:</td>
  81.           <td class="stable"> 
  82.             <%
  83. if (!filename.equals(""))
  84. {
  85. %> <a href="../getnoticefile.jsp?id=<%=id%>&filename=<%=filename%>&extname=<%=extname%>">附件(.<%=extname%>)</a> <%
  86. }
  87. else
  88. out.print("&nbsp;");
  89. %> </td>
  90.         </tr>
  91.         <tr bgcolor="#FFFFFF"> 
  92.           <td valign="top" bgcolor="#eeeeee" class="stable">内 &nbsp;&nbsp;&nbsp;容:</td>
  93.           <td class="stable"><%=content%> </td>
  94.         </tr>
  95.       </table></td>
  96.   </tr>
  97.   <tr> 
  98.     <td height="9"><img src="../images/tab-b-bot.gif" width="494" height="9"></td>
  99.   </tr>
  100. </table>
  101. </BODY>
  102. </HTML>