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

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%@ page import="com.vnex.intranet.util.*" %>
  3. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  4. <%@ taglib uri="/vnex_communication.tld" prefix="comm" %>
  5. <jsp:useBean id="mvb" scope="request" class="com.vnex.intranet.communication.message.value.MessageValueBean" />
  6. <jsp:useBean id="msgProxy" scope="application" class="com.vnex.intranet.communication.message.proxy.MessageProxyBean" />
  7. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  8. <jsp:useBean id="cu" scope="request" class="com.vnex.intranet.communication.util.CommunicationUtil" />
  9. <%
  10.     int msgId = Integer.parseInt(request.getParameter("msgId"));
  11.     int empId = BusinessName.getEmpId();
  12.     mvb = msgProxy.getReceivedMessageDetail(msgId, empId);
  13.     String title = mvb.getMsgTitle();
  14.     String body = mvb.getMsgBody();
  15.     title = FieldUtil.filterScriptTag(title);
  16.     body = FieldUtil.keepStringFormat(FieldUtil.filterScriptTag(body));
  17.     mvb.setMsgTitle(title);
  18.     mvb.setMsgBody(body);
  19.     request.setAttribute("msgInfo", mvb);
  20.     if(mvb.getStatusId() == 0)
  21.        msgProxy.setReceivedMsgStatus(1, msgId, BusinessName.getEmpId());
  22.     boolean isDismission = false;
  23.     String disabled = "";
  24.     String dismissionDescription = "";
  25.     if(cu.isDismission(mvb.getSenderId()))
  26.     {
  27.       isDismission = true;
  28.       disabled = "disabled";
  29.       dismissionDescription = "&nbsp;&nbsp;[此员工已经离职,你无需再对此邮件进行回复!]";
  30.     }
  31. %>
  32. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  33. <HTML>
  34. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  35. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  36. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_communicate.js"></script>
  37. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  38. <DIV align=center>
  39. <script language=javascript src="/vnex/util/strUtil.js"></script>
  40. <script language=JavaScript>
  41.   function checkChar(str)
  42.   {
  43.     var i,j,strTemp;
  44.     strTemp=""<>/\'";
  45.     for (i=0;i<str.length;i++)
  46.     {
  47.       j=strTemp.indexOf(str.charAt(i));
  48.       if (j!=-1)
  49.       {
  50.         return false;
  51.       }
  52.     }
  53.     return true;
  54.   }
  55. function deleteThisMsg(form)
  56. {
  57.   if(confirm("是否删除本条消息?"))
  58.   {
  59.      form.action="/mainctrl/msg/deleteReceivedMsg";
  60.      form.submit();
  61.   }   
  62. }
  63. function replyThisMsg(form)
  64. {
  65.    if(isCompleteData(form))
  66.    {
  67.      form.action="/mainctrl/msg/replyMsg";
  68.      form.submit();
  69.    }  
  70. }
  71. function isCompleteData(form)
  72. {
  73.    if(form.msgBody.value.length > 0 && isInvalidateLen(form.msgBody.value, 1000))
  74.    {
  75.       alert("内容不能超过250个汉字或1000个英文字符");
  76.       form.msgBody.focus();
  77.       return false;
  78.    }
  79.    return true;
  80. }
  81. function doSearch(form)
  82. {
  83.   if(checkChar(form.s_text.value))
  84.   {
  85.     form.action="/mainctrl/msg/receivedHome?ss";
  86.     form.submit();
  87.   }  
  88.   else
  89.     alert("不要在查询条件中加入"<>/\'之类的字符");
  90. }
  91. </script>
  92. <form name="form1" method="post">
  93. <input type="hidden" name="msgId" value="<%=request.getParameter("msgId")%>">
  94. <input type="hidden" name="msgTitle" value="<%=mvb.getMsgTitle()%>" >
  95. <input type="hidden" name="senderId" value="<%=mvb.getSenderId()%>" >
  96.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  97.     <TBODY> 
  98.       <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  99.       <TR> 
  100.         <TD colSpan=3 align="center" class="iframestyle" valign="top"><br>
  101.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  102.             <tr valign="top"> 
  103.               <td bgcolor="#fafafa" > 
  104.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  105.                   <tr valign="top" bgcolor="#cccccc"> 
  106.                     <td> 
  107.                       <table width="600" border="0" cellpadding="2" cellspacing="0">
  108.                         <tr bgcolor="#666666"> 
  109.                             <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/receivedHome"><font color="#ffffff">消息板</font></a>&gt;&gt;接收信息详细内容</font>
  110.                             </td>
  111.                         </tr>
  112.                       </table>
  113.                       <table width="600" border="0" cellspacing="1" cellpadding="2">
  114.                            <tr bgcolor="#fafafa"> 
  115.                              <td width="20%"><strong>&nbsp;标题:</strong>
  116.                              </td>
  117.                              <td><%=mvb.getMsgTitle()%></td>
  118.                            </tr>
  119.                            <tr bgcolor="#e0e0e0"> 
  120.                              <td width="20%"><strong>&nbsp;发送人:</strong></td>
  121.                              <td><%=mvb.getSenderName()%></td>
  122.                            </tr>
  123.                            <tr bgcolor="#fafafa"> 
  124.                              <td width="20%"><strong>&nbsp;发送人部门:</strong></td>
  125.                              <td><%=mvb.getDept()%></td>
  126.                            </tr>
  127.                            <tr bgcolor="#e0e0e0"> 
  128.                              <td width="20%"><strong>&nbsp;发送时间:</strong></td>
  129.                              <td><%=TimeStamp.toString(TimeStamp.convertCalendarToTimestamp(mvb.getSendDate()))%></td>
  130.                            </tr>
  131.                            <tr bgcolor="#fafafa"> 
  132.                              <td width="20%"><strong>&nbsp;内容:</strong></td>
  133.                              <td><%=mvb.getMsgBody()%></td>
  134.                            </tr>
  135.                            <tr bgcolor="#e0e0e0">
  136.                              <td width="20%"><strong>&nbsp;附件:</strong></td>
  137.                              <td>
  138.                                 <table width="100%" class="title" cellpadding="2" cellspacing="1">
  139.                 <comm:attachmentList msgId="<%=msgId%>" empId="<%=empId%>" searchWhat="receive">
  140.                 <vnex:items>
  141.                 <tr bgcolor="<vnex:itemsColor />">
  142.                   <td>&nbsp;&nbsp;<img src="/vnex/MacOS/addfile.gif" border="0">
  143.                   <a href="<comm:attachmentAttribute attribute="file_location"/>" target="_blank"><comm:attachmentAttribute attribute="file_name" /></a></td>
  144.                 </tr>
  145.                 </vnex:items>
  146.                 </comm:attachmentList>
  147.             </table>      
  148.               </td>          
  149.        </tr>             
  150.                       </table>
  151.                       <table width="600" border="0" cellspacing="1" cellpadding="2">
  152.                            <tr>
  153.                               <td colspan="2"><strong>&nbsp;回复本消息</strong><%=dismissionDescription%></td>
  154.                            </tr>
  155.                            <tr bgcolor="#e0e0e0">
  156.                              <td width="20%"><strong>&nbsp;回复内容:</strong></td>
  157.                              <td><textarea rows="5" name="msgBody" cols="59" <%=disabled%>></textarea></td>
  158.                            </tr>
  159.                            <tr bgcolor="#fafafa" height="30">
  160.                              <td colspan="2" align="center">&nbsp;
  161. <%
  162.             if(!isDismission)
  163.             {   
  164. %>                                      
  165.           <input type="button" value="回复" name="B1" onClick="replyThisMsg(this.form)" class="text">
  166.           &nbsp;&nbsp;
  167. <%          }%>           
  168.           <input type="button" value="删除" name="B1" onClick="deleteThisMsg(this.form)" class="text">
  169.           &nbsp;&nbsp;
  170. <%
  171.             if(!isDismission)
  172.             {   
  173. %>                                      
  174.           <input type="reset" value="重置" name="B1" class="text">
  175.           &nbsp;&nbsp;
  176. <%          }%>           
  177.           <input type="button" value="放弃" name="B1" class="text" onclick="location='/mainctrl/msg/receivedHome'">
  178.          </td>
  179.        </tr>   
  180.                       </table>
  181.                     </td>
  182.                   </tr>
  183.                 </table>
  184.               </td>
  185.             </tr>
  186.           </table>
  187.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  188.        </TD>
  189.      </TR>
  190.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  191.     </TBODY> 
  192.   </TABLE>
  193.     <BR>
  194.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  195. </form>
  196. </DIV>
  197. </BODY>
  198. </HTML>