msg_send.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:7k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%@ page import="com.vnex.intranet.communication.util.DeptEmpHandler" %>
  3. <%@ page import="com.vnex.intranet.communication.message.value.MessageValueBean" %>
  4. <%@ page import="com.vnex.intranet.util.FieldUtil" %>
  5. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  6. <%
  7.     String msgTitle = "";
  8.     String msgBody = "";
  9.     if(request.getParameter("msgTitle") != null)
  10.        msgTitle = FieldUtil.filterQuotTag(request.getParameter("msgTitle"));
  11.     if(request.getParameter("msgBody") != null)
  12.        msgBody = request.getParameter("msgBody");
  13.     String selfId = ""+BusinessName.getEmpId();
  14. %>
  15. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  16. <HTML>
  17. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  18. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  19. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_communicate.js"></script>
  20. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  21. <script language="JavaScript" src="/vnex/util/popSelect.js"></script>
  22. <script language="javascript" src="/vnex/util/strUtil.js"></script>
  23. <script language=JavaScript>
  24. function sendMsg(form)
  25. {
  26.    if(isCompleteData(form))
  27.    {
  28.      selectList(form.receiverArray);
  29.      deleteSelf(form.receiverArray, "<%=selfId%>");
  30.      if(form.receiverArray.options.length == 1 && 
  31.         form.receiverArray.options[0].value == "<%=selfId%>")
  32.      {
  33.         alert("你选择了给自己发消息,请选择其它的用户");
  34.         return;
  35.      }
  36.      form.action="/mainctrl/msg/sendMsgProcess";
  37.      form.encoding="multipart/form-data";
  38.      form.submit();
  39.    }  
  40. }
  41. function isCompleteData(form)
  42. {
  43.    if(isEmpty(form.msgTitle.value) || isEmptyStr(form.msgTitle.value))
  44.    {
  45.       alert("请输入发送消息的标题");
  46.       form.msgTitle.focus();
  47.       return false;
  48.    }
  49.    if(isInvalidateLen(form.msgTitle.value, 100))
  50.    {
  51.       alert("标题不能超过25个汉字或100个英文字符");
  52.       form.msgTitle.focus();
  53.       return false;
  54.    }
  55.    if(isInvalidateLen(form.msgBody.value, 1000))
  56.    {
  57.       alert("内容不能超过250个汉字或1000个英文字符");
  58.       form.msgBody.focus();
  59.       return false;
  60.    }
  61.    if(form.receiverArray.options.length == 0)
  62.    {
  63.       alert("请至少选择一个收件人");
  64.       return false;
  65.    }
  66.    return true;
  67. }
  68. </script>
  69. <DIV align=center>
  70. <form name="form1" method="post">
  71.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  72.     <TBODY> 
  73.       <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  74.       <TR> 
  75.         <TD colSpan=3 align="center" class="iframestyle" valign="top"><br>
  76.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  77.             <tr valign="top"> 
  78.               <td bgcolor="#fafafa" > 
  79.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  80.                   <tr valign="top" bgcolor="#cccccc"> 
  81.                     <td> 
  82.                       <table width="600" border="0" cellpadding="2" cellspacing="0">
  83.                         <tr bgcolor="#666666"> 
  84.                             <td><font class="strongw"><a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>&gt;&gt;<a href="/mainctrl/communication/main"><font color="#ffffff">通信</font></a>&gt;&gt;<a href="/mainctrl/msg/sentHome"><font color="#ffffff">消息板</font></a>&gt;&gt;发送新信息</font>
  85.                             </td>
  86.                         </tr>
  87.                       </table>
  88.                       <table width="600" border="0" cellspacing="1" cellpadding="2">
  89.                        <tr bgcolor="#fafafa">
  90.                          <td width="15%"><strong>&nbsp;标题:</strong></td>
  91.                          <td><input type="text" name="msgTitle" class="text" value="<%=msgTitle%>">&nbsp;*&nbsp;(注:带*为必填内容)
  92.                          </td>
  93.                        </tr>
  94.                        <tr bgcolor="e0e0e0">
  95.                          <td width="15%"><strong>&nbsp;内容:</strong></td>
  96.                          <td><textarea rows="5" name="msgBody" cols="59"><%=msgBody%></textarea>
  97.                          </td>
  98.                        </tr>
  99.       <tr bgcolor="#fafafa">
  100.          <td width="26%"><strong>&nbsp;接收人:</strong></td>
  101.          <td>
  102.             <input type="hidden" name="updated" value="false">
  103.             <input type="hidden" name="tempHidden" value="">
  104.             <select size="7" name="receiverArray" multiple style="width:200px">
  105.             </select>&nbsp;
  106.             <input type="button" name="Submit1" value="按部门选择" class="file" onClick="javascript:addList( receiverArray)" style="width:70px">
  107.             &nbsp;&nbsp;
  108.             <input type="button" name="Submit2" style="width:60px" value="分组选择" class="file" onClick="javascript:addGroupList(receiverArray )" >
  109.             &nbsp;&nbsp;
  110.             <input type="button" name="Submit2" value="删除" class="text" onclick="delAllSelOpts(receiverArray)">&nbsp;*
  111.          </td>
  112.        </tr>
  113.        <tr bgcolor="#e0e0e0">
  114.           <td width="26%"><strong>&nbsp;附件:</strong></td>
  115.           <td>
  116.              <input type="file" class="file" name="file1" size="24"><br>
  117.              <input type="file" class="file" name="file2" size="24"><br>
  118.              <input type="file" class="file" name="file3" size="24"><br>
  119.              <input type="file" class="file" name="file4" size="24"><br>
  120.              <input type="file" class="file" name="file5" size="24">
  121.           </td>
  122.        </tr>
  123.                        <tr bgcolor="#fafafa" height="30">
  124.                           <td colspan="2" align="center">&nbsp;
  125.           <input type="button" value="发送" name="B1" onClick="sendMsg(this.form)" class="text">
  126.           &nbsp;&nbsp;
  127.           <input type="reset" value="重置" name="B1" class="text">
  128.           &nbsp;&nbsp;
  129.           <input type="button" value="放弃" name="B1" class="text" onclick="location='/mainctrl/msg/sentHome'">
  130.       </td>
  131.    </tr>
  132. </table>
  133.                     </td>
  134.                   </tr>
  135.                 </table>
  136.               </td>
  137.             </tr>
  138.           </table>
  139.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  140.        </TD>
  141.      </TR>
  142.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  143.     </TBODY> 
  144.   </TABLE>
  145.     <BR>
  146.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  147. </form>
  148. </DIV>
  149. </BODY>
  150. </HTML>