SendMessageAction.jsp
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:2k
源码类别:
OA系统
开发平台:
Java
- <%@ page contentType="text/html;charset=gb2312" %>
- <%@ page import="java.util.*,com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
- <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
- <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">
- </HEAD>
- <%
- Request m_request = new Request(request);
- int iUserID = m_session.GetInt("UserID");
- String strTitle = m_request.GetString("Title");
- String strContent = m_request.GetString("Content");
- strContent =strContent.replaceAll("'","''");
- int iIsSecret = m_request.GetInt("IsSecret");
- String strRecieveUserIDs = "";
- try
- {
- strRecieveUserIDs = m_request.GetString("RecieveUserIDs");
- }
- catch (Exception ex)
- {
- SystemOut.ErrOut("获取接收用户ID时出错!用户ID=“" + strRecieveUserIDs + "”");
- strRecieveUserIDs="";
- }
- String strAccessoriesNames = "";
- try
- {
- strAccessoriesNames = m_request.GetString("AccessoriesNames");
- if(strAccessoriesNames.length()>1)
- strAccessoriesNames=strAccessoriesNames.substring(1);
- }
- catch (Exception ex)
- {
- SystemOut.ErrOut("获取附件名称时出错!附件名称=“" + strAccessoriesNames + "”");
- strAccessoriesNames="";
- }
- String strAccessoriesURLs = "";
- try
- {
- strAccessoriesURLs = m_request.GetString("AccessoriesURLs");
- if(strAccessoriesURLs.length()>1)
- strAccessoriesURLs=strAccessoriesURLs.substring(1);
- }
- catch (Exception ex)
- {
- SystemOut.ErrOut("获取附件URL时出错!附件URL=“" + strAccessoriesURLs + "”");
- strAccessoriesURLs="";
- }
- OnlineMessage onlineMsg = new OnlineMessage();
- int iOnlineMsgID = 0;
- try
- {
- iOnlineMsgID = onlineMsg.SendMessage(strTitle,strContent,strRecieveUserIDs,iUserID,strAccessoriesNames,strAccessoriesURLs,iIsSecret);
- }
- catch (Exception ex)
- {
- }
- if(iOnlineMsgID>0)
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("信息发送/文件保存成功!");
- history.back();
- </script>
- <%
- }
- else if(iOnlineMsgID==-1)
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("已经存在相同的信息/文件记录,发送/保存失败!");
- history.back();
- </script>
- <%
- }
- else
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("未知错误,增加失败,请与管理员联系!");
- history.back();
- </script>
- <%
- }
- %>
- </HTML>