EditMailServer.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 intMailServerID = m_request.GetInt("ID");
  7. if(intMailServerID<1)
  8. {
  9. %>
  10. <script language="JavaScript" type="text/JavaScript">
  11. alert("请选择正确的邮件服务器,修改失败!");
  12. history.back();
  13. </script>
  14. <%
  15. }
  16. else
  17. {
  18. int intUserID = m_session.GetInt("UserID");
  19. Vector vt = MailServerManager.getRecordByID(intMailServerID,intUserID);
  20. if(vt.size()==1)
  21. {
  22. %>
  23. <html>
  24. <head>
  25. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  26. <title>电子邮件服务器管理-- GForce OA 2.0</title>
  27. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  28. <SCRIPT language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
  29. <script language="JavaScript" type="text/javascript">
  30. function checkEditMailServer()
  31. {
  32.     if(document.editmailserver.ServerName.value=="")
  33.     {
  34.         alert("请输入邮件服务器名称!");
  35.         document.editmailserver.ServerName.focus();
  36.         return false;
  37.     }
  38.     if(document.editmailserver.POP3Password.value!=document.editmailserver.checkPOP3Password.value)
  39.     {
  40.         alert("POP3密码输入错误!两次输入的密码不一致,请重新输入。");
  41.         document.editmailserver.POP3Password.focus();
  42.         return false;
  43.     }
  44.     if(document.editmailserver.SMTPPassword.value!=document.editmailserver.checkSMTPPassword.value)
  45.     {
  46.         alert("SMTP密码输入错误!两次输入的密码不一致,请重新输入。");
  47.         document.editmailserver.SMTPPassword.focus();
  48.         return false;
  49.     }
  50. }
  51. </script>
  52. </head>
  53. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  54. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  55.     <tr>
  56.         <td align="center" valign="top"><p>&nbsp;</p>
  57.             <form name="editmailserver" action="EditMailServerAction.jsp" method="post" onSubmit="javascript:return checkEditMailServer();">
  58.              <table  border="0" cellpadding="0" cellspacing="0" width="90%">
  59.                 <tr>
  60.                     <td align="right" valign="middle"><font color="#0A0A0A">服务器名称:</font></td>
  61.                     <td align="left" valign="middle" nowrap>
  62.                         <input name="ID" type="hidden" value="<%=((Vector)vt.get(0)).get(0).toString()%>">
  63.                         <input name="UserID" type="hidden" value="<%=intUserID%>">
  64.                         <input name="ServerName" type="text" maxlength="30" size="37" value="<%=((Vector)vt.get(0)).get(1).toString()%>">
  65.                     </td>
  66.                 </tr>
  67.                 <tr>
  68.                     <td align="right" valign="middle"><font color="#0A0A0A">POP3服务器地址:</font></td>
  69.                     <td align="left" valign="middle" nowrap>
  70.                         <input name="POP3" type="text" maxlength="60" size="37" value="<%=((Vector)vt.get(0)).get(2).toString()%>">
  71.                     </td>
  72.                 </tr>
  73.                 <tr>
  74.                     <td align="right" valign="middle"><font color="#0A0A0A">POP3用户名:</font></td>
  75.                     <td align="left" valign="middle" nowrap>
  76.                         <input name="POP3User" type="text" maxlength="30" size="37" value="<%=((Vector)vt.get(0)).get(3).toString()%>">
  77.                    </td>
  78.                 </tr>
  79.                 <tr>
  80.                     <td align="right" valign="middle"><font color="#0A0A0A">POP3密码:</font></td>
  81.                     <td align="left" valign="middle" nowrap>
  82.                         <input name="POP3Password" type="password" maxlength="20" size="37" value="<%=((Vector)vt.get(0)).get(4).toString()%>">
  83.                    </td>
  84.                 </tr>
  85.                 <tr>
  86.                     <td align="right" valign="middle"><font color="#0A0A0A">确认POP3密码:</font></td>
  87.                     <td align="left" valign="middle" nowrap>
  88.                         <input name="checkPOP3Password" type="password" maxlength="20" size="37" value="<%=((Vector)vt.get(0)).get(4).toString()%>">
  89.                    </td>
  90.                 </tr>
  91.                 <tr>
  92.                     <td align="right" valign="middle"><font color="#0A0A0A">POP3端口:</font></td>
  93.                     <td align="left" valign="middle" nowrap>
  94.                         <input name="POP3Port" type="text" maxlength="5" size="37" value="<%=((Vector)vt.get(0)).get(5).toString()%>">
  95.                    </td>
  96.                 </tr>
  97.                 <tr>
  98.                     <td align="right" valign="middle"><font color="#0A0A0A">SMTP服务器:</font></td>
  99.                     <td align="left" valign="middle" nowrap>
  100.                         <input name="SMTPServer" type="text" maxlength="60" size="37" value="<%=((Vector)vt.get(0)).get(6).toString()%>">
  101.                    </td>
  102.                 </tr>
  103.                 <tr>
  104.                     <td align="right" valign="middle"><font color="#0A0A0A">SMTP用户名:</font></td>
  105.                     <td align="left" valign="middle" nowrap>
  106.                         <input name="SMTPUser" type="text" maxlength="20" size="37" value="<%=((Vector)vt.get(0)).get(7).toString()%>">
  107.                    </td>
  108.                 </tr>
  109.                 <tr>
  110.                     <td align="right" valign="middle"><font color="#0A0A0A">SMTP密码:</font></td>
  111.                     <td align="left" valign="middle" nowrap>
  112.                         <input name="SMTPPassword" type="password" maxlength="20" size="37" value="<%=((Vector)vt.get(0)).get(8).toString()%>">
  113.                    </td>
  114.                 </tr>
  115.                 <tr>
  116.                     <td align="right" valign="middle"><font color="#0A0A0A">确认SMTP密码:</font></td>
  117.                     <td align="left" valign="middle" nowrap>
  118.                         <input name="checkSMTPPassword" type="password" maxlength="20" size="37" value="<%=((Vector)vt.get(0)).get(8).toString()%>">
  119.                    </td>
  120.                 </tr>
  121.                 <tr>
  122.                     <td align="right" valign="middle">&nbsp;</td>
  123.                     <td align="left" valign="middle" nowrap>
  124.                     <%java.util.Date t_Date = new java.util.Date();%>
  125.                     <input name="LastTime" type="hidden" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(9).toString(),"yyyy-MM-dd HH:mm:ss")%>">
  126.                     </td>
  127.                 </tr>
  128.                 <tr>
  129.                     <td align="right" valign="middle">&nbsp;</td>
  130.                     <td align="left" valign="middle" nowrap>
  131.                         <input type="submit" value="修改">&nbsp;&nbsp; <input type="reset" value="重填">&nbsp;&nbsp; <input type="button" value="返回" onclick="window.location='MailServerManage.jsp';">
  132.                     </td>
  133.                 </tr>
  134.             </table>
  135.             </form>
  136.         </td>
  137.     </tr>
  138. </table>
  139. </body>
  140. </html>
  141. <%
  142. }
  143. else
  144. {
  145. %>
  146. <script language="JavaScript" type="text/JavaScript">
  147. alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
  148. history.back();
  149. </script>
  150. <%
  151. }
  152. }
  153. %>