EditMessage.jsp
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:7k
源码类别:
OA系统
开发平台:
Java
- <%@ page contentType="text/html; charset=gb2312" %>
- <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
- <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
- <%
- Request m_request = new Request(request);
- int iMsgID = m_request.GetInt("ID");
- int iUserID = m_session.GetInt("UserID");
- Vector vt = OnlineMessage.getRecordByID(iMsgID);
- Vector vt1 = new Vector();
- String strTitle="";
- String strContent="";
- if(vt.size()==1)
- {
- strTitle = ((Vector)vt.get(0)).get(1).toString();
- strContent = ((Vector)vt.get(0)).get(3).toString();
- vt1 = OnlineMessage.getAttInfo(iMsgID);
- }
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
- <title>短信息-- GForce OA 2.0</title>
- <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
- <script language="JavaScript" src="/js/changestyle.js"></script>
- <script language="JavaScript" type="text/javascript">
- function saveClick()
- {
- document.sendmessage.action="EditMessageAction.jsp";
- with(document.sendmessage)
- {
- if(Title.value=="")
- {
- alert("请输入短信息标题!");
- Title.focus();
- return false;
- }
- RecieveUserIDs.value="<%=m_session.GetInt("UserID")%>";
- AccessoriesNames.value="";
- AccessoriesURLs.value="";
- for(var i=0;i<AccessoriesList.length;i++)
- {
- if(AccessoriesList.options[i].value.length>1)
- {
- AccessoriesNames.value += "," + AccessoriesList.options[i].text;
- AccessoriesURLs.value += "," + AccessoriesList.options[i].value;
- }
- }
- }
- document.sendmessage.submit();
- }
- function checkSendMessage()
- {
- document.sendmessage.action="SendMessageAction.jsp";
- with(document.sendmessage)
- {
- if(Title.value=="")
- {
- alert("请输入短信息标题!");
- Title.focus();
- return false;
- }
- AccessoriesNames.value="";
- AccessoriesURLs.value="";
- if(RecieveUserIDs.value.replace(",","").length<1)
- {
- alert("请选择接收人!");
- RecieveUserNames.focus();
- return false;
- }
- for(var i=0;i<AccessoriesList.length;i++)
- {
- if(AccessoriesList.options[i].value.length>1)
- {
- AccessoriesNames.value += "," + AccessoriesList.options[i].text;
- AccessoriesURLs.value += "," + AccessoriesList.options[i].value;
- }
- }
- }
- return true;
- }
- function ResetAll()
- {
- window.location="EditMessage.jsp?ID=<%=iMsgID%>";
- }
- </script>
- <style type="text/css">
- <!--
- .imgtd {
- border: 1px solid #0A0A0A;
- }
- -->
- </style>
- </head>
- <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
- <table width="100%" height="100%" border="0" align="center" cellspacing="0">
- <tr>
- <td align="center" valign="top"><p> </p>
- <form name="sendmessage" action="SendMessageAction.jsp" method="post" onSubmit="javascript:return checkSendMessage();">
- <table width="95%" border="1" cellspacing="0" cellpadding="0">
- <tr>
- <td align="center" width="43" bgcolor="<%=m_session.GetString("TitleColor")%>">主题:</td>
- <td width=""><input name="Title" type="text" id="Title" maxlength="60" size="89" value="<%=strTitle%>">
- <input type="hidden" name="SendUserID" value="<%=iUserID%>"></td>
- <tr>
- <td width="66" bgcolor="<%=m_session.GetString("TitleColor")%>" align="right">接收人:</td>
- <td><textarea name="RecieveUserNames" cols="75" rows="3" readonly="true" ondblclick="GetUserIDAndNames(document.sendmessage.RecieveUserIDs, this);"></textarea>
- <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>
- </tr>
- <tr>
- <td align="right" bgcolor="<%=m_session.GetString("TitleColor")%>">内容:</td>
- <td height="280">
- <textarea name="Content" cols="75" rows="3" readonly="true" style="display:none;"><%=strContent%></textarea>
- <IFRAME ID="WebEditor1" src="/WebEditor/WebEditor.jsp?id=Content" frameborder="0" scrolling="no" width="550" height="350"></IFRAME>
- </td>
- </tr>
- <tr>
- <td align="center" bgcolor="<%=m_session.GetString("TitleColor")%>">附件:</td>
- <td valign="middle">
- <table width="100%" border="0" cellspacing="1" cellpadding="1">
- <tr>
- <td width="705"><select name="AccessoriesList" size="4" multiple style="width:550px;">
- <%
- for(int i=0;i<vt1.size();i++)
- {
- out.println("<option value="" + ((Vector)vt1.get(i)).get(2).toString() + "">" + ((Vector)vt1.get(i)).get(1).toString() + "</option>");
- }
- %>
- </select></td>
- <td width="24" align="left" valign="top">
- <%
- for(int i=0;i<vt1.size();i++)
- {
- out.println("<a href="" + ((Vector)vt1.get(i)).get(2).toString() + "" target="_blank">" + ((Vector)vt1.get(i)).get(1).toString() + "</a><br>");
- }
- %>
- </td>
- <td width="100" align="center" valign="middle" style="width:100;">
- <div align="left">
- <input type="button" onclick="AddAccessories(document.sendmessage.AccessoriesList);" value="新增附件" style="background-color: #FFFFFF; border: 1 solid #000000">
- <br>
- <input type="button" onclick="DelAccessories(document.sendmessage.AccessoriesList);" value="删除附件" style="background-color: #FFFFFF; border: 1 solid #000000">
- </div></td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td bgcolor="<%=m_session.GetString("TitleColor")%>"> </td>
- <td> <input name="IsSecret" value="1" type="checkbox">是否密送</td>
- </tr>
- <tr>
- <td>
- <input name="AccessoriesNames" type="hidden">
- <input name="AccessoriesURLs" type="hidden">
- <input name="ID" type="hidden" value="<%=iMsgID%>">
- </td>
- <td align="center"><input type="submit" name="Submit" value="发 送" style="background-color: #FFFFFF; border: 1 solid #000000"> <input type="button" name="Save" value="保 存" onclick="saveClick();" style="background-color: #FFFFFF; border: 1 solid #000000"> <input type="reset" value="重 置" style="background-color: #FFFFFF; border: 1 solid #000000" onclick="ResetAll();">
- <input name="Submit3" type="button" onClick="history.back();" value="返 回" style="background-color: #FFFFFF; border: 1 solid #000000">
- </td>
- </tr>
- </table>
- </form>
- </td>
- </tr>
- </table>
- </body>
- </html>