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

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.web.*" %>
  6. <%@ page import="com.redmoon.oa.netdisk.*" %>
  7. <%@ page import="com.redmoon.oa.pvg.*" %>
  8. <%@ page import="cn.js.fan.util.*" %>
  9. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  10. <html>
  11. <head>
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  13. <title>目录</title>
  14. <LINK href="default.css" type=text/css rel=stylesheet>
  15. <script>
  16. function findObj(theObj, theDoc)
  17. {
  18.   var p, i, foundObj;
  19.   
  20.   if(!theDoc) theDoc = document;
  21.   if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  22.   {
  23.     theDoc = parent.frames[theObj.substring(p+1)].document;
  24.     theObj = theObj.substring(0,p);
  25.   }
  26.   if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  27.   for (i=0; !foundObj && i < theDoc.forms.length; i++) 
  28.     foundObj = theDoc.forms[i][theObj];
  29.   for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
  30.     foundObj = findObj(theObj,theDoc.layers[i].document);
  31.   if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  32.   
  33.   return foundObj;
  34. }
  35. function ShowChild(imgobj, name)
  36. {
  37. var tableobj = findObj("childof"+name);
  38. if (tableobj.style.display=="none")
  39. {
  40. tableobj.style.display = "";
  41. if (imgobj.src.indexOf("i_puls-root-1.gif")!=-1)
  42. imgobj.src = "images/i_puls-root.gif";
  43. if (imgobj.src.indexOf("i_plus-1-1.gif")!=-1)
  44. imgobj.src = "images/i_plus2-2.gif";
  45. if (imgobj.src.indexOf("i_plus-1.gif")!=-1)
  46. imgobj.src = "images/i_plus2-1.gif";
  47. }
  48. else
  49. {
  50. tableobj.style.display = "none";
  51. if (imgobj.src.indexOf("i_puls-root.gif")!=-1)
  52. imgobj.src = "images/i_puls-root-1.gif";
  53. if (imgobj.src.indexOf("i_plus2-2.gif")!=-1)
  54. imgobj.src = "images/i_plus-1-1.gif";
  55. if (imgobj.src.indexOf("i_plus2-1.gif")!=-1)
  56. imgobj.src = "images/i_plus-1.gif";
  57. }
  58. }
  59. </script>
  60. </head>
  61. <body>
  62. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  63. <jsp:useBean id="dir" scope="page" class="com.redmoon.oa.netdisk.PublicDirectory"/>
  64. <%
  65. String root_code = ParamUtil.get(request, "root_code");
  66. if (root_code.equals(""))
  67. {
  68. root_code = "root";
  69. }
  70. %>
  71. <Script>
  72. var root_code = "<%=root_code%>";
  73. // 使框架的bottom能得到此root_code
  74. function getRootCode() {
  75. return root_code;
  76. }
  77. </Script>
  78. <%
  79. String op = ParamUtil.get(request, "op");
  80. if (op.equals("AddChild")) {
  81. boolean re = false;
  82. try {
  83. re = dir.AddChild(request);
  84. }
  85. catch (ErrMsgException e) {
  86. out.print(StrUtil.Alert(e.getMessage()));
  87. }
  88. if (!re) {
  89. out.print(StrUtil.Alert("添加节点失败,请检查编码是否重复!"));
  90. }
  91. }
  92. if (op.equals("del")) {
  93. String delcode = ParamUtil.get(request, "delcode");
  94. try {
  95. dir.del(request, delcode);
  96. out.print(StrUtil.Alert("删除成功!"));
  97. }
  98. catch (ErrMsgException e) {
  99. out.print(StrUtil.Alert(e.getMessage()));
  100. }
  101. }
  102. if (op.equals("modify")) {
  103. boolean re = true;
  104. try {
  105. re = dir.update(request);
  106. }
  107. catch (ErrMsgException e) {
  108. out.print(StrUtil.Alert(e.getMessage()));
  109. }
  110. if (re)
  111. out.print(StrUtil.Alert("修改完成"));
  112. }
  113. if (op.equals("move")) {
  114. try {
  115. dir.move(request);
  116. }
  117. catch (ErrMsgException e) {
  118. out.print(StrUtil.Alert(e.getMessage()));
  119. }
  120. }
  121. if (op.equals("removecache")) {
  122. String curcode = ParamUtil.get(request, "code");
  123. LeafChildrenCacheMgr.remove(curcode);
  124. out.print(StrUtil.Alert(curcode + "缓存已被清除!"));
  125. }
  126. PublicLeaf leaf = dir.getLeaf(root_code);
  127. String root_name = leaf.getName();
  128. int root_layer = leaf.getLayer();
  129. String root_description = leaf.getDescription();
  130. boolean isHome = false;
  131. %>
  132. <table width='100%' cellpadding='0' cellspacing='0' >
  133.   <tr>
  134.     <td class="head">管理&nbsp;<%=root_name%>&nbsp;&nbsp;<a target="_parent" href="../netdisk/netdisk_public_share_frame.jsp">浏览视图</a></td>
  135.   </tr>
  136. </table>
  137. <br>
  138. <TABLE class="frame_gray"  
  139. cellSpacing=0 cellPadding=0 width="95%" align=center>
  140.   <TBODY>
  141.     <TR>
  142.       <TD height=200 valign="top" bgcolor="#FFFBFF">
  143. <table class="tbg1" cellspacing=0 cellpadding=0 width="100%" align=center onMouseOver="this.className='tbg1sel'" onMouseOut="this.className='tbg1'" 
  144. border=0>
  145.           <tbody>
  146.             <tr>
  147.               <td width="66%" height="13" align=left nowrap>              &nbsp;&nbsp;&nbsp;&nbsp;                             </td>
  148.             <td width="34%" align=right nowrap>>>&nbsp;<%=root_name%>&nbsp;&nbsp;<a target="_parent" href="document_list_m.jsp?dir_code=<%=StrUtil.UrlEncode(root_code)%>&dir_name=<%=StrUtil.UrlEncode(root_name)%>"></a>&nbsp;<a target=_parent href='netdisk_public_dir_priv_m.jsp?dirCode=<%=StrUtil.UrlEncode(root_code)%>'>权限</a>&nbsp;&nbsp;<a target=dirbottomFrame href="netdisk_public_dir_bottom.jsp?parent_code=<%=StrUtil.UrlEncode(root_code, "utf-8")%>&parent_name=<%=StrUtil.UrlEncode(root_name, "utf-8")%>&op=AddChild">添子目录</a> <a target="dirbottomFrame" href="netdisk_public_dir_bottom.jsp?op=modify&code=<%=StrUtil.UrlEncode(root_code, "utf-8")%>&name=<%=StrUtil.UrlEncode(root_name,"utf-8")%>&description=<%=StrUtil.UrlEncode(root_description,"utf-8")%>">修改</a> <!--<a target=_self href="#" onClick="if (window.confirm('您确定要删除<%=root_name%>吗?')) window.location.href='dir_top.jsp?op=del&delcode=<%=root_code%>'">删除</a>-->   </td>
  149.             </tr>
  150.           </tbody>
  151.         </table>
  152. <%
  153. PublicDirectoryView tv = new PublicDirectoryView(leaf);
  154. tv.list(out);
  155. %></TD>
  156.     </TR>
  157.   </TBODY>
  158. </TABLE>
  159. </body>
  160. </html>