ShowMsg.jsp
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:8k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
  3. <jsp:include page="/CheckLogin1.jsp" flush="true"/> <% Session m_session = new Session(session); %>
  4. <%
  5. Request m_request = new Request(request);
  6. int iMsgID = m_request.GetInt("ID");
  7. int iUserID = m_session.GetInt("UserID");
  8. Vector vt = OnlineMessage.getRecordByID(iMsgID);
  9. if(vt.size()==1)
  10. {
  11.   int iRecieveUserID=Integer.parseInt(((Vector)vt.get(0)).get(5).toString());
  12.   int iSendUserID=Integer.parseInt(((Vector)vt.get(0)).get(4).toString());
  13.   int iMessageID = Integer.parseInt(((Vector)vt.get(0)).get(11).toString());
  14.   if(iRecieveUserID==iUserID || iSendUserID==iUserID)
  15.   {
  16.     if(iRecieveUserID == iUserID)  OnlineMessage.setReaded(iMsgID);
  17.     %>
  18. <html>
  19. <head>
  20. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  21. <title><%=((Vector)vt.get(0)).get(1).toString()%>-- GForce OA 2.0</title>
  22. <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  23. <script language="JavaScript" type="text/javascript">
  24. </script>
  25. <style type="text/css">
  26. <!--
  27. .imgtd {
  28.     border: 1px solid #0A0A0A;
  29. }
  30. -->
  31. </style>
  32. </head>
  33. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  34. <div align="center">
  35.  <table width="85%" border="0" cellpadding="0" style="border-collapse: collapse" height="349">
  36.   <tr>
  37.     <td align="left" height="10" valign="bottom" width="15%" style="border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px" bordercolor="#000000">
  38.       <div align="center">
  39. <table border="0" width="103" cellspacing="0" cellpadding="0" id="table1" align="left">
  40. <tr>
  41. <td><font face="方正姚体" size="5">
  42. <strong>阅读信件</strong></font></td>
  43. </tr>
  44. </table>
  45. </div>
  46. </td>
  47.     <td align="right" height="10" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px" bordercolor="#000000">
  48.       <p align="right">
  49.  <p align="right">
  50. <input type="button" value="关闭窗口" onclick="window.close()" style="color: #000000; border-style: solid; border-width: 1px; padding-left: 2px; padding-right: 2px; padding-top: 1px; padding-bottom: 1px; background-color: #FFFFFF"></td>
  51.   </tr>
  52.   <tr>
  53.     <td align="left" colspan="2" height="4" valign="top">
  54.       </td>
  55.   </tr>
  56.   <tr>
  57.     <td align="left" colspan="2" height="3" valign="top" style="border-left-style: double; border-left-width: 3px; border-right-style: double; border-right-width: 3px; border-top-style: double; border-top-width: 3px; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" bordercolor="#000000">
  58.       </td>
  59.   </tr>
  60.   <tr>
  61.     <td align="right" width="15%" height="25" style="border-left-width: 3px; border-top-width: 1px; border-left-style:double; border-bottom-width:1px" bordercolor="#000000">
  62. <font size="2">信件标题:</font></td>
  63.     <td align="left" width="85%" height="25" style="border-right-width: 3px; border-top-width: 1px; border-right-style:double; border-bottom-width:1px" bordercolor="#000000">
  64. <font size="2"><b><%=((Vector)vt.get(0)).get(1).toString()%></b></font></td>
  65.   </tr>
  66.   <tr>
  67.     <td align="right" width="15%" style="border-left-width: 3px; border-top-width: 1px; border-left-style:double; border-bottom-width:1px" height="25" bordercolor="#000000">
  68. <font size="2">接收人:</font></td>
  69.     <td align="left" width="85%" style="border-right-width: 3px; border-top-width: 1px; border-right-style:double; border-bottom-width:1px" height="25" bordercolor="#000000">
  70. <font size="2">
  71. <%
  72. if(((Vector)vt.get(0)).get(9).toString().equalsIgnoreCase("true"))
  73. {
  74.   out.print(UserManager.getPersonnelNameByUserID(iRecieveUserID));
  75. }
  76. else
  77. {
  78.   Vector vtt = OnlineMessage.getRecieverInfo(iMessageID);
  79.   for(int j=0;j<vtt.size();j++)
  80.   {
  81.     if(j>0)out.print("、");
  82.     out.print(((Vector)vtt.get(j)).get(1).toString());
  83.   }
  84. }
  85. %>
  86.     </font>
  87.     </td>
  88.   </tr>
  89.   <tr>
  90.     <td align="right" width="15%" style="border-left-width: 3px; border-top-width: 1px; border-left-style:double; border-bottom-width:1px" height="25" bordercolor="#000000">
  91. <font size="2">发送人:</font></td>
  92.     <td align="left" width="85%" style="border-right-width: 3px; border-top-width: 1px; border-right-style:double; border-bottom-width:1px" height="25" bordercolor="#000000">
  93. <font size="2"><%=UserManager.getPersonnelNameByUserID(iSendUserID)%></font></td>
  94.   </tr>
  95.   <tr>
  96.     <td align="right" width="15%" style="border-left-width: 3px; border-top-width: 1px; border-left-style:double; border-bottom-width:1px" height="25" bordercolor="#000000">
  97. <font size="2">发送时间:</font></td>
  98.     <td align="left" width="85%" style="border-right-width: 3px; border-top-width: 1px; border-right-style:double; border-bottom-width:1px" height="25" bordercolor="#000000">
  99. <font size="2"><%=StringNew.GetDateString(((Vector)vt.get(0)).get(2).toString(),"yyyy年MM月dd日HH:mm:ss")%></font></td>
  100.   </tr>
  101.   <tr>
  102.     <td align="right" width="15%" style="border-left-width: 3px; border-top-width: 1px; border-left-style:double; border-bottom-width:1px" height="25" bordercolor="#000000">
  103. <font size="2">附件信息:</font></td>
  104.     <td align="left" width="85%" style="border-right-width: 3px; border-top-width: 1px; border-right-style:double; border-bottom-width:1px" height="25" bordercolor="#000000">
  105. <font size="2">
  106. <%
  107.     Vector vt1 = OnlineMessage.getAttInfo(Integer.parseInt(((Vector)vt.get(0)).get(11).toString()));
  108.     String strAccessoriesList = "";
  109.     if(vt1.size()>0)
  110.     {
  111.       for(int j=0;j<vt1.size();j++)
  112.       {
  113.         strAccessoriesList += "<a href="" + ((Vector)vt1.get(j)).get(2).toString() + "" target="_blank" onclick="alert('请点击右键,然后选择“目标另存为”或者使用下载工具下载保存!');return false;">" + ((Vector)vt1.get(j)).get(1).toString() + "</a><br>";
  114.       }
  115.     }
  116.     else
  117.     {
  118.       strAccessoriesList = "&nbsp;";
  119.     }
  120.     out.println(strAccessoriesList);
  121. %>
  122.     </font>
  123.     </td>
  124.   </tr>
  125.   <tr>
  126.     <td align="center" width="100%" height="33" colspan="2" style="border-left-style: double; border-left-width: 3px; border-right-style: double; border-right-width: 3px; border-top-style: solid; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px" bordercolor="#000000">
  127. <b><font size="2">信 件 内 容</font></b></td>
  128.   </tr>
  129.   <tr>
  130.     <td align="center" width="100%" height="16" colspan="2" style="border-left-style: double; border-left-width: 3px; border-right-style: double; border-right-width: 3px; border-top-width: 1px" bordercolor="#000000">
  131. </td>
  132.   </tr>
  133.   <tr>
  134.     <td width="100%" height="26" colspan="2" style="border-left-style: double; border-left-width: 3px; border-right-style: double; border-right-width: 3px; border-top-width: 1px" bordercolor="#000000"><font size="2">
  135. <table border="0" width="100%" id="table2" height="22" cellpadding="0" cellspacing="0">
  136. <tr>
  137. <td width="10"></td>
  138. <td><%=((Vector)vt.get(0)).get(3).toString()%></td>
  139. </tr>
  140. </table>
  141. </font></td>
  142.   </tr>
  143.   <tr>
  144.     <td align="right" height="20" colspan="2" style="border-left-style: double; border-left-width: 3px; border-right-style: double; border-right-width: 3px; border-top-width: 1px; border-bottom-style: double; border-bottom-width: 3px" bordercolor="#000000">
  145.        </td>
  146.   </tr>
  147.   <tr>
  148.     <td align="right" height="12" colspan="2">
  149.       </td>
  150.   </tr>
  151.   <tr>
  152.     <td align="right" height="21" colspan="2">
  153.       <input type="button" value="关闭窗口" onclick="window.close()" style="color: #000000; border-style: solid; border-width: 1px; padding-left: 2px; padding-right: 2px; padding-top: 1px; padding-bottom: 1px; background-color: #FFFFFF"></td>
  154.   </tr>
  155.   <tr>
  156.     <td align="right" height="6" colspan="2">
  157.       </td>
  158.   </tr>
  159. </table>
  160. </div>
  161. </body>
  162. </html>
  163. <%
  164. }
  165. else
  166. {
  167. %>
  168. <script language="JavaScript" type="text/JavaScript">
  169. alert("您没有权限查看此记录,请与管理员联系!");
  170. window.close();
  171. </script>
  172. <%
  173. }
  174. }
  175. else
  176. {
  177. %>
  178. <script language="JavaScript" type="text/JavaScript">
  179. alert("此记录已被删除,请与管理员联系!");
  180. window.close();
  181. </script>
  182. <%
  183. }
  184. %>