send_do.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.*"%>
  6. <%@ page import = "cn.js.fan.web.*"%>
  7. <%@ taglib uri="/WEB-INF/tlds/LabelTag.tld" prefix="lt" %>
  8. <html>
  9. <head>
  10. <title><lt:Label res="res.label.message.message" key="write_new_msg"/></title>
  11. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  12. <LINK href="../common.css" type=text/css rel=stylesheet>
  13. </head>
  14. <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  15. <jsp:useBean id="StrUtil" scope="page" class="cn.js.fan.util.StrUtil"/>
  16. <jsp:useBean id="privilege" scope="page" class="com.redmoon.forum.Privilege"/>
  17. <%
  18. if (!privilege.isUserLogin(request)) {
  19. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  20. return;
  21. }
  22. String name = privilege.getUser(request);
  23. String title,receiver,content,errmsg="";
  24. title = ParamUtil.get(request, "title");
  25. receiver = ParamUtil.get(request, "receiver");
  26. content = ParamUtil.get(request, "content");
  27. if(title.trim().length()==0||content.trim().length()==0)%><%
  28. errmsg += SkinUtil.LoadString(request,"res.label.message.message","title_content_can_not_null") + "\n";
  29. // if(name.equals(receiver))
  30. // errmsg += SkinUtil.LoadString(request,"res.label.message.message","do_not_send_to_yourself") + "\n";
  31. if(!errmsg.equals("")) {
  32. out.print(StrUtil.Alert_Back(errmsg));
  33. return;
  34. }
  35. %>
  36. <table width="320" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#99CCFF" class="9black" height="260">
  37.   <tr> 
  38.     <td bgcolor="#CEE7FF" height="23">
  39.         <div align="center"> <b><lt:Label res="res.label.message.message" key="write_new_msg"/></b></div>
  40.     </td>
  41.   </tr>
  42.   <tr> 
  43.     <td bgcolor="#FFFFFF" height="50"> 
  44.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center">
  45.           <tr> 
  46.             <td width="75"> 
  47.               <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>
  48.             </td>
  49.             <td width="75"> 
  50.               <div align="center"><a href="mysend.jsp"><img src="images/m_outbox.gif" width="40" height="40" border="0" alt="<lt:Label res="res.label.message.message" key="send_mail"/>"></a></div>
  51.             </td>
  52.             <td width="75"> 
  53.               <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>
  54.             </td>
  55.             <td width="75"> 
  56.               <div align="center"> <img src="images/m_delete.gif" width="40" height="40" alt="<lt:Label res="res.label.message.message" key="del_mail"/>"></div>
  57.             </td>
  58.           </tr>
  59.         </table>
  60.     </td>
  61.   </tr>
  62.   <tr> 
  63.       <td bgcolor="#FFFFFF" height="152" valign="top">
  64.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center" class="9black" height="6">
  65.           <tr> 
  66.             <td></td>
  67.           </tr>
  68.         </table>
  69.         <table width="300" border="0" cellspacing="1" cellpadding="3" align="center" class="9black">
  70.           <tr> 
  71.             
  72.           <td height="35"> <li>
  73. <jsp:useBean id="Msg" scope="page" class="com.redmoon.forum.message.MessageMgr"/>
  74. <%
  75. boolean isSuccess = false;
  76. try {
  77. isSuccess = Msg.AddMsg(request);
  78. }
  79. catch (ErrMsgException e) {
  80. out.println(StrUtil.Alert_Back(SkinUtil.LoadString(request,"info_operate_fail")+e.getMessage()));
  81. }
  82. %>
  83. <% if (isSuccess) { 
  84.   out.print(SkinUtil.LoadString(request,"info_op_success"));
  85. }
  86. %>
  87.   </td>
  88.           </tr>
  89.           <tr> 
  90.             <td height="35"> 
  91.               <div align="center"></div>
  92.             </td>
  93.           </tr>
  94.           <tr> 
  95.             <td height="35"> 
  96.               <div align="center"></div>
  97.             </td>
  98.           </tr>
  99.           <tr> 
  100.             <td height="35"> 
  101.               <div align="center"> </div>
  102.             </td>
  103.           </tr>
  104.         </table>
  105.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center" class="9black" height="6">
  106.           <tr> 
  107.             <td></td>
  108.           </tr>
  109.         </table>
  110.       </td>
  111.   </tr>
  112.   <tr> 
  113.     <td bgcolor="#CEE7FF" height="6"></td>
  114.   </tr>
  115. </table>
  116. </body>
  117. </html>