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

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="com.redmoon.oa.netdisk.*" %>
  5. <%@ page import="cn.js.fan.util.*" %>
  6. <%@ page import="cn.js.fan.web.*" %>
  7. <%@ page import="com.redmoon.oa.pvg.*" %>
  8. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  12. <title></title>
  13. <LINK href="default.css" type=text/css rel=stylesheet>
  14. </head>
  15. <body>
  16. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  17. <%
  18. if (!privilege.isUserPrivValid(request, "read")) {
  19.     out.print(SkinUtil.makeErrMsg(request, SkinUtil.LoadString(request, "pvg_invalid")));
  20. return;
  21. }
  22. %>
  23. <%
  24. String parent_code = ParamUtil.get(request, "parent_code");
  25. if (parent_code.equals(""))
  26. parent_code = "root";
  27. String parent_name = ParamUtil.get(request, "parent_name");
  28. String code = ParamUtil.get(request, "code");
  29. String name = ParamUtil.get(request, "name");
  30. String description = ParamUtil.get(request, "description");
  31. String op = ParamUtil.get(request, "op");
  32. boolean isHome = false;
  33. String mappingAddress = "";
  34. int type = 0;
  35. if (op.equals("")) {
  36. op = "AddChild";
  37. }
  38. if (op.equals("AddChild")) {
  39. PublicLeafPriv lp = new PublicLeafPriv(parent_code);
  40. if (!lp.canUserManage(privilege.getUser(request))) {
  41. out.print(SkinUtil.makeErrMsg(request, SkinUtil.LoadString(request, "pvg_invalid")));
  42. return;
  43. }
  44. }
  45. PublicLeaf leaf = null;
  46. if (op.equals("modify")) {
  47. PublicLeafPriv lp = new PublicLeafPriv(code);
  48. if (!lp.canUserManage(privilege.getUser(request))) {
  49. out.print(SkinUtil.makeErrMsg(request, SkinUtil.LoadString(request, "pvg_invalid")));
  50. return;
  51. }
  52. PublicDirectory dir = new PublicDirectory();
  53. leaf = dir.getLeaf(code);
  54. name = leaf.getName();
  55. description = leaf.getDescription();
  56. type = leaf.getType();
  57. isHome = leaf.getIsHome();
  58. mappingAddress = leaf.getMappingAddress();
  59. }
  60. %>
  61. <TABLE 
  62. style="BORDER-RIGHT: #a6a398 1px solid; BORDER-TOP: #a6a398 1px solid; BORDER-LEFT: #a6a398 1px solid; BORDER-BOTTOM: #a6a398 1px solid" 
  63. cellSpacing=0 cellPadding=3 width="95%" align=center>
  64.   <!-- Table Head Start-->
  65.   <TBODY>
  66.     <TR>
  67.       <TD class=thead style="PADDING-LEFT: 10px" noWrap width="70%">目录增加或修改</TD>
  68.     </TR>
  69.     <TR class=row style="BACKGROUND-COLOR: #fafafa">
  70.       <TD align="center" style="PADDING-LEFT: 10px"><table class="frame_gray" width="415" border="0" cellpadding="0" cellspacing="1">
  71.         <tr>
  72.           <td width="411" align="center"><table width="98%">
  73.             <form name="form1" method="post" action="netdisk_public_dir_top.jsp?op=<%=op%>" target="dirmainFrame">
  74.               <tr>
  75.                 <td width="78" rowspan="6" align="left" valign="top"><br>
  76.                   当前结点:<br>
  77.                     <font color=blue><%=parent_name.equals("")?"根结点":parent_name%></font> </td>
  78.                 <td width="312" align="left"> 编码
  79.                     <input name="code" value="<%=code%>" <%=op.equals("modify")?"readonly":""%>>                </td>
  80.               </tr>
  81.               <tr>
  82.                 <td align="left">名称
  83.                     <input name="name" value="<%=name%>"></td>
  84.               </tr>
  85.               <tr>
  86.                 <td align="left">描述
  87.                     <input name="description" value="<%=StrUtil.getNullStr(description)%>">
  88.                     <input type=hidden name=parent_code value="<%=parent_code%>">                    </td>
  89.               </tr>
  90.               
  91.               <tr>
  92.                 <td align="left">映射地址<input name="mappingAddress" value="<%=StrUtil.getNullStr(mappingAddress)%>"></td>
  93.               </tr>
  94.               <tr>
  95.                 <td align="left"><span class="unnamed2">
  96.                   <%if (op.equals("modify")) {%>
  97.                   <script>
  98.   var bcode = "<%=leaf.getCode()%>";
  99.       </script>
  100. <%if (op.equals("modify") && !leaf.getCode().equals(PublicLeaf.ROOTCODE)) {%>   
  101. &nbsp;父结点:
  102. <select name="parentCode">
  103. <%
  104. PublicLeaf rootlf = leaf.getLeaf("root");
  105. PublicDirectoryView dv = new PublicDirectoryView(rootlf);
  106. dv.ShowDirectoryAsOptionsWithCode(out, rootlf, rootlf.getLayer());
  107. %>
  108. </select>
  109. <script>
  110. form1.parentCode.value = "<%=leaf.getParentCode()%>";
  111. </script>
  112. <%}else{%>
  113. <input type="hidden" name="parentCode" value="<%=leaf.getParentCode()%>">
  114. <%}%>
  115. &nbsp;
  116. <%}%>
  117.                 </span></td>
  118.               </tr>
  119.               
  120.               <tr>
  121.                 <td align="center"><input name="Submit" type="submit" class="singleboarder" value="提交">
  122.                   &nbsp;&nbsp;&nbsp;
  123.                   <input name="Submit" type="reset" class="singleboarder" value="重置">
  124.                   &nbsp;&nbsp;&nbsp;</td>
  125.               </tr>
  126.             </form>
  127.           </table></td>
  128.         </tr>
  129.       </table>
  130.       </TD>
  131.     </TR>
  132.     <!-- Table Body End -->
  133.     <!-- Table Foot -->
  134.     <TR>
  135.       <TD class=tfoot align=right><DIV align=right> </DIV></TD>
  136.     </TR>
  137.     <!-- Table Foot -->
  138.   </TBODY>
  139. </TABLE>
  140. </body>
  141. </html>