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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import="java.util.*"%>
  3. <%@ page import="cn.js.fan.util.*"%>
  4. <%@ page import="cn.js.fan.module.cms.*"%>
  5. <%@ page import="com.redmoon.oa.pvg.*"%>
  6. <%@ page import="cn.js.fan.web.*"%>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  8. <html>
  9. <head>
  10. <title>管理文件柜权限</title>
  11. <link href="default.css" rel="stylesheet" type="text/css">
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  13. <style type="text/css">
  14. <!--
  15. .style4 {
  16. color: #FFFFFF;
  17. font-weight: bold;
  18. }
  19. -->
  20. </style>
  21. <script>
  22. function setPerson(deptCode, deptName, user, userRealName)
  23. {
  24. form1.name.value = user;
  25. form1.userRealName.value = userRealName;
  26. }
  27. function setRoles(roles, descs) {
  28. formRole.roleCodes.value = roles;
  29. formRole.roleDescs.value = descs
  30. }
  31. </script>
  32. </head>
  33. <body bgcolor="#FFFFFF" text="#000000">
  34. <jsp:useBean id="usergroupmgr" scope="page" class="com.redmoon.oa.pvg.UserGroupMgr"/>
  35. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  36. <%
  37. String dirCode = ParamUtil.get(request, "dirCode");
  38. Leaf leaf = new Leaf();
  39. leaf = leaf.getLeaf(dirCode);
  40. %>
  41. <table cellSpacing="0" cellPadding="0" width="100%">
  42.   <tbody>
  43.     <tr>
  44.       <td class="head">设置目录 <a href="dir_priv_m.jsp?dirCode=<%=StrUtil.UrlEncode(dirCode)%>"><%=leaf.getName()%></a> 权限</td>
  45.     </tr>
  46.   </tbody>
  47. </table>
  48. <br>
  49. <table style="BORDER-RIGHT: #a6a398 1px solid; BORDER-TOP: #a6a398 1px solid; BORDER-LEFT: #a6a398 1px solid; BORDER-BOTTOM: #a6a398 1px solid" cellspacing="0" cellpadding="3" width="50%" align="center">
  50.   <form name="formRole" method="post" action="dir_priv_m.jsp?op=setrole">
  51.     <tbody>
  52.       <tr>
  53.         <td width="88%" align="left" nowrap class="thead"><img src="images/tl.gif" align="absMiddle" width="10" height="15">角色</td>
  54.       </tr>
  55.       <%
  56. RoleMgr roleMgr = new RoleMgr();
  57. LeafPriv lp = new LeafPriv();
  58. Vector vrole = lp.getRolesOfLeafPriv(leaf.getCode());
  59. String roleCode;
  60. String roleCodes = "";
  61. String descs = "";
  62. Iterator irrole = vrole.iterator();
  63. while (irrole.hasNext()) {
  64. RoleDb rd = (RoleDb)irrole.next();
  65. roleCode = rd.getCode();
  66. if (roleCodes.equals(""))
  67. roleCodes += roleCode;
  68. else
  69. roleCodes += "," + roleCode;
  70. if (descs.equals(""))
  71. descs += rd.getDesc();
  72. else
  73. descs += "," + rd.getDesc();
  74. }
  75. %>
  76.       <tr class="row" style="BACKGROUND-COLOR: #ffffff">
  77.         <td align="left"><textarea name=roleDescs cols="60" rows="3"><%=descs%></textarea>
  78.             <input name="roleCodes" value="<%=roleCodes%>" type=hidden>
  79.             <input name="dirCode" value="<%=dirCode%>" type=hidden></td>
  80.       </tr>
  81.       <tr align="center" class="row" style="BACKGROUND-COLOR: #ffffff">
  82.         <td style="PADDING-LEFT: 10px"><input name="button2" type="button" class="singleboarder" onClick="showModalDialog('../role_multi_sel.jsp?roleCodes=<%=roleCodes%>',window.self,'dialogWidth:526px;dialogHeight:435px;status:no;help:no;')" value="选择角色">
  83.           &nbsp;&nbsp;&nbsp;&nbsp;
  84.           <input name="Submit3" type="submit" class="singleboarder" value=" 提 交 "></td>
  85.       </tr>
  86.     </tbody>
  87.   </form>
  88. </table>
  89. <%
  90. String code;
  91. String desc;
  92. UserGroupDb ugroup = new UserGroupDb();
  93. Vector result = ugroup.list();
  94. Iterator ir = result.iterator();
  95. %>
  96. <br>
  97. <br>
  98. <table style="BORDER-RIGHT: #a6a398 1px solid; BORDER-TOP: #a6a398 1px solid; BORDER-LEFT: #a6a398 1px solid; BORDER-BOTTOM: #a6a398 1px solid" cellSpacing="0" cellPadding="3" width="50%" align="center">
  99.   <tbody>
  100.     <tr>
  101.       <td class="thead" style="PADDING-LEFT: 10px" noWrap width="26%">用户组名称</td>
  102.       <td class="thead" noWrap width="40%"><img src="images/tl.gif" align="absMiddle" width="10" height="15">描述</td>
  103.       <td width="34%" noWrap class="thead"><img src="images/tl.gif" align="absMiddle" width="10" height="15">操作</td>
  104.     </tr>
  105. <%
  106. while (ir.hasNext()) {
  107.   UserGroupDb ug = (UserGroupDb)ir.next();
  108. code = ug.getCode();
  109. desc = ug.getDesc();
  110. %>
  111.     <tr class="row" style="BACKGROUND-COLOR: #ffffff">
  112.       <td style="PADDING-LEFT: 10px">&nbsp;<img src="images/arrow.gif" align="absmiddle">&nbsp;<%=code%></td>
  113.       <td><%=desc%></td>
  114.       <td>
  115.   <a href="dir_priv_m.jsp?op=add&dirCode=<%=StrUtil.UrlEncode(leaf.getCode())%>&name=<%=StrUtil.UrlEncode(code)%>&type=<%=LeafPriv.TYPE_USERGROUP%>">[ 添加 ]</a></td>
  116.     </tr>
  117. <%}%>
  118.   </tbody>
  119. </table>
  120. <br>
  121. <table width="395"  border="0" align="center" cellpadding="0" cellspacing="0"  style="BORDER-RIGHT: #a6a398 1px solid; BORDER-TOP: #a6a398 1px solid; BORDER-LEFT: #a6a398 1px solid; BORDER-BOTTOM: #a6a398 1px solid">
  122.   <tr>
  123.     <td width="329" class="thead">添加用户</td>
  124.   </tr>
  125.   <form name="form1" action="dir_priv_m.jsp?op=add" method=post>
  126.   <tr>
  127.     <td height="25" align="center">
  128. 用户名:
  129.   <input name="userRealName" value="" readonly>
  130.   <input name="name" value="" type="hidden"><input type=hidden name=type value=1>
  131.   <input type=hidden name=dirCode value="<%=leaf.getCode()%>">
  132.   &nbsp;
  133. <INPUT type=image 
  134. onclick="javascript:location.href='user_group_op.jsp';" src="images/btn_add.gif" align="middle" width=80 
  135. height=20>
  136. &nbsp;<a href="#" onClick="javascript:showModalDialog('../user_sel.jsp',window.self,'dialogWidth:480px;dialogHeight:320px;status:no;help:no;')">选择用户</a></td>
  137.   </tr></form>
  138. </table>
  139. <br>
  140. </body>
  141. </html>