FtpManage.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"/>
  4. <%
  5.   Session m_session = new Session(session);
  6.   int iUserID = m_session.GetInt("UserID");
  7.   String strUserID = iUserID + "";
  8. %>
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  12. <title>FTP管理-- GForce OA 2.0</title>
  13. <link href="../css/txt.jsp" rel="stylesheet" type="text/css"><script language="JavaScript" src="/js/changestyle.js"></script>
  14.   <%
  15.     Request m_request = new Request(request);
  16.     int iPageSize = 18;
  17.     int iPage = m_request.GetInt("Page");
  18.     String strCurrentPageURL = request.getRequestURI();
  19.     String strID = m_request.GetString("ID");
  20.     String strGroupName = m_request.GetString("GroupName");
  21.     String strGroupPath = m_request.GetString("GroupPath");
  22.     String strPermissions = m_request.GetString("Permissions");
  23.     String strOrderBy = m_request.GetString("OrderBy");
  24.     String strIsDesc = m_request.GetString("IsDesc");
  25.   %>
  26. <script language="JavaScript">
  27.    function changeorder(orderBy)
  28.    {
  29.       with(document.DocumentList)
  30.       {
  31.         if(OrderBy.value==orderBy)
  32.         {
  33.          if(IsDesc.value=="")
  34.             IsDesc.value="True";
  35.          else
  36.             IsDesc.value="";
  37.         }
  38.         else
  39.         {
  40.           IsDesc.value="";
  41.           OrderBy.value=orderBy;
  42.           Page.value="1";
  43.         }
  44.       }
  45.       document.DocumentList.submit();
  46.     }
  47.    function changepage(pageNum)
  48.    {
  49.       with(document.DocumentList)
  50.         {
  51.     Page.value=pageNum;
  52.          }
  53.       document.DocumentList.submit();
  54.     }
  55. </script>
  56. </head>
  57. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  58. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  59.     <tr>
  60.         <td align="center" valign="top"><p>&nbsp;</p>
  61.           <form name="DocumentList" action="<%=strCurrentPageURL%>" method="post">
  62.             <input name="Page" type="hidden" value="<%=iPage%>">
  63.             <input name="ID" type="hidden" value="<%=strID%>">
  64.             <input name="GroupName" type="hidden" value="<%=strGroupName%>">
  65.             <input name="GroupPath" type="hidden" value="<%=strGroupPath%>">
  66.             <input name="Permissions" type="hidden" value="<%=strPermissions%>">
  67.             <input name="OrderBy" type="hidden" value="<%=strOrderBy%>">
  68.             <input name="IsDesc" type="hidden" value="<%=strIsDesc%>">
  69.           </form>
  70.           <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  71.                 <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  72.                     <th width="5%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  73.                     <th width="5%" nowrap><font color="#000000">序号</font></th>
  74.                     <th width="35%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.GroupID');return false;">权限组名称</a><%
  75.                if(strOrderBy.equalsIgnoreCase("a.GroupID"))
  76.                {
  77.                 if(strIsDesc.equalsIgnoreCase("True"))
  78.                 out.print("↓");
  79.                 else
  80.                 out.print("↑");
  81.                 }
  82.                %></font></th>
  83.             <th width="25%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.GroupPath');return false;">工作路径</a><%
  84.                if(strOrderBy.equalsIgnoreCase("a.GroupPath"))
  85.                {
  86.                 if(strIsDesc.equalsIgnoreCase("True"))
  87.                 out.print("↓");
  88.                 else
  89.                 out.print("↑");
  90.                }
  91.               %></font></th>
  92.             <th width="15%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.Permissions');return false;">权限</a><%
  93.               if(strOrderBy.equalsIgnoreCase("a.Permissions"))
  94.                {
  95.                 if(strIsDesc.equalsIgnoreCase("True"))
  96.                 out.print("↓");
  97.                 else
  98.                 out.print("↑");
  99.                }
  100.               %></font></th>
  101.                     <th width="8%" nowrap><font color="#000000">修改</font></th>
  102.                 </tr>
  103.                 <%
  104.     Vector vt = FTPGroupPathManager.getRecordBySearch(strID,strGroupName,strGroupPath,strPermissions,strOrderBy,strIsDesc);
  105.     if(iPage<1)iPage=1;
  106.     int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
  107.     if(iPage>iPageCount) iPage=1;
  108.     for(int i=(iPage-1)*iPageSize;i<vt.size()&&i<iPage*iPageSize;i++)
  109.     {
  110.       strID = ((Vector)vt.get(i)).get(0).toString();
  111.       if(i % 2 == 0)
  112.       {
  113.         out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  114.       }
  115.       else
  116.       {
  117.         out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  118.       }
  119.       out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  120.       out.println("<td align="right" valign="middle">" + (i+1) + "</td>");
  121.       out.println("<td align="left" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(1).toString() + "&nbsp;</td>");
  122.       out.println("<td align="left" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(2).toString() + "&nbsp;</td>");
  123.       out.println("<td align="left" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(3).toString() + "&nbsp;</td>");
  124.       out.println("<td align="center" valign="middle" nowrap><a href="EditFtp.jsp?ID=" + strID + "">修改</a></td>");
  125.       out.println("</tr>");
  126. }
  127. %>
  128.             <tr>
  129.              <th align="center" valign="top" colspan="6">
  130.               <%
  131.               if(iPage<2)
  132.               out.print("首页&nbsp;&nbsp;上页");
  133.               else
  134.               out.print("<a href="" onclick="changepage(" + 1 + ");return false;">首页</a>&nbsp;&nbsp;<a href="" onclick="changepage(" + (iPage-1) + ");return false;">上页</a>");
  135.               out.print("&nbsp;&nbsp;当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页&nbsp;&nbsp;");
  136.               if(iPage>=iPageCount)
  137.               out.print("下页&nbsp;&nbsp;末页");
  138.               else
  139.               out.print("<a href="" onclick="changepage(" + (iPage+1) + ");return false;">下页</a>&nbsp;&nbsp;<a href="" onclick="changepage(" + iPageCount + ");return false;">末页</a>");
  140.               %>
  141.              </th>
  142.             </tr>
  143.             </table>
  144.         </td>
  145.     </tr>
  146. </table>
  147. </body>
  148. </html>