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

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