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

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 checkAddMailServer()
  12. {
  13.     if(document.addmailserver.ServerName.value=="")
  14.     {
  15.         alert("请输入邮件服务器名称!");
  16.         document.addmailserver.ServerName.focus();
  17.         return false;
  18.     }
  19.     if(document.addmailserver.POP3Password.value!=document.addmailserver.checkPOP3Password.value)
  20.     {
  21.         alert("POP3密码输入错误!两次输入的密码不一致,请重新输入。");
  22.         document.addmailserver.POP3Password.focus();
  23.         return false;
  24.     }
  25.     if(document.addmailserver.SMTPPassword.value!=document.addmailserver.checkSMTPPassword.value)
  26.     {
  27.         alert("SMTP密码输入错误!两次输入的密码不一致,请重新输入。");
  28.         document.addmailserver.SMTPPassword.focus();
  29.         return false;
  30.     }
  31. }
  32. </script>
  33. </head>
  34. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  35. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  36.     <tr>
  37.         <td align="center" valign="top"><p>&nbsp;</p>
  38. <%
  39. int intUserID = m_session.GetInt("UserID");
  40. Vector vt = MailServerManager.getAllRecord(intUserID);
  41. %>
  42.             <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  43.                 <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  44.                     <th width="6%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  45.                     <th width="6%" nowrap><font color="#000000">序号</font></th>
  46.                     <th width="25%" nowrap><font color="#000000">服务器名称</font></th>
  47.                     <th width="20%" nowrap><font color="#000000">POP3用户名</font></th>
  48.                     <th width="15%" nowrap><font color="#000000">最后使用时间</font></th>
  49.                     <th width="11%" nowrap><font color="#000000">修改</font></th>
  50.                     <th width="11%" nowrap><font color="#000000">删除</font></th>
  51.                 </tr>
  52. <%
  53. for(int i=0;i<vt.size();i++)
  54. {
  55.     String strID = ((Vector)vt.get(i)).get(0).toString();
  56.     if(i % 2 == 0)
  57.         out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  58.     else
  59.         out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  60.     out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  61.     out.println("<td align="right" valign="middle">" + (i+1) + "</td>");
  62.     out.println("<td align="left" valign="middle" nowrap title="" + ((Vector)vt.get(i)).get(1).toString() + "" onclick="window.open('MailServerLink.jsp?ID=" + strID + "','_blank','height=230,top=250,left=300,width=300,status=no,toolbar=no,menubar=no,location=no')">" + ((Vector)vt.get(i)).get(1).toString() + "</td>");
  63.     out.println("<td align="center" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(3).toString() + "</td>");
  64.     out.println("<td align="center" valign="middle" nowrap>" + StringNew.GetDateString(((Vector)vt.get(i)).get(9).toString(),"yyyy-MM-dd HH:mm:ss") + "</td>");
  65.     out.println("<td align="center" valign="middle" nowrap><a href="EditMailServer.jsp?ID=" + strID + "">修改</a></td>");
  66.     out.println("<td align="center" valign="middle" nowrap><a href="DelMailServer.jsp?ID=" + strID + "" onclick="return confirm('您确实要删除该邮件服务器吗?');">删除</a></td>");
  67.     out.println("</tr>");
  68. }
  69. %>
  70.             </table>
  71.             <form name="addmailserver" action="AddMailServerAction.jsp" method="post" onSubmit="javascript:return checkAddMailServer();">
  72.             <table  border="0" cellpadding="0" cellspacing="0" width="90%">
  73.                 <tr>
  74.                     <td align="right" valign="middle"><font color="#0A0A0A">服务器名称:</font></td>
  75.                     <td align="left" valign="middle" nowrap>
  76.                         <input name="UserID" type="hidden" value="<%=intUserID%>">
  77.                         <input name="ServerName" type="text" maxlength="30" size="37">
  78.                     </td>
  79.                 </tr>
  80.                 <tr>
  81.                     <td align="right" valign="middle"><font color="#0A0A0A">POP3服务器地址:</font></td>
  82.                     <td align="left" valign="middle" nowrap>
  83.                         <input name="POP3" type="text" maxlength="60" size="37">
  84.                     </td>
  85.                 </tr>
  86.                 <tr>
  87.                     <td align="right" valign="middle"><font color="#0A0A0A">POP3用户名:</font></td>
  88.                     <td align="left" valign="middle" nowrap>
  89.                         <input name="POP3User" type="text" maxlength="30" size="37">
  90.                    </td>
  91.                 </tr>
  92.                 <tr>
  93.                     <td align="right" valign="middle"><font color="#0A0A0A">POP3密码:</font></td>
  94.                     <td align="left" valign="middle" nowrap>
  95.                         <input name="POP3Password" type="password" maxlength="20" size="37">
  96.                    </td>
  97.                 </tr>
  98.                 <tr>
  99.                     <td align="right" valign="middle"><font color="#0A0A0A">确认POP3密码:</font></td>
  100.                     <td align="left" valign="middle" nowrap>
  101.                         <input name="checkPOP3Password" type="password" maxlength="20" size="37">
  102.                    </td>
  103.                 </tr>
  104.                 <tr>
  105.                     <td align="right" valign="middle"><font color="#0A0A0A">POP3端口:</font></td>
  106.                     <td align="left" valign="middle" nowrap>
  107.                         <input name="POP3Port" type="text" maxlength="5" size="37">
  108.                    </td>
  109.                 </tr>
  110.                 <tr>
  111.                     <td align="right" valign="middle"><font color="#0A0A0A">SMTP服务器:</font></td>
  112.                     <td align="left" valign="middle" nowrap>
  113.                         <input name="SMTPServer" type="text" maxlength="60" size="37">
  114.                    </td>
  115.                 </tr>
  116.                 <tr>
  117.                     <td align="right" valign="middle"><font color="#0A0A0A">SMTP用户名:</font></td>
  118.                     <td align="left" valign="middle" nowrap>
  119.                         <input name="SMTPUser" type="text" maxlength="20" size="37">
  120.                    </td>
  121.                 </tr>
  122.                 <tr>
  123.                     <td align="right" valign="middle"><font color="#0A0A0A">SMTP密码:</font></td>
  124.                     <td align="left" valign="middle" nowrap>
  125.                         <input name="SMTPPassword" type="password" maxlength="20" size="37">
  126.                    </td>
  127.                 </tr>
  128.                 <tr>
  129.                     <td align="right" valign="middle"><font color="#0A0A0A">确认SMTP密码:</font></td>
  130.                     <td align="left" valign="middle" nowrap>
  131.                         <input name="checkSMTPPassword" type="password" maxlength="20" size="37">
  132.                    </td>
  133.                 </tr>
  134.                 <tr>
  135.                     <td align="right" valign="middle">&nbsp;</td>
  136.                     <td align="left" valign="middle" nowrap>
  137.                     <%java.util.Date t_Date = new java.util.Date();%>
  138.                     <input name="LastTime" type="hidden" value="<%=StringNew.GetDateString(t_Date,"yyyy-MM-dd HH:mm:ss")%>">
  139.                     </td>
  140.                 </tr>
  141.                 <tr>
  142.                     <td align="right" valign="middle">&nbsp;</td>
  143.                     <td align="left" valign="middle" nowrap>
  144.                         <input type="submit" value="添加">  &nbsp;&nbsp;&nbsp; <input type="reset" value="重填">
  145.                     </td>
  146.                 </tr>
  147.             </table>
  148.             </form>
  149.         </td>
  150.     </tr>
  151. </table>
  152. </body>
  153. </html>