ReplyMessage.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="/CheckLogin.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. String strTitle="";
  10. String strContent="";
  11. String strRecieveUserIDs = "";
  12. if(vt.size()==1)
  13. {
  14.   int iSendUserID=Integer.parseInt(((Vector)vt.get(0)).get(4).toString());
  15.   int iRecieveUserID = Integer.parseInt(((Vector)vt.get(0)).get(5).toString());
  16.   int iMessageID = Integer.parseInt(((Vector)vt.get(0)).get(11).toString());
  17.   strTitle = ((Vector)vt.get(0)).get(1).toString();
  18.   String strRecieveUser = "";
  19.   strRecieveUserIDs = iSendUserID + "";
  20.   if(((Vector)vt.get(0)).get(9).toString().equalsIgnoreCase("true"))
  21.   {
  22.     strRecieveUser = UserManager.getPersonnelNameByUserID(iRecieveUserID);
  23.   }
  24.   else
  25.   {
  26.     Vector vtt = OnlineMessage.getRecieverInfo(iMessageID);
  27.     for(int j=0;j<vtt.size();j++)
  28.     {
  29.       if(j>0)strRecieveUser += "、";
  30.       strRecieveUser += ((Vector)vtt.get(j)).get(1).toString();
  31.     }
  32.   }
  33.   strContent = UserManager.getPersonnelNameByUserID(iSendUserID) + "您好:<br><br><br>=================================================<br>您在" + StringNew.GetDateString(((Vector)vt.get(0)).get(2).toString(),"yyyy年MM月dd日HH:mm:ss") + "给 " + strRecieveUser + " 发送的短信息《" + strTitle + "》内容如下:<br>" + ((Vector)vt.get(0)).get(3).toString() + "<br>=================================================";
  34. }
  35. %>
  36. <html>
  37.   <head>
  38.     <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  39.     <title>短信息-- GForce OA 2.0</title>
  40.     <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  41.     <script language="JavaScript" src="/js/changestyle.js"></script>
  42.     <script language="JavaScript" type="text/javascript">
  43.   function saveClick()
  44.   {
  45.     with(document.sendmessage)
  46.     {
  47.       if(Title.value=="")
  48.       {
  49.         alert("请输入短信息标题!");
  50.         Title.focus();
  51.         return false;
  52.       }
  53.       RecieveUserIDs.value="<%=m_session.GetInt("UserID")%>";
  54.       AccessoriesNames.value="";
  55.       AccessoriesURLs.value="";
  56.       for(var i=0;i<AccessoriesList.length;i++)
  57.       {
  58.         if(AccessoriesList.options[i].value.length>1)
  59.         {
  60.           AccessoriesNames.value += "," + AccessoriesList.options[i].text;
  61.           AccessoriesURLs.value += "," + AccessoriesList.options[i].value;
  62.         }
  63.       }
  64.     }
  65.     document.sendmessage.submit();
  66.   }
  67.     function checkSendMessage()
  68.     {
  69.         with(document.sendmessage)
  70.         {
  71.             if(Title.value=="")
  72.             {
  73.                 alert("请输入短信息标题!");
  74.                 Title.focus();
  75.                 return false;
  76.             }
  77.             AccessoriesNames.value="";
  78.             AccessoriesURLs.value="";
  79.             if(RecieveUserIDs.value.replace(",","").length<1)
  80.             {
  81.                 alert("请选择接收人!");
  82.                 RecieveUserNames.focus();
  83.                 return false;
  84.             }
  85.             for(var i=0;i<AccessoriesList.length;i++)
  86.             {
  87.               if(AccessoriesList.options[i].value.length>1)
  88.               {
  89.                 AccessoriesNames.value += "," + AccessoriesList.options[i].text;
  90.                 AccessoriesURLs.value += "," + AccessoriesList.options[i].value;
  91.               }
  92.             }
  93.         }
  94.         return true;
  95.     }
  96.     </script>
  97.     <style type="text/css">
  98.       <!--
  99.       .imgtd {
  100.           border: 1px solid #0A0A0A;
  101.       }
  102.       -->
  103.     </style>
  104.   </head>
  105.   <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  106.     <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  107.       <tr>
  108.         <td align="center" valign="top"><p>&nbsp;</p>
  109.           <form name="sendmessage" action="SendMessageAction.jsp" method="post" onSubmit="javascript:return checkSendMessage();">
  110.             <table width="95%" border="1" cellspacing="0" cellpadding="0">
  111.               <tr>
  112.                 <td align="center" width="43" bgcolor="<%=m_session.GetString("TitleColor")%>">主题:</td>
  113.                 <td width="">
  114.                 <input name="Title" type="text" id="Title" maxlength="60" size="89" value="<%="回复:" + strTitle%>"></td>
  115.               <tr>
  116.                 <td width="66" bgcolor="<%=m_session.GetString("TitleColor")%>" align="right">接收人:</td>
  117.                 <td><textarea name="RecieveUserNames" cols="75" rows="3" readonly="true" ondblclick="GetUserIDAndNames(document.sendmessage.RecieveUserIDs, this);"><%=UserManager.getPersonnelNamesByUserIDs(strRecieveUserIDs)%></textarea>
  118.                 <input name="RecieveUserIDs" type="hidden" value="<%=strRecieveUserIDs%>"><a href="" onclick="GetUserIDAndNames(document.sendmessage.RecieveUserIDs, document.sendmessage.RecieveUserNames);return false;" title="选择员工名称"><img src="/images/couple.gif" border="0"></a>
  119.               </tr>
  120.               <tr>
  121.                 <td align="center" bgcolor="<%=m_session.GetString("TitleColor")%>">内容:</td>
  122.                 <td height="280">
  123.                   <IFRAME ID="WebEditor1" src="/WebEditor/WebEditor.jsp?id=Content" frameborder="0" scrolling="no" width="550" height="350"></IFRAME>
  124.                   <textarea name="Content" cols="75" rows="3" readonly="true" style="display:none;"><%=strContent%></textarea>
  125.                 </td>
  126.               </tr>
  127.               <tr>
  128.                 <td align="center" bgcolor="<%=m_session.GetString("TitleColor")%>">附件:</td>
  129.                 <td valign="middle">
  130.                   <table width="100%" border="0" cellspacing="1" cellpadding="1">
  131.                     <tr>
  132.                       <td><select name="AccessoriesList" size="4" multiple style="width:550px;">
  133.                         </select></td>
  134.                       <td width="100" align="center" valign="middle" style="width:100;">
  135.                         <input type="button" onclick="AddAccessories(document.sendmessage.AccessoriesList);" value="新增附件" style="background-color: #FFFFFF; border: 1 solid #000000"><br>
  136.                         <input type="button" onclick="DelAccessories(document.sendmessage.AccessoriesList);" value="删除附件" style="background-color: #FFFFFF; border: 1 solid #000000">
  137.                       </td>
  138.                     </tr>
  139.                   </table>
  140.                 </td>
  141.               </tr>
  142.               <tr>
  143.                 <td bgcolor="<%=m_session.GetString("TitleColor")%>">&nbsp;</td>
  144.                 <td>&nbsp;<input name="IsSecret" value="1" type="checkbox">是否密送</td>
  145.               </tr>
  146.               <tr>
  147.                 <td>
  148.                   <input name="AccessoriesNames" type="hidden">
  149.                   <input name="AccessoriesURLs" type="hidden">
  150.                 </td>
  151.                 <td align="center"><input type="submit" name="Submit" value="发 送" style="background-color: #FFFFFF; border: 1 solid #000000">&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="Save" value="保 存" onclick="saveClick();" style="background-color: #FFFFFF; border: 1 solid #000000">&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" name="Submit2" value="重 置" style="background-color: #FFFFFF; border: 1 solid #000000">&nbsp;&nbsp;&nbsp;&nbsp;
  152.                   <input name="Submit3" type="button" onClick="history.back();" value="返 回" style="background-color: #FFFFFF; border: 1 solid #000000">
  153.                 </td>
  154.               </tr>
  155.             </table>
  156.           </form>
  157.         </td>
  158.       </tr>
  159.     </table>
  160.   </body>
  161. </html>