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

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. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  7. <title>短信息-- GForce OA 2.0</title>
  8. <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  9. <script language="JavaScript" src="/js/changestyle.js"></script>
  10. <script language="JavaScript" type="text/javascript">
  11.   function saveClick()
  12.   {
  13.     with(document.sendmessage)
  14.     {
  15.       if(Title.value=="")
  16.       {
  17.         alert("请输入短信息标题!");
  18.         Title.focus();
  19.         return false;
  20.       }
  21.       RecieveUserIDs.value="<%=m_session.GetInt("UserID")%>";
  22.       AccessoriesNames.value="";
  23.       AccessoriesURLs.value="";
  24.       for(var i=0;i<AccessoriesList.length;i++)
  25.       {
  26.         if(AccessoriesList.options[i].value.length>1)
  27.         {
  28.           AccessoriesNames.value += "," + AccessoriesList.options[i].text;
  29.           AccessoriesURLs.value += "," + AccessoriesList.options[i].value;
  30.         }
  31.       }
  32.     }
  33.     document.sendmessage.submit();
  34.   }
  35.     function checkSendMessage()
  36.     {
  37.         with(document.sendmessage)
  38.         {
  39.             if(Title.value=="")
  40.             {
  41.                 alert("请输入短信息标题!");
  42.                 Title.focus();
  43.                 return false;
  44.             }
  45.             AccessoriesNames.value="";
  46.             AccessoriesURLs.value="";
  47.             if(RecieveUserIDs.value.replace(",","").length<1)
  48.             {
  49.                 alert("请选择接收人!");
  50.                 RecieveUserNames.focus();
  51.                 return false;
  52.             }
  53.             for(var i=0;i<AccessoriesList.length;i++)
  54.             {
  55.               if(AccessoriesList.options[i].value.length>1)
  56.               {
  57.                 AccessoriesNames.value += "," + AccessoriesList.options[i].text;
  58.                 AccessoriesURLs.value += "," + AccessoriesList.options[i].value;
  59.               }
  60.             }
  61.         }
  62.         return true;
  63.     }
  64.     </script>
  65. </head>
  66.   <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  67.      <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  68.     <tr>
  69.     <td align="center" valign="top">
  70.       <table width="100%" border="0" cellpadding="0" cellspacing="0">
  71.         <tr>
  72.           <td height="50" valign="top" background="../images/dy-back.gif">
  73.             <table width="100%" border="0" cellpadding="0" cellspacing="0">
  74.               <tr valign="middle">
  75.                 <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
  76.                 <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">发送信件</font></strong></td>
  77.                 <td align="right" nowrap="nowrap" valign="bottom">&nbsp;
  78.                    <!-- 群增<img src="../images/MulAdd.gif" onMouseOver="this.src='../images/MulAdd_a.gif';" onMouseOut="this.src='../images/MulAdd.gif';" border="0" height="22" width="59">&nbsp;-->
  79.                   <!--单增<img src="../images/Single.gif" onMouseOver="this.src='../images/Single_a.gif';" onMouseOut="this.src='../images/Single.gif';" border="0" height="22" width="59">&nbsp;-->
  80.                   <!-- 修改<img src="../images/Update.gif" onMouseOver="this.src='../images/Update_a.gif';" onMouseOut="this.src='../images/Update.gif';" border="0" height="22" width="59">&nbsp;-->
  81.                   <!-- 删除<img src="../images/Del.gif" onMouseOver="this.src='../images/Del_a.gif';" onMouseOut="this.src='../images/Del.gif';" border="0" height="22" width="59">&nbsp;-->
  82.                   <!-- 查看<img src="../images/Query.gif" onMouseOver="this.src='../images/Query_a.gif';" onMouseOut="this.src='../images/Query.gif';" border="0" height="22" width="59">&nbsp;-->
  83.                   <!-- 组合查询<img src="../images/GroupQuery.gif" onMouseOver="this.src='../images/GroupQuery_a.gif';" onMouseOut="this.src='../images/GroupQuery.gif';" border="0" height="22" width="79">&nbsp;-->
  84.                 </td>
  85.               </tr>
  86.             </table>
  87.           </td>
  88.         </tr>
  89.       </table><br>
  90.     <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  91.       <tr>
  92.         <td align="center" valign="top"><p>&nbsp;</p>
  93.           <form name="sendmessage" action="SendMessageAction.jsp" method="post" onSubmit="javascript:return checkSendMessage();">
  94.             <table width="95%" border="1" cellspacing="0" cellpadding="0">
  95.               <tr>
  96.                 <td width="66" bgcolor="<%=m_session.GetString("TitleColor")%>" align="right">主题:</td>
  97.                 <td><input name="Title" type="text" id="Title" maxlength="60" size="89"></td>
  98.               <tr>
  99.                 <td width="66" bgcolor="<%=m_session.GetString("TitleColor")%>" align="right">接收人:</td>
  100.                 <td><textarea name="RecieveUserNames" cols="75" rows="3" readonly="true" ondblclick="GetUserIDAndNames(document.sendmessage.RecieveUserIDs, this);"></textarea>
  101.          <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>
  102.          <br>
  103.                   <Select name="OnlineUser" tabindex="10" size="1" style="border-width: 0px;">
  104.                     <option ><%=" --- 当前共有" + OnlineUserManager.getOnlineUsers().size() + "人在线 --- "%></option>
  105.                     <%
  106.                     Enumeration options = OnlineUserManager.getOnlineUsers().elements();
  107.                     while(options.hasMoreElements())
  108.                     {
  109.                       Session option = new Session( (HttpSession)options.nextElement());
  110.                       if(option.GetInt("UserID")>0)
  111.                       {
  112.                         out.print("<option>" + UserManager.getDepartmentNameByUserID(option.GetInt("UserID")) + ":" + UserManager.getPersonnelNameByUserID(option.GetInt("UserID")) + " </option>");
  113.                       }
  114.                       else
  115.                       {
  116.                         out.print("<option>客人</option>");
  117.                       }
  118.                     }
  119.                     %>
  120.                   </select>
  121.               </tr>
  122.               <tr>
  123.                 <td align="right" bgcolor="<%=m_session.GetString("TitleColor")%>">内容:</td>
  124.                 <td height="280">
  125.                   <IFRAME ID="WebEditor1" src="/WebEditor/WebEditor.jsp?id=Content" frameborder="0" scrolling="no" width="550" height="350"></IFRAME>
  126.                   <textarea name="Content" cols="75" rows="3" readonly="true" style="display:none;"><%=""%></textarea>
  127.                 </td>
  128.               </tr>
  129.               <tr>
  130.                 <td align="right" bgcolor="<%=m_session.GetString("TitleColor")%>">附件:</td>
  131.                 <td valign="middle">
  132.                   <table width="100%" border="0" cellspacing="1" cellpadding="1">
  133.                     <tr>
  134.                       <td><select name="AccessoriesList" size="4" multiple style="width:550px;">
  135.                         </select></td>
  136.                       <td width="100" align="center" valign="middle" style="width:100;">
  137.                         <input type="button" onClick="AddAccessories(document.sendmessage.AccessoriesList);" value="新增附件" style="background-color: #FFFFFF; border: 1 solid #000000"><br>
  138.                         <input type="button" onClick="DelAccessories(document.sendmessage.AccessoriesList);" value="删除附件" style="background-color: #FFFFFF; border: 1 solid #000000">
  139.                       </td>
  140.                     </tr>
  141.                   </table>
  142.                 </td>
  143.               </tr>
  144.               <tr>
  145.                 <td bgcolor="<%=m_session.GetString("TitleColor")%>">&nbsp;</td>
  146.                 <td>&nbsp;<input name="IsSecret" value="1" type="checkbox">是否密送</td>
  147.               </tr>
  148.               <tr>
  149.                 <td>
  150.                   <input name="AccessoriesNames" type="hidden">
  151.                   <input name="AccessoriesURLs" type="hidden">
  152.                 </td>
  153.                 <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;
  154.                   <input name="Submit3" type="button" onClick="history.back();" value="返 回" style="background-color: #FFFFFF; border: 1 solid #000000">
  155.                 </td>
  156.               </tr>
  157.             </table>
  158.           </form>
  159.         </td>
  160.       </tr>
  161.     </table>
  162.   </body>
  163. </html>