dir_sub.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:3k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ page import="java.io.InputStream" %>
  3. <%@ page import="java.util.*" %>
  4. <%@ page import="cn.js.fan.db.*" %>
  5. <%@ page import="cn.js.fan.util.*" %>
  6. <%@ page import="cn.js.fan.module.cms.*" %>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <title>无限级目录</title>
  12. <LINK href="../common.css" type=text/css rel=stylesheet>
  13. <LINK href="default.css" type=text/css rel=stylesheet>
  14. <script>
  15. function findObj(theObj, theDoc)
  16. {
  17.   var p, i, foundObj;
  18.   
  19.   if(!theDoc) theDoc = document;
  20.   if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  21.   {
  22.     theDoc = parent.frames[theObj.substring(p+1)].document;
  23.     theObj = theObj.substring(0,p);
  24.   }
  25.   if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  26.   for (i=0; !foundObj && i < theDoc.forms.length; i++) 
  27.     foundObj = theDoc.forms[i][theObj];
  28.   for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
  29.     foundObj = findObj(theObj,theDoc.layers[i].document);
  30.   if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  31.   
  32.   return foundObj;
  33. }
  34. function ShowChild(imgobj, name)
  35. {
  36. var tableobj = findObj("childof"+name);
  37. if (tableobj.style.display=="none")
  38. {
  39. tableobj.style.display = "";
  40. if (imgobj.src.indexOf("i_puls-root-1.gif")!=-1)
  41. imgobj.src = "images/i_puls-root.gif";
  42. if (imgobj.src.indexOf("i_plus-1-1.gif")!=-1)
  43. imgobj.src = "images/i_plus2-2.gif";
  44. if (imgobj.src.indexOf("i_plus-1.gif")!=-1)
  45. imgobj.src = "images/i_plus2-1.gif";
  46. }
  47. else
  48. {
  49. tableobj.style.display = "none";
  50. if (imgobj.src.indexOf("i_puls-root.gif")!=-1)
  51. imgobj.src = "images/i_puls-root-1.gif";
  52. if (imgobj.src.indexOf("i_plus2-2.gif")!=-1)
  53. imgobj.src = "images/i_plus-1-1.gif";
  54. if (imgobj.src.indexOf("i_plus2-1.gif")!=-1)
  55. imgobj.src = "images/i_plus-1.gif";
  56. }
  57. }
  58. </script>
  59. </head>
  60. <body>
  61. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  62. <%
  63. if (!privilege.isUserPrivValid(request, PrivDb.PRIV_ADMIN))
  64. {
  65. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  66. return;
  67. }
  68. %>
  69. <%
  70. String root_code = ParamUtil.get(request, "root_code");
  71. if (root_code.equals(""))
  72. {
  73. root_code = "root";
  74. }
  75. Directory dir = new Directory();
  76. Leaf rootleaf = dir.getLeaf(root_code);
  77. String root_name = rootleaf.getName();
  78. %>
  79. <table width='100%' cellpadding='0' cellspacing='0' >
  80.   <tr>
  81.     <td class="head">管理&nbsp;<%=root_name%>&nbsp;&nbsp;<a href="dir_sub_all.jsp?root_code=<%=StrUtil.UrlEncode(root_code)%>">简单模式</a></td>
  82.   </tr>
  83. </table>
  84. <br>
  85. <TABLE class="frame_gray"  
  86. cellSpacing=0 cellPadding=0 width="95%" align=center>
  87.   <TBODY>
  88.     <TR>
  89.       <TD height=200 valign="top" bgcolor="#FFFBFF">
  90. <%
  91. DirectoryView tv = new DirectoryView(rootleaf);
  92. tv.list(out);
  93. %>
  94. </TD>
  95.     </TR>
  96.   </TBODY>
  97. </TABLE>
  98. </body>
  99. </html>