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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8" %>
  2. <%@ page import="cn.js.fan.util.*"%>
  3. <%@ page import="com.redmoon.forum.message.*"%>
  4. <LINK href="../common.css" type=text/css rel=stylesheet>
  5. <jsp:useBean id="StrUtil" scope="page" class="cn.js.fan.util.StrUtil"/>
  6. <jsp:useBean id="privilege" scope="page" class="com.redmoon.forum.Privilege"/>
  7. <%
  8. String name = privilege.getUser(request);
  9. String receiver = ParamUtil.get(request, "receiver");
  10. %>
  11. <html>
  12. <head>
  13. <title>撰写消息</title>
  14. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  15. <script language=javascript>
  16. <!--
  17. function form1_onsubmit()
  18. {
  19. errmsg = "";
  20. if (form1.receiver.value=="")
  21. errmsg += "请填写接收者!n"
  22. if (form1.title.value=="")
  23. errmsg += "请填写标题!n"
  24. if (form1.content.value=="")
  25. errmsg += "请填写内容!n"
  26. if (errmsg!="")
  27. {
  28. alert(errmsg);
  29. return false;
  30. }
  31. }
  32. //-->
  33. </script>
  34. </head>
  35. <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  36. <%
  37. if (!privilege.isUserLogin(request))
  38. {%>
  39. <table width="320" border="0" cellspacing="0" cellpadding="0" align="center" class="9black">
  40.   <tr> 
  41.     <td><li>您的登录已过期,请重新登录,如果不是会员请先注册。</td>
  42.   </tr>
  43. </table>
  44. <%
  45. return;
  46. }%>
  47. <table width="320" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#99CCFF" class="9black" height="260">
  48.   <form name="form1" method="post" action="send_do.jsp" onSubmit="return form1_onsubmit()">
  49.   <tr> 
  50.     <td bgcolor="#CEE7FF" height="23">
  51.         <div align="center"> <b>撰 写 新 消 息</b>
  52. <%
  53. if (privilege.isMasterLogin(request)) {
  54. %>
  55. (<a href="send_group.jsp">群发</a>)
  56. <%
  57. }
  58. %>
  59. </div>
  60.     </td>
  61.   </tr>
  62.   <tr> 
  63.     <td bgcolor="#FFFFFF" height="50"> 
  64.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center">
  65.           <tr> 
  66.             <td width="75"> 
  67.               <div align="center"><a href="message.jsp?page=1"><img src="images/inboxpm.gif" width="40" height="40" border="0"></a></div>
  68.             </td>
  69.             <td width="75"> 
  70.               <div align="center"><a href="mysend.jsp"><img src="images/m_outbox.gif" width="40" height="40" border="0"></a></div>
  71.             </td>
  72.             <td width="75"> 
  73.               <div align="center"><img src="images/newpm.gif" width="40" height="40" border="0"></div>
  74.             </td>
  75.             <td width="75"> 
  76.               <div align="center"> <img src="images/m_delete.gif" width="40" height="40"></div>
  77.             </td>
  78.           </tr>
  79.         </table>
  80.     </td>
  81.   </tr>
  82.   <tr> 
  83.       <td bgcolor="#FFFFFF" height="152" valign="top">
  84.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center" class="9black" height="6">
  85.           <tr> 
  86.             <td></td>
  87.           </tr>
  88.         </table>
  89.         <table width="300" border="0" cellspacing="1" cellpadding="3" align="center" class="9black">
  90.           <tr> 
  91.             <td width="68" height="27"> 
  92.               <div align="center">接 收 者:</div>
  93.             </td>
  94.             <td width="217" height="27">
  95.               <input type="text" name="receiver" class="input1" size="20" maxlength="20" value="<%=receiver%>">
  96.   <input type="hidden" name="sender" value="<%=privilege.getUser(request)%>">
  97.               <input name="type" type="hidden" value="<%=MessageDb.TYPE_USER%>"></td>
  98.           </tr>
  99.           <tr> 
  100.             <td width="68" height="26"> 
  101.               <div align="center">消息标题:</div>
  102.             </td>
  103.             <td width="217" height="26">
  104.               <input type="text" name="title" class="input1" size="30" maxlength="30">
  105.             </td>
  106.           </tr>
  107.           <tr> 
  108.             <td width="68" height="26"> 
  109.               <div align="center">消息内容:</div>
  110.             </td>
  111.             <td width="217" height="26"> 
  112.               <textarea name="content" cols="28" rows="3"></textarea>
  113.             </td>
  114.           </tr>
  115.           <tr> 
  116.             <td colspan="2" height="26"> 
  117.               <div align="center">
  118.                 <input type="submit" name="Submit" value="发送消息" class="button1">
  119.                 &nbsp; 
  120.                 <input type="reset" name="Submit2" value="重写" class="button1">
  121.               </div>
  122.             </td>
  123.           </tr>
  124.         </table>
  125.         <table width="300" border="0" cellspacing="0" cellpadding="0" align="center" class="9black" height="6">
  126.           <tr> 
  127.             <td></td>
  128.           </tr>
  129.         </table>
  130.       </td>
  131.   </tr>
  132.   <tr> 
  133.     <td bgcolor="#CEE7FF" height="6"></td>
  134.   </tr></form>
  135. </table>
  136. </body>
  137. </html>