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

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%@ page import="com.vnex.intranet.communication.util.DeptEmpHandler" %>
  3. <%@ page import="java.util.Vector" %>
  4. <%@ page import="com.vnex.intranet.communication.message.value.MessageValueBean" %>
  5. <%@ page import="com.vnex.intranet.util.FieldUtil" %>
  6. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  7. <%@ taglib uri="/vnex_communication.tld" prefix="comm" %>
  8. <jsp:useBean id="mvb" scope="request" class="com.vnex.intranet.communication.message.value.MessageValueBean" />
  9. <jsp:useBean id="msgProxy" scope="application" class="com.vnex.intranet.communication.message.proxy.MessageProxyBean" />
  10. <jsp:useBean id="cu" scope="request" class="com.vnex.intranet.communication.util.CommunicationUtil" />
  11. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  12. <%
  13.     int msgId = Integer.parseInt(request.getParameter("msgId"));
  14.     mvb = msgProxy.getSentMessageDetail(msgId);
  15.     int[] ids = mvb.getReceiverIds();
  16.     String[] receivers = mvb.getReceivers();
  17.     if(request.getParameter("msgTitle") != null)
  18.        mvb.setMsgTitle(FieldUtil.filterQuotTag(request.getParameter("msgTitle")));
  19.     if(request.getParameter("msgBody") != null)
  20.        mvb.setMsgBody(request.getParameter("msgBody"));
  21.     String selfId = ""+BusinessName.getEmpId();
  22. %>
  23. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  24. <HTML>
  25. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  26. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  27. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_communicate.js"></script>
  28. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  29. <script language="JavaScript" src="/vnex/util/popSelect.js"></script>
  30. <script language="javascript" src="/vnex/util/strUtil.js"></script>
  31. <script language=JavaScript>
  32. function SelectAll(form)
  33. {
  34.   for (var i=0;i<form.elements.length;i++)
  35.   {
  36.     var e = form.elements[i];
  37.     if (e.name != 'C1')
  38.        e.checked = form.C1.checked;
  39.   }
  40. }
  41. function sendMsg(form)
  42. {
  43.   if(isCompleteData(form))
  44.   {
  45.      selectList(form.receiverArray);
  46.      deleteSelf(form.receiverArray, "<%=selfId%>");
  47.      if(form.receiverArray.options.length == 1 && form.receiverArray.options[0].value == "<%=selfId%>")
  48.      {
  49.         alert("你选择了给自己发消息,请选择其它的用户");
  50.         return;
  51.      }
  52.      form.action="/mainctrl/msg/sendMsgProcess?resend";
  53.      form.encoding="multipart/form-data";
  54.      form.submit();
  55.   }  
  56. }
  57. function deleteThisMsg(form)
  58. {
  59.    if(confirm("是否删除本消息?"))
  60.    {
  61.      form.action="/mainctrl/msg/deleteSentMsg?msgId="+<%=request.getParameter("msgId")%>;
  62.      form.submit();
  63.    }  
  64. }
  65. function isCompleteData(form)
  66. {
  67.    if(isEmpty(form.msgTitle.value))
  68.    {
  69.       alert("请输入发送消息的标题");
  70.       form.msgTitle.focus();
  71.       return false;
  72.    }
  73.    if(isInvalidateLen(form.msgTitle.value, 100))
  74.    {
  75.       alert("标题不能超过25个汉字或100个英文字符");
  76.       form.msgTitle.focus();
  77.       return false;
  78.    }
  79.    if(isInvalidateLen(form.msgBody.value, 1000))
  80.    {
  81.       alert("内容不能超过250个汉字或1000个英文字符");
  82.       form.msgBody.focus();
  83.       return false;
  84.    }
  85.    if(form.receiverArray.options.length == 0)
  86.    {
  87.       alert("请至少选择一个收件人");
  88.       return false;
  89.    }
  90.    return true;
  91. }
  92. function SelectAll(form)
  93. {
  94.   for (var i=0;i<form.elements.length;i++)
  95.   {
  96.     var e = form.elements[i];
  97.     if (e.name != 'C1')
  98.        e.checked = form.C1.checked;
  99.   }
  100. }
  101. </script>
  102. <DIV align=center>
  103. <form name="form1" method="post">
  104.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  105.     <TBODY> 
  106.       <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  107.       <TR> 
  108.         <TD colSpan=3 align="center" class="iframestyle" valign="top"><br>
  109.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  110.             <tr valign="top"> 
  111.               <td bgcolor="#fafafa" > 
  112.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  113.                   <tr valign="top" bgcolor="#cccccc"> 
  114.                     <td> 
  115.                       <table width="600" border="0" cellpadding="2" cellspacing="0">
  116.                         <tr bgcolor="#666666"> 
  117.                             <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>
  118.                             </td>
  119.                         </tr>
  120.                       </table>
  121.                     <table width="600" border="0" cellspacing="1" cellpadding="2">
  122.                        <tr bgcolor="#e0e0e0">
  123.                          <td width="15%"><strong>&nbsp;标题:</strong></td>
  124.                          <td><input type="text" name="msgTitle" class="text" value="<%=mvb.getMsgTitle()%>">&nbsp;*&nbsp;(注:带*为必填内容)
  125.                          </td>
  126.                        </tr>
  127.                        <tr bgcolor="fafafa">
  128.                          <td width="15%"><strong>&nbsp;内容:</strong></td>
  129.                          <td><textarea rows="5" name="msgBody" cols="59"><%=mvb.getMsgBody()%></textarea>
  130.                          </td>
  131.                        </tr>
  132.       <tr bgcolor="#e0e0e0">
  133.          <td width="26%"><strong>&nbsp;接收人:</strong></td>
  134.          <td>
  135.             <input type="hidden" name="updated" value="false">
  136.             <input type="hidden" name="tempHidden" value="">
  137.             <select size="7" name="receiverArray" multiple style="width:200px">
  138.               <%   if(ids != null)
  139.                    {
  140.                        for(int i=0;i<ids.length;i++)
  141.                        {
  142.                            out.println("<option value=""+ids[i]+"">"+receivers[i]+"</option>");
  143.                        }
  144.                    }
  145.               %>
  146.             </select>&nbsp;
  147.             <input type="button" name="Submit1" value="按部门选择" class="file" onClick="javascript:addList( receiverArray)" style="width:70px">
  148.             &nbsp;&nbsp;
  149.             <input type="button" name="Submit2" style="width:60px" value="分组选择" class="file" onClick="javascript:addGroupList(receiverArray )" >
  150.             &nbsp;&nbsp;
  151.             <input type="button" name="Submit2" value="删除" class="text" onclick="delAllSelOpts(receiverArray)">&nbsp;*
  152.          </td>
  153.        </tr>
  154.        <tr bgcolor="#fafafa">
  155.          <td width="26%"><strong>&nbsp;原附件:</strong></td>
  156.          <td>
  157.                             <table width="100%" border="0" cellspacing="1" cellpadding="2" class="title">
  158.             <comm:attachmentList msgId="<%=msgId%>" searchWhat="send">
  159.             <vnex:items>
  160.                 <tr bgcolor="<vnex:itemsColor />" align="center">
  161.                   <td><img src="/vnex/MacOS/addfile.gif" border="0">
  162.                       <a href="<comm:attachmentAttribute attribute="file_location"/>" target="_blank"><comm:attachmentAttribute attribute="file_name" /></a>
  163.                   </td>
  164.   <!--
  165.                   <td><input type="button" class="text" value="删除" name="b1" 
  166.                      onclick="location='/mainctrl/msg/removeAttachment?msgId=<comm:attachmentAttribute attribute="id"/>&fileId=<comm:attachmentAttribute attribute="file_id"/>'">
  167.                   </td>
  168.   -->
  169.                   <input type="hidden" name="fileLocations" value="<comm:attachmentAttribute attribute="fileNoUseEncode"/>">
  170.                 </tr>
  171.             </vnex:items>
  172.             </comm:attachmentList>
  173.             </table>      
  174.               </td>          
  175.        </tr>             
  176.        <tr bgcolor="#e0e0e0">
  177.          <td width="26%"><strong>&nbsp;新附件:</strong></td>
  178.          <td>
  179.              <input type="file" class="file" name="file1" size="24"><br>
  180.              <input type="file" class="file" name="file2" size="24"><br>
  181.              <input type="file" class="file" name="file3" size="24"><br>
  182.              <input type="file" class="file" name="file4" size="24"><br>
  183.              <input type="file" class="file" name="file5" size="24">
  184.           </td>
  185.        </tr>
  186.                        <tr bgcolor="#fafafa" height="30">
  187.                           <td colspan="2" align="center">&nbsp;
  188.           <input type="button" value="发送" name="B1" onClick="sendMsg(this.form)" class="text">
  189.           &nbsp;&nbsp;
  190.           <input type="reset" value="重置" name="B1" class="text">
  191.           &nbsp;&nbsp;
  192.           <input type="button" value="删除" name="B1" onClick="deleteThisMsg(this.form)" class="text">
  193.           &nbsp;&nbsp;
  194.           <input type="button" value="放弃" name="B1" class="text" onclick="location='/mainctrl/msg/sentHome'">
  195.       </td>
  196.    </tr>
  197.  </table>    
  198.                     </td>
  199.                   </tr>
  200.                 </table>
  201.               </td>
  202.             </tr>
  203.           </table>
  204.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  205.        </TD>
  206.      </TR>
  207.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  208.     </TBODY> 
  209.   </TABLE>
  210.     <BR>
  211.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  212. </form>
  213. </DIV>
  214. </BODY>
  215. </HTML>