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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8" %>
  2. <%@ include file="../inc/nocache.jsp"%>
  3. <%@ page import="cn.js.fan.util.*"%>
  4. <%@ page import="java.util.*"%>
  5. <%@ page import="com.redmoon.oa.message.*"%>
  6. <html>
  7. <head>
  8. <title>查看消息</title>
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  10. <LINK href="../common.css" type=text/css rel=stylesheet>
  11. </head>
  12. <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  13. <jsp:useBean id="StrUtil" scope="page" class="cn.js.fan.util.StrUtil"/>
  14. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  15. <%
  16. if (!privilege.isUserLogin(request))
  17. { %>
  18. <table width="320" border="0" cellspacing="0" cellpadding="0" align="center" class="9black">
  19.   <tr> 
  20.     <td><li>您的登录已过期,请重新登录,如果不是会员请先注册。</td>
  21.   </tr>
  22. </table>
  23. <% } %>
  24. <jsp:useBean id="Msg" scope="page" class="com.redmoon.oa.message.MessageMgr"/>
  25. <%
  26. int id = ParamUtil.getInt(request, "id");
  27. MessageDb md = Msg.getMessageDb(id);
  28. if (md==null || !md.isLoaded()) {
  29. out.print(StrUtil.Alert_Redirect("该消息已不存在!", "message.jsp"));
  30. return;
  31. }
  32. String title,content,rq,receiver,sender;
  33. int type;
  34. boolean isreaded;
  35. id = md.getId();
  36. title = md.getTitle();
  37. content = md.getContent();
  38. type = md.getType();
  39. rq = md.getRq();
  40. receiver = md.getReceiver();
  41. sender = md.getSender();
  42. isreaded = md.isReaded();
  43. if (!md.isDraft()) {
  44. md.setReaded(true);
  45. md.save();
  46. }
  47. %>
  48. <table width="320" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#99CCFF" class="9black" height="260">
  49.   <form name="form1" method="post" action="myreply.jsp?id=<%=id%>">
  50.   <tr> 
  51.     <td bgcolor="#CEE7FF" height="23">
  52.         <div align="center"> <b>查 看 消 息</b></div>
  53.     </td>
  54.   </tr>
  55.   <tr> 
  56.     <td bgcolor="#FFFFFF" height="50"> 
  57.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center">
  58.           <tr> 
  59.             <td width="75"> 
  60.               <div align="center"><a href="message.jsp?page=1"><img src="images/inboxpm.gif" width="40" height="40" border="0"></a></div>
  61.             </td>
  62.             <td width="75"> 
  63.               <div align="center"><a href="listdraft.jsp"><img src="images/m_draftbox.gif" width="40" height="40" border="0"></a></div>
  64.             </td>
  65.             <td width="75"> 
  66.               <div align="center"><a href="send.jsp"><img src="images/newpm.gif" width="40" height="40" border="0"></a></div>
  67.             </td>
  68.             <td width="75"> 
  69.               <div align="center"> 
  70.                 <a href="delmsg.jsp?ids=<%=id%>"><img src="images/m_delete.gif" width="40" height="40" border="0"></a> </div>
  71.             </td>
  72.           </tr>
  73.         </table>
  74.     </td>
  75.   </tr>
  76.   <tr> 
  77.       <td bgcolor="#FFFFFF" height="152" valign="top">
  78.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center" class="9black">
  79.           <tr> 
  80.             <td> 
  81.               <div align="center"><font color="#05006C"><b><%=title%></b></font></div>
  82.             </td>
  83.           </tr>
  84.           <tr>
  85.             <td align="center">
  86. <%=sender%> <%=rq%> <input type="hidden" name="title" value="<%="RE:"+title%>">
  87. <input name="receiver" value="<%=sender%>" type="hidden"></td>
  88.           </tr>
  89.         </table>
  90.         <hr size="1" width="300">
  91.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center" class="9black">
  92.           <tr> 
  93.             <td height="91" valign="top">
  94. <%
  95. String body = content; // StrUtil.toHtml(content);
  96. %>
  97. <%=StrUtil.ubb(request, content, true)%>
  98. <br><br>
  99. <%
  100. Iterator ir = md.getAttachments().iterator();
  101. while (ir.hasNext()) {
  102. Attachment att = (Attachment)ir.next();
  103. %>
  104. <img src="../images/attach.gif" align="absmiddle" /> <a href="getfile.jsp?attachId=<%=att.getId()%>&msgId=<%=md.getId()%>" target="_blank"><%=att.getName()%></a>
  105. <BR>
  106. <%}%>
  107. </td>
  108.           </tr>
  109.         </table>
  110.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center" class="9black">
  111.           <tr> 
  112.             <td> 
  113.               <div align="center">
  114.   <%if (md.isDraft()) {%>
  115.                 <input type="button" name="Button" value="发送消息" class="button1" onClick="window.location.href='send_do.jsp?op=sendDraft&id=<%=md.getId()%>'">
  116.   <%}else{
  117.    if (type != MessageDb.TYPE_SYSTEM) {
  118.   %>
  119.                 <input type="submit" name="Button" value="回复消息" class="button1">
  120.   <%}
  121.   }%>
  122.               </div>
  123.             </td>
  124.           </tr>
  125.         </table>
  126.       </td>
  127.   </tr>
  128.   <tr> 
  129.     <td bgcolor="#CEE7FF" height="6"></td>
  130.   </tr></form>
  131. </table>
  132. </body>
  133. </html>