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

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. Vector vt = RoleManager.getAllRecord();
  6. %>
  7. <html>
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  10. <title>系统目录管理-- GForce OA 2.0</title>
  11. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  12. <script language="javascript" type="text/javascript">
  13. function showtree(jibie,shangjiID,bline)
  14. {
  15.     if(jibie<1)
  16.     {
  17.         document.write("<div id="t" + jibie + "_" + shangjiID +"" style="display:;line-height: 10px;">");
  18.     }
  19.     else
  20.     {
  21.         document.write("<div id="t" + jibie + "_" + shangjiID +"" style="display:;line-height: 10px;">");
  22.     }
  23.     var i,notislast,j,haschild;
  24.     notislast=false;
  25.     haschild=false;
  26.     for(i=0;i<jsArray.length;i++)
  27.     {
  28.         if((jsArray[i][3]==jibie + 1)&&(jsArray[i][2]==shangjiID.toString()))
  29.         {
  30.             var j,maxorder=0;
  31.             haschild=false;
  32.             childacount = 0;
  33.             for(j=0;j<jsArray.length;j++)
  34.             {
  35.                 if((jsArray[j][3]==jibie + 1)&&(jsArray[j][2]==shangjiID.toString())&&parseInt(maxorder)<parseInt(jsArray[j][5]))
  36.                 {
  37.                     maxorder=jsArray[j][5];
  38.                 }
  39.             }
  40.             for(j=0;j<jsArray.length;j++)
  41.             {
  42.                 if((jsArray[j][3]==jibie + 2)&&(jsArray[j][2]==jsArray[i][0]))
  43.                 {
  44.                     haschild=true;
  45.                     childacount++;
  46.                 }
  47.             }
  48.             bline = bline.substr(0,jibie);
  49.             for(j=0;j<bline.length;j++)
  50.                 if(bline.substr(j,1)=="1")
  51.                     document.write("<img align="absbottom" src="/images/tree/i.gif" border="0" width="19" height="19">");
  52.                 else
  53.                     document.write("<img align="absbottom" src="/images/tree/white.gif" border="0" width="19" height="19">");
  54.             if(parseInt(maxorder)>parseInt(jsArray[i][5]))
  55.             {
  56.                 if(haschild)
  57.                 {
  58.                     if(jsArray[i][10]=="true")
  59.                         if(jsArray[i][7]=="")
  60.                             document.write("<a href="#" onclick="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ");return false;" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom"  src="/images/tree/tminus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom"  src="/images/tree/folderopen.gif" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><a href="" + jsArray[i][8] + "" target="" + jsArray[i][9] + "">" + jsArray[i][1] + "</a></a>");
  61.                         else
  62.                             document.write("<a href="#" onclick="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ");return false;" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom"  src="/images/tree/tminus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom"  src=""+jsArray[i][7] +"" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><a href="" + jsArray[i][8] + "" target="" + jsArray[i][9] + "">" + jsArray[i][1] + "</a></a>");
  63.                     else
  64.                         if(jsArray[i][7]=="")
  65.                             document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ")" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom"  src="/images/tree/tminus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom"  src="/images/tree/folderopen.gif" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + "">" + jsArray[i][1] + "</a>");
  66.                         else
  67.                             document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ")" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom"  src="/images/tree/tminus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom"  src=""+jsArray[i][7] +"" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + "">" + jsArray[i][1] + "</a>");
  68.                     document.write("&nbsp;&nbsp;&nbsp;&nbsp;<a>(共有个" + childacount + "子系统目录)</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="EditSystemDirectory.jsp?ID=" + jsArray[i][0] + "">修改系统目录</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Top">置顶</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Up">上移</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Down">下移</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Bottom">置底</a><br>");
  69.                 }
  70.                 else
  71.                 {
  72.                     if(jsArray[i][10]=="true")
  73.                         if(jsArray[i][7]=="")
  74.                             document.write("<img align="absbottom"  src="/images/tree/t.gif" border="0" width="19" height="19"><img align="absbottom"  src="/images/tree/book.gif" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><a href="" + jsArray[i][8] + "" target="" + jsArray[i][9] + "" title=""+ jsArray[i][11] +"">" + jsArray[i][1] + "</a>");
  75.                         else
  76.                             document.write("<img align="absbottom"  src="/images/tree/t.gif" border="0" width="19" height="19"><img align="absbottom"  src="" + jsArray[i][7] +"" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><a href="" + jsArray[i][8] + "" target="" + jsArray[i][9] + "" title=""+ jsArray[i][11] +"">" + jsArray[i][1] + "</a>");
  77.                     else
  78.                         if(jsArray[i][7]=="")
  79.                             document.write("<img align="absbottom"  src="/images/tree/t.gif" border="0" width="19" height="19"><img align="absbottom"  src="/images/tree/book.gif" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><a title=""+ jsArray[i][11] +"">" + jsArray[i][1] + "</a>");
  80.                         else
  81.                             document.write("<img align="absbottom"  src="/images/tree/t.gif" border="0" width="19" height="19"><img align="absbottom"  src="" + jsArray[i][7] +"" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><a title=""+ jsArray[i][11] +"">" + jsArray[i][1] + "</a>");
  82.                     document.write("&nbsp;&nbsp;&nbsp;&nbsp;<a></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="EditSystemDirectory.jsp?ID=" + jsArray[i][0] + "">修改系统目录</a>");
  83.                     document.write("&nbsp;<a href="DelSystemDirectory.jsp?ID=" + jsArray[i][0] + "">删除系统目录</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Top">置顶</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Up">上移</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Down">下移</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Bottom">置底</a><br>");
  84.                 }
  85.                 bline += "1".toString();
  86.                 showtree(jibie + 1,jsArray[i][0],bline);
  87.             }
  88.             else
  89.             {
  90.                 if(haschild)
  91.                 {
  92.                     if(jsArray[i][10]=="true")
  93.                         if(jsArray[i][7]=="")
  94.                             document.write("<a href="#" onclick="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ");return false;" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom"  src="/images/tree/lminus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom"  src="/images/tree/folderopen.gif" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><a href="" + jsArray[i][8] + "" target="" + jsArray[i][9] + "">" + jsArray[i][1] + "</a></a>");
  95.                         else
  96.                             document.write("<a href="#" onclick="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ");return false;" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom"  src="/images/tree/lminus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom"  src=""+jsArray[i][7] +"" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><a href="" + jsArray[i][8] + "" target="" + jsArray[i][9] + "">" + jsArray[i][1] + "</a></a>");
  97.                     else
  98.                         if(jsArray[i][7]=="")
  99.                             document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ")" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom"  src="/images/tree/lminus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom"  src="/images/tree/folderopen.gif" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + "">" + jsArray[i][1] + "</a>");
  100.                         else
  101.                             document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ")" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom"  src="/images/tree/lminus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom"  src=""+jsArray[i][7] +"" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + "">" + jsArray[i][1] + "</a>");
  102.                                             document.write("&nbsp;&nbsp;&nbsp;&nbsp;<a>(共有个" + childacount + "子系统目录)</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="EditSystemDirectory.jsp?ID=" + jsArray[i][0] + "">修改系统目录</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Top">置顶</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Up">上移</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Down">下移</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Bottom">置底</a><br>");
  103.                 }
  104.                 else
  105.                 {
  106.                     if(jsArray[i][10]=="true")
  107.                         if(jsArray[i][7]=="")
  108.                             document.write("<img align="absbottom"  src="/images/tree/l.gif" border="0" width="19" height="19"><img align="absbottom"  src="/images/tree/book.gif" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><a href="" + jsArray[i][8] + "" target="" + jsArray[i][9] + "" title=""+ jsArray[i][11] +"">" + jsArray[i][1] + "</a>");
  109.                         else
  110.                             document.write("<img align="absbottom"  src="/images/tree/l.gif" border="0" width="19" height="19"><img align="absbottom"  src="" + jsArray[i][7] +"" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><a href="" + jsArray[i][8] + "" target="" + jsArray[i][9] + "" title=""+ jsArray[i][11] +"">" + jsArray[i][1] + "</a>");
  111.                     else
  112.                         if(jsArray[i][7]=="")
  113.                             document.write("<img align="absbottom"  src="/images/tree/l.gif" border="0" width="19" height="19"><img align="absbottom"  src="/images/tree/book.gif" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><a title=""+ jsArray[i][11] +"">" + jsArray[i][1] + "</a>");
  114.                         else
  115.                             document.write("<img align="absbottom"  src="/images/tree/l.gif" border="0" width="19" height="19"><img align="absbottom"  src="" + jsArray[i][7] +"" border="0" width="19" height="19" title=""+ jsArray[i][11] +""><a title=""+ jsArray[i][11] +"">" + jsArray[i][1] + "</a>");
  116.                     document.write("&nbsp;&nbsp;&nbsp;&nbsp;<a></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="EditSystemDirectory.jsp?ID=" + jsArray[i][0] + "">修改系统目录</a>");
  117.                     document.write("&nbsp;<a href="DelSystemDirectory.jsp?ID=" + jsArray[i][0] + "" onclick="return confirm('您确实要删除该目录吗?');">删除系统目录</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Top">置顶</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Up">上移</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Down">下移</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="MoveSystemDirectory.jsp?ID=" + jsArray[i][0] + "&Direct=Bottom">置底</a><br>");
  118.                 }
  119.                 bline += "0".toString();
  120.                 showtree(jibie + 1,jsArray[i][0],bline);
  121.             }
  122.         }
  123.     }
  124.     document.write("</div>");
  125. }
  126. function clicktree(jibie,shangjiID)
  127. {
  128.     if(shangjiID>0)
  129.     if(eval("t" + jibie + "_" + shangjiID).style.display=="none")
  130.     {
  131.         eval("t" + jibie + "_" + shangjiID).style.display="";
  132.         if(eval("document.n" + jibie + "_" + shangjiID).src.toLowerCase().indexOf("tplus.gif")>0)
  133.             eval("document.n" + jibie + "_" + shangjiID).src="/images/tree/tminus.gif";
  134.         else
  135.             eval("document.n" + jibie + "_" + shangjiID).src="/images/tree/lminus.gif";
  136.         folderOpenString = "";
  137.         for(j=0;j<jsArray.length;j++)
  138.         {
  139.             if((jsArray[j][0]==shangjiID))
  140.             {
  141.                 folderOpenString = jsArray[j][6];
  142.                 break;
  143.             }
  144.         }
  145.         if(folderOpenString=="")
  146.             eval("document.f" + jibie + "_" + shangjiID).src="/images/tree/folderopen.gif";
  147.         else
  148.             eval("document.f" + jibie + "_" + shangjiID).src=folderOpenString;
  149.     }
  150.     else
  151.     {
  152.         eval("t" + jibie + "_" + shangjiID).style.display="none";
  153.         if(eval("document.n" + jibie + "_" + shangjiID).src.toLowerCase().indexOf("tminus.gif")>0)
  154.             eval("document.n" + jibie + "_" + shangjiID).src="/images/tree/tplus.gif";
  155.         else
  156.             eval("document.n" + jibie + "_" + shangjiID).src="/images/tree/lplus.gif";
  157.         folderClosedString = "";
  158.         for(j=0;j<jsArray.length;j++)
  159.         {
  160.             if((jsArray[j][0]==shangjiID))
  161.             {
  162.                 folderClosedString = jsArray[j][7];
  163.                 break;
  164.             }
  165.         }
  166.         if(folderClosedString=="")
  167.             eval("document.f" + jibie + "_" + shangjiID).src="/images/tree/folderclosed.gif";
  168.         else
  169.             eval("document.f" + jibie + "_" + shangjiID).src=folderClosedString;
  170.     }
  171. }
  172. </script>
  173. <base target="mainFrame">
  174. <style type="text/css">
  175. <!--
  176. a {
  177.     color: #0A0A0A;
  178. }
  179. -->
  180. </style>
  181. </head>
  182. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  183.    <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  184.     <tr>
  185.     <td align="center" valign="top">
  186.       <table width="100%" border="0" cellpadding="0" cellspacing="0">
  187.         <tr>
  188.           <td height="50" valign="top" background="../images/dy-back.gif">
  189.             <table width="100%" border="0" cellpadding="0" cellspacing="0">
  190.               <tr valign="middle">
  191.                 <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
  192.                 <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">系统目录管理</font></strong></td>
  193.                 <td align="right" nowrap="nowrap" valign="bottom">&nbsp;
  194.                    <!-- 群增<img src="../images/MulAdd.gif" onMouseOver="this.src='../images/MulAdd_a.gif';" onMouseOut="this.src='../images/MulAdd.gif';" border="0" height="22" width="59">&nbsp;-->
  195.                   <!--单增<img src="../images/Single.gif" onMouseOver="this.src='../images/Single_a.gif';" onMouseOut="this.src='../images/Single.gif';" border="0" height="22" width="59">&nbsp;-->
  196.                   <!-- 修改<img src="../images/Update.gif" onMouseOver="this.src='../images/Update_a.gif';" onMouseOut="this.src='../images/Update.gif';" border="0" height="22" width="59">&nbsp;-->
  197.                   <!-- 删除<img src="../images/Del.gif" onMouseOver="this.src='../images/Del_a.gif';" onMouseOut="this.src='../images/Del.gif';" border="0" height="22" width="59">&nbsp;-->
  198.                   <!-- 查看<img src="../images/Query.gif" onMouseOver="this.src='../images/Query_a.gif';" onMouseOut="this.src='../images/Query.gif';" border="0" height="22" width="59">&nbsp;-->
  199.                   <!-- 组合查询<img src="../images/GroupQuery.gif" onMouseOver="this.src='../images/GroupQuery_a.gif';" onMouseOut="this.src='../images/GroupQuery.gif';" border="0" height="22" width="79">&nbsp;-->
  200.                 </td>
  201.               </tr>
  202.             </table>
  203.           </td>
  204.         </tr>
  205.       </table>
  206. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  207.     <tr>
  208.         <td align="center" valign="top"><p>&nbsp;</p>
  209.             <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  210.                 <tr align="center" valign="top">
  211.                     <th bgcolor="<%=m_session.GetString("TitleColor")%>">
  212.                     系统目录管理
  213.                     </th>
  214.                 </tr>
  215.                 <tr align="left" valign="top">
  216.                     <td>
  217. <img src="/images/tree/home.gif" align="absbottom" border="0" width="19" height="19"><a href="/home.jsp"><%=SystemParament.GetCommpanyName()%></a>
  218. <a>(包括<%=SystemDirectoryManager.getSubSystemDirectoryCount(0)%>个子系统目录)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
  219. <a href="AddSystemDirectory.jsp">添加系统目录</a>
  220. <script language="javascript">
  221. <!--
  222. var jsArray = new Array();
  223. <%
  224. Vector vc = SystemDirectoryManager.getSystemDirectoryData();
  225. for(int row=0;row<vc.size();row++)
  226. {
  227.     String strTemp = "";
  228.     Vector hashtab = (Vector)vc.get(row);
  229.     for(int i=0;i<hashtab.size();i++)
  230.     {
  231.         if(i==2)
  232.         {
  233.             String strFarther = hashtab.get(i).toString();
  234.             strFarther = strFarther.substring(0,strFarther.length() - 1);
  235.             strFarther = strFarther.substring(strFarther.lastIndexOf("_") + 1);
  236.             strTemp += ","" + strFarther + """;
  237.         }
  238.         else
  239.             strTemp += ","" + hashtab.get(i).toString() + """;
  240.     }
  241.     out.println("jsArray[" + (row) + "]=new Array(" + strTemp.substring(1) + ");");
  242. }
  243. %>
  244. showtree(0,0,"");
  245. -->
  246. </script>
  247.                     </td>
  248.                 </tr>
  249.             </table>
  250.         </td>
  251.     </tr>
  252. </table>
  253. </body>
  254. </html>