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="java.sql.ResultSet"%>
  4. <%@ page import="cn.js.fan.util.*"%>
  5. <%@ page import="cn.js.fan.web.*"%>
  6. <%@ page import="java.sql.SQLException"%>
  7. <%@ page import="cn.js.fan.util.ErrMsgException"%>
  8. <%@ page import="com.redmoon.forum.message.*"%>
  9. <%@ taglib uri="/WEB-INF/tlds/LabelTag.tld" prefix="lt" %>
  10. <html>
  11. <head>
  12. <title><lt:Label res="res.label.message.message" key="showmsg"/></title>
  13. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  14. <LINK href="../common.css" type=text/css rel=stylesheet>
  15. </head>
  16. <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  17. <jsp:useBean id="StrUtil" scope="page" class="cn.js.fan.util.StrUtil"/>
  18. <jsp:useBean id="privilege" scope="page" class="com.redmoon.forum.Privilege"/>
  19. <%
  20. if (!privilege.isUserLogin(request))
  21. { %>
  22. <table width="320" border="0" cellspacing="0" cellpadding="0" align="center" class="9black">
  23.   <tr> 
  24.     <td><li><%=SkinUtil.LoadString(request,"res.label.message.message","msg")%></td>
  25.   </tr>
  26. </table>
  27. <% 
  28. return;
  29. } %>
  30. <jsp:useBean id="Msg" scope="page" class="com.redmoon.forum.message.MessageMgr"/>
  31. <%
  32. int id = ParamUtil.getInt(request, "id");
  33. MessageDb md = Msg.getMessageDb(id);
  34. String title,content,rq,receiver,sender;
  35. int type;
  36. boolean isreaded;
  37. id = md.getId();
  38. title = md.getTitle();
  39. content = md.getContent();
  40. type = md.getType();
  41. rq = DateUtil.format(md.getRq(), "yyyy-MM-dd HH:mm:ss");
  42. receiver = md.getReceiver();
  43. com.redmoon.forum.person.UserMgr um = new com.redmoon.forum.person.UserMgr();
  44. sender = md.getSender();
  45. if (!sender.equals(md.USER_SYSTEM))
  46. sender = um.getUser(sender).getNick();
  47. isreaded = md.isReaded();
  48. md.setReaded(true);
  49. md.save();
  50. %>
  51. <table width="320" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#99CCFF" class="9black" height="260">
  52.   <form name="form1" method="post" action="myreply.jsp?id=<%=id%>">
  53.   <tr> 
  54.     <td bgcolor="#CEE7FF" height="23">
  55.         <div align="center"> <b><lt:Label res="res.label.message.message" key="showmsg"/></b></div>
  56.     </td>
  57.   </tr>
  58.   <tr> 
  59.     <td bgcolor="#FFFFFF" height="50"> 
  60.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center">
  61.           <tr> 
  62.             <td width="75"> 
  63.               <div align="center"><a href="message.jsp?page=1"><img src="images/m_inbox.gif" width="40" height="40" border="0" alt="<lt:Label res="res.label.message.message" key="recever_mail"/>"></a></div>
  64.             </td>
  65.             <td width="75"> 
  66.               <div align="center"><a href="mysend.jsp"><img src="images/m_outbox.gif" alt="<lt:Label res="res.label.message.message" key="send_mail"/>" width="40" height="40" border="0"></a></div>
  67.             </td>
  68.             <td width="75"> 
  69.               <div align="center"><a href="send.jsp"><img src="images/newpm.gif" width="40" height="40" border="0" alt="<lt:Label res="res.label.message.message" key="write_mail"/>"></a></div>
  70.             </td>
  71.             <td width="75"> 
  72.               <div align="center"> 
  73.                 <img src="images/m_delete.gif" width="40" height="40" alt="<lt:Label res="res.label.message.message" key="del_mail"/>">
  74.               </div>
  75.             </td>
  76.           </tr>
  77.         </table>
  78.     </td>
  79.   </tr>
  80.   <tr> 
  81.       <td bgcolor="#FFFFFF" height="152" valign="top">
  82.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center" class="9black">
  83.           <tr> 
  84.             <td> 
  85.               <div align="center"><font color="#05006C"><b><%=title%></b></font></div>
  86.             </td>
  87.           </tr>
  88.           <tr>
  89.             <td align="center">
  90. <%=sender%> <%=rq%> <input type="hidden" name="title" value="<%="RE:"+title%>">
  91. <input name="receiver" value="<%=sender%>" type="hidden">
  92. </td>
  93.           </tr>
  94.         </table>
  95.         <hr size="1" width="300">
  96.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center" class="9black">
  97.           <tr> 
  98.             <td height="91" valign="top">
  99. <%
  100. String body = StrUtil.toHtml(content);
  101. %>
  102. <%=StrUtil.ubb(request, body, true)%>
  103. </td>
  104.           </tr>
  105.         </table>
  106.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center" class="9black">
  107.           <tr> 
  108.             <td> 
  109.               <div align="center">
  110.   <%if (md.getType()!=md.TYPE_SYSTEM) {%>
  111.                 <input type="submit" name="Button" value="<lt:Label res="res.label.message.message" key="myreply"/>" class="button1">
  112.   <%}%>
  113.               </div>
  114.             </td>
  115.           </tr>
  116.         </table>
  117.       </td>
  118.   </tr>
  119.   <tr> 
  120.     <td bgcolor="#CEE7FF" height="6"></td>
  121.   </tr></form>
  122. </table>
  123. </body>
  124. </html>