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

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="java.util.*,com.gforce.gfoa.*,com.gforce.currency.*" %>
  3. <%
  4. Session m_session = new Session(session);
  5. int intUserID = m_session.GetInt("UserID");
  6. String strRightPages=m_session.GetString("RightPages");
  7. if(intUserID<1||strRightPages.length()<1)
  8. {
  9.     out.println("<script language="javascript">alert("您没有登录或者已经超时退出,请重新登录!");top.location="/LogOut.jsp";</script>");
  10.     out.close();
  11. }
  12. %>
  13. <html>
  14. <head>
  15. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  16. <title>左部导航页面——</title>
  17. <link href="css/txt.jsp" rel="stylesheet" type="text/css">
  18. <SCRIPT LANGUAGE="JavaScript">
  19. <!--
  20. var jsArray = new Array();
  21. <%
  22. SystemDirectoryManager sysmanager = new SystemDirectoryManager();
  23. Vector vc = sysmanager.getSysDirData(strRightPages);
  24. for(int row=0;row<vc.size();row++)
  25. {
  26.     String strTemp = "";
  27.     Vector hashtab = (Vector)vc.get(row);
  28.     for(int i=0;i<hashtab.size();i++)
  29.     {
  30.         if(i==2)
  31.         {
  32.             String strFarther = hashtab.get(i).toString();
  33.             strFarther = strFarther.substring(0,strFarther.length() - 1);
  34.             strFarther = strFarther.substring(strFarther.lastIndexOf("_") + 1);
  35.             strTemp += ","" + strFarther + """;
  36.         }
  37.         else
  38.             strTemp += ","" + hashtab.get(i).toString() + """;
  39.     }
  40.     out.println("jsArray[" + (row) + "]=new Array(" + strTemp.substring(1) + ","" + hashtab.get(2).toString() + "");");
  41. }
  42. %>
  43. function hasfile(shangjiid)
  44. {
  45.   for(var i = 0;i<jsArray.length;i++)
  46.   {
  47.     if(jsArray[i][13].indexOf("_" + shangjiid.toString() + "_" )>=0 && jsArray[i][8].length>0)
  48.     {
  49.       return true;
  50.     }
  51.   }
  52.   return false;
  53. }
  54. function showtree(jibie,shangjiID,bline)
  55. {
  56.     if(jibie<1)
  57.     {
  58.         document.write("<div id="t" + jibie + "_" + shangjiID +"" style="display:;line-height: 10px;">");
  59.     }
  60.     else
  61.     {
  62.         document.write("<div id="t" + jibie + "_" + shangjiID +"" style="display:none;line-height: 10px;">");
  63.     }
  64.     var i,notislast,j,haschild;
  65.     notislast=false;
  66.     haschild=false;
  67.     for(i=0;i<jsArray.length;i++)
  68.     {
  69.         if((jsArray[i][3]==jibie + 1)&&(jsArray[i][2]==shangjiID.toString()))
  70.         {
  71.             if(jsArray[i][12]=="true" && (jsArray[i][8].length>0 || hasfile(jsArray[i][0])) )
  72.             {
  73.                 var j,maxorder=0;
  74.                 haschild=false;
  75.                 for(j=0;j<jsArray.length;j++)
  76.                 {
  77.                     if((jsArray[j][3]==jibie + 1)&&(jsArray[j][2]==shangjiID.toString())&&parseInt(maxorder,10)<parseInt(jsArray[j][5],10))
  78.                     {
  79.                         maxorder=jsArray[j][5];
  80.                     }
  81.                 }
  82.                 for(j=0;j<jsArray.length;j++)
  83.                 {
  84.                     if((jsArray[j][3]==jibie + 2)&&(jsArray[j][2]==jsArray[i][0]))
  85.                     {
  86.                         haschild=true;
  87.                         break;
  88.                     }
  89.                 }
  90.                 bline = bline.substr(0,jibie);
  91.                 for(j=0;j<bline.length;j++)
  92.                     if(bline.substr(j,1)=="1")
  93.                         document.write("<img align="absbottom" src="/images/tree/i.gif" border="0" width="19" height="19">");
  94.                     else
  95.                         document.write("<img align="absbottom" src="/images/tree/white.gif" border="0" width="19" height="19">");
  96.                 if(parseInt(maxorder,10)>parseInt(jsArray[i][5],10))
  97.                 {
  98.                     if(haschild)
  99.                     {
  100.                         if(jsArray[i][10]=="true")
  101.                             if(jsArray[i][7]=="")
  102.                                 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/tplus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom"  src="/images/tree/folderclosed.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><br>");
  103.                             else
  104.                                 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/tplus.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><br>");
  105.                         else
  106.                             if(jsArray[i][7]=="")
  107.                                 document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ")" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom"  src="/images/tree/tplus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom"  src="/images/tree/folderclosed.gif" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + "">" + jsArray[i][1] + "</a><br>");
  108.                             else
  109.                                 document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ")" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom"  src="/images/tree/tplus.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><br>");
  110.                     }
  111.                     else
  112.                     {
  113.                         if(jsArray[i][10]=="true")
  114.                             if(jsArray[i][7]=="")
  115.                                 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><br>");
  116.                             else
  117.                                 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><br>");
  118.                         else
  119.                             if(jsArray[i][7]=="")
  120.                                 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><br>");
  121.                             else
  122.                                 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><br>");
  123.                     }
  124.                     bline += "1".toString();
  125.                     showtree(jibie + 1,jsArray[i][0],bline);
  126.                 }
  127.                 else
  128.                 {
  129.                     if(haschild)
  130.                     {
  131.                         if(jsArray[i][10]=="true")
  132.                             if(jsArray[i][7]=="")
  133.                                 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/lplus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom"  src="/images/tree/folderclosed.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><br>");
  134.                             else
  135.                                 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/lplus.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><br>");
  136.                         else
  137.                             if(jsArray[i][7]=="")
  138.                                 document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ")" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom"  src="/images/tree/lplus.gif" border="0" width="19" height="19" name="n" + (jibie + 1).toString() +"_" + jsArray[i][0] + ""><img align="absbottom"  src="/images/tree/folderclosed.gif" border="0" width="19" height="19" name="f" + (jibie + 1).toString() +"_" + jsArray[i][0] + "">" + jsArray[i][1] + "</a><br>");
  139.                             else
  140.                                 document.write("<a href="javascript:clicktree(" + (jibie + 1).toString() +"," + jsArray[i][0] + ")" target="_self" title=""+ jsArray[i][11] +""><img align="absbottom"  src="/images/tree/lplus.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><br>");
  141.                     }
  142.                     else
  143.                     {
  144.                         if(jsArray[i][10]=="true")
  145.                             if(jsArray[i][7]=="")
  146.                                 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><br>");
  147.                             else
  148.                                 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><br>");
  149.                         else
  150.                             if(jsArray[i][7]=="")
  151.                                 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><br>");
  152.                             else
  153.                                 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><br>");
  154.                     }
  155.                     bline += "0".toString();
  156.                     showtree(jibie + 1,jsArray[i][0],bline);
  157.                 }
  158.             }
  159.         }
  160.     }
  161.     document.write("</div>");
  162. }
  163. function clicktree(jibie,shangjiID)
  164. {
  165.     if(shangjiID>0)
  166.     if(eval("t" + jibie + "_" + shangjiID).style.display=="none")
  167.     {
  168.         eval("t" + jibie + "_" + shangjiID).style.display="";
  169.         if(eval("document.n" + jibie + "_" + shangjiID).src.toLowerCase().indexOf("tplus.gif")>0)
  170.             eval("document.n" + jibie + "_" + shangjiID).src="/images/tree/tminus.gif";
  171.         else
  172.             eval("document.n" + jibie + "_" + shangjiID).src="/images/tree/lminus.gif";
  173.         folderOpenString = "";
  174.         for(j=0;j<jsArray.length;j++)
  175.         {
  176.             if((jsArray[j][0]==shangjiID))
  177.             {
  178.                 folderOpenString = jsArray[j][6];
  179.                 break;
  180.             }
  181.         }
  182.         if(folderOpenString=="")
  183.             eval("document.f" + jibie + "_" + shangjiID).src="/images/tree/folderopen.gif";
  184.         else
  185.             eval("document.f" + jibie + "_" + shangjiID).src=folderOpenString;
  186.     }
  187.     else
  188.     {
  189.         eval("t" + jibie + "_" + shangjiID).style.display="none";
  190.         if(eval("document.n" + jibie + "_" + shangjiID).src.toLowerCase().indexOf("tminus.gif")>0)
  191.             eval("document.n" + jibie + "_" + shangjiID).src="/images/tree/tplus.gif";
  192.         else
  193.             eval("document.n" + jibie + "_" + shangjiID).src="/images/tree/lplus.gif";
  194.         folderClosedString = "";
  195.         for(j=0;j<jsArray.length;j++)
  196.         {
  197.             if((jsArray[j][0]==shangjiID))
  198.             {
  199.                 folderClosedString = jsArray[j][7];
  200.                 break;
  201.             }
  202.         }
  203.         if(folderClosedString=="")
  204.             eval("document.f" + jibie + "_" + shangjiID).src="/images/tree/folderclosed.gif";
  205.         else
  206.             eval("document.f" + jibie + "_" + shangjiID).src=folderClosedString;
  207.     }
  208. }
  209. //-->
  210. </SCRIPT>
  211. <base target="mainFrame">
  212. <style type="text/css">
  213. <!--
  214. a {
  215.     color: #0A0A0A;
  216. }
  217. .treeback {
  218. background-image: url(images/zjm05.gif);
  219. background-repeat: repeat-y;
  220. }
  221. -->
  222. </style>
  223. </head>
  224. <body leftmargin="0" topmargin="0" bgcolor="<%=m_session.GetString("BackColor")%>">
  225.         <table border="0" cellpadding="0" cellspacing="0" style="width:100%;height:98%;">
  226.           <tr>
  227.             <td><img src="images/zjm04.gif" width="196" height="48"></td>
  228.           </tr>
  229.           <tr>
  230.             <td height="100%" align="center" valign="top" class="treeback"><br>
  231.               <table width="85%" border="0" cellpadding="0" cellspacing="0">
  232.                 <tr>
  233.                   <td align="left" valign="top" nowrap="nowrap">
  234.                     <img src="/images/tree/home.gif" align="absbottom" border="0" width="19" height="19"><a href="/home.jsp"><%=SystemParament.GetSystemName()%></a>
  235.                   <script language="javascript">
  236.                   <!--
  237.                     showtree(0,0,"");
  238.                   -->
  239.                   </script>
  240.                   </td>
  241.                 </tr>
  242.               </table>
  243.             </td>
  244.           </tr>
  245.           <tr>
  246.             <td><img src="images/zjm06.gif" width="196" height="30"></td>
  247.           </tr>
  248.         </table>
  249. </body>
  250. </html>