EditMailServer.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 intMailServerID = m_request.GetInt("ID");
- if(intMailServerID<1)
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("请选择正确的邮件服务器,修改失败!");
- history.back();
- </script>
- <%
- }
- else
- {
- int intUserID = m_session.GetInt("UserID");
- Vector vt = MailServerManager.getRecordByID(intMailServerID,intUserID);
- if(vt.size()==1)
- {
- %>
- <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="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
- <script language="JavaScript" type="text/javascript">
- function checkEditMailServer()
- {
- if(document.editmailserver.ServerName.value=="")
- {
- alert("请输入邮件服务器名称!");
- document.editmailserver.ServerName.focus();
- return false;
- }
- if(document.editmailserver.POP3Password.value!=document.editmailserver.checkPOP3Password.value)
- {
- alert("POP3密码输入错误!两次输入的密码不一致,请重新输入。");
- document.editmailserver.POP3Password.focus();
- return false;
- }
- if(document.editmailserver.SMTPPassword.value!=document.editmailserver.checkSMTPPassword.value)
- {
- alert("SMTP密码输入错误!两次输入的密码不一致,请重新输入。");
- document.editmailserver.SMTPPassword.focus();
- return false;
- }
- }
- </script>
- </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="editmailserver" action="EditMailServerAction.jsp" method="post" onSubmit="javascript:return checkEditMailServer();">
- <table border="0" cellpadding="0" cellspacing="0" width="90%">
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">服务器名称:</font></td>
- <td align="left" valign="middle" nowrap>
- <input name="ID" type="hidden" value="<%=((Vector)vt.get(0)).get(0).toString()%>">
- <input name="UserID" type="hidden" value="<%=intUserID%>">
- <input name="ServerName" type="text" maxlength="30" size="37" value="<%=((Vector)vt.get(0)).get(1).toString()%>">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">POP3服务器地址:</font></td>
- <td align="left" valign="middle" nowrap>
- <input name="POP3" type="text" maxlength="60" size="37" value="<%=((Vector)vt.get(0)).get(2).toString()%>">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">POP3用户名:</font></td>
- <td align="left" valign="middle" nowrap>
- <input name="POP3User" type="text" maxlength="30" size="37" value="<%=((Vector)vt.get(0)).get(3).toString()%>">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">POP3密码:</font></td>
- <td align="left" valign="middle" nowrap>
- <input name="POP3Password" type="password" maxlength="20" size="37" value="<%=((Vector)vt.get(0)).get(4).toString()%>">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">确认POP3密码:</font></td>
- <td align="left" valign="middle" nowrap>
- <input name="checkPOP3Password" type="password" maxlength="20" size="37" value="<%=((Vector)vt.get(0)).get(4).toString()%>">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">POP3端口:</font></td>
- <td align="left" valign="middle" nowrap>
- <input name="POP3Port" type="text" maxlength="5" size="37" value="<%=((Vector)vt.get(0)).get(5).toString()%>">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">SMTP服务器:</font></td>
- <td align="left" valign="middle" nowrap>
- <input name="SMTPServer" type="text" maxlength="60" size="37" value="<%=((Vector)vt.get(0)).get(6).toString()%>">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">SMTP用户名:</font></td>
- <td align="left" valign="middle" nowrap>
- <input name="SMTPUser" type="text" maxlength="20" size="37" value="<%=((Vector)vt.get(0)).get(7).toString()%>">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">SMTP密码:</font></td>
- <td align="left" valign="middle" nowrap>
- <input name="SMTPPassword" type="password" maxlength="20" size="37" value="<%=((Vector)vt.get(0)).get(8).toString()%>">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"><font color="#0A0A0A">确认SMTP密码:</font></td>
- <td align="left" valign="middle" nowrap>
- <input name="checkSMTPPassword" type="password" maxlength="20" size="37" value="<%=((Vector)vt.get(0)).get(8).toString()%>">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"> </td>
- <td align="left" valign="middle" nowrap>
- <%java.util.Date t_Date = new java.util.Date();%>
- <input name="LastTime" type="hidden" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(9).toString(),"yyyy-MM-dd HH:mm:ss")%>">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"> </td>
- <td align="left" valign="middle" nowrap>
- <input type="submit" value="修改"> <input type="reset" value="重填"> <input type="button" value="返回" onclick="window.location='MailServerManage.jsp';">
- </td>
- </tr>
- </table>
- </form>
- </td>
- </tr>
- </table>
- </body>
- </html>
- <%
- }
- else
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
- history.back();
- </script>
- <%
- }
- }
- %>