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

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="java.sql.SQLException"%>
  5. <%@ page import = "cn.js.fan.util.ErrMsgException"%>
  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.forum.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. <%
  25. String name = privilege.getUser(request);
  26. String title,receiver,content,errmsg="";
  27. title = StrUtil.getNullString(request.getParameter("title"));
  28. receiver = StrUtil.getNullString(request.getParameter("receiver"));
  29. content = StrUtil.getNullString(request.getParameter("content"));
  30. if(title.trim().length()==0||content.trim().length()==0)
  31. errmsg += "标题和内容不能为空!n";
  32. if(name.equals(receiver))
  33.    errmsg += "请不要给自己发信息!n";
  34. if(!errmsg.equals(""))
  35. StrUtil.Alert_Back(errmsg);
  36. if (!privilege.isUserLogin(request))
  37. { %>
  38. <table width="320" border="0" cellspacing="0" cellpadding="0" align="center" class="9black">
  39.   <tr> 
  40.     <td><li>您的登录已过期,请重新登录,如果不是会员请先注册。</td>
  41.   </tr>
  42. </table>
  43. <% } %>
  44. <table width="320" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#99CCFF" class="9black" height="260">
  45.   <tr> 
  46.     <td bgcolor="#CEE7FF" height="23">
  47.         <div align="center"> <b>撰 写 新 消 息</b></div>
  48.     </td>
  49.   </tr>
  50.   <tr> 
  51.     <td bgcolor="#FFFFFF" height="50"> 
  52.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center">
  53.           <tr> 
  54.             <td width="75"> 
  55.               <div align="center"><a href="message.jsp?page=1"><img src="images/inboxpm.gif" width="40" height="40" border="0"></a></div>
  56.             </td>
  57.             <td width="75"> 
  58.               <div align="center"><a href="mysend.jsp"><img src="images/m_outbox.gif" width="40" height="40" border="0"></a></div>
  59.             </td>
  60.             <td width="75"> 
  61.               <div align="center"><a href="send.jsp"><img src="images/newpm.gif" width="40" height="40" border="0"></a></div>
  62.             </td>
  63.             <td width="75"> 
  64.               <div align="center"> <img src="images/m_delete.gif" width="40" height="40"></div>
  65.             </td>
  66.           </tr>
  67.         </table>
  68.     </td>
  69.   </tr>
  70.   <tr> 
  71.       <td bgcolor="#FFFFFF" height="152" valign="top">
  72.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center" class="9black" height="6">
  73.           <tr> 
  74.             <td></td>
  75.           </tr>
  76.         </table>
  77.         <table width="300" border="0" cellspacing="1" cellpadding="3" align="center" class="9black">
  78.           <tr> 
  79.             
  80.           <td height="35"> <li>
  81. <jsp:useBean id="Msg" scope="page" class="com.redmoon.forum.message.MessageMgr"/>
  82. <%
  83. boolean isSuccess = false;
  84. try {
  85. isSuccess = Msg.AddMsg(request);
  86. }
  87. catch (ErrMsgException e) {
  88. out.println(StrUtil.makeErrMsg("消息发送失败:"+e.getMessage()));
  89. }
  90. %>
  91.               <% if (isSuccess) { %>
  92.               消息回复成功! 
  93.               <% } %>
  94.           </td>
  95.           </tr>
  96.           <tr> 
  97.             <td height="35"> 
  98.               <div align="center"></div>
  99.             </td>
  100.           </tr>
  101.           <tr> 
  102.             <td height="35"> 
  103.               <div align="center"></div>
  104.             </td>
  105.           </tr>
  106.           <tr> 
  107.             <td height="35"> 
  108.               <div align="center"> </div>
  109.             </td>
  110.           </tr>
  111.         </table>
  112.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center" class="9black" height="6">
  113.           <tr> 
  114.             <td></td>
  115.           </tr>
  116.         </table>
  117.   </tr>
  118.   <tr> 
  119.     <td bgcolor="#CEE7FF" height="6"></td>
  120.   </tr>
  121. </table>
  122. </body>
  123. </html>