directory_modify.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:10k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%@ taglib uri="/vnex_directory.tld" prefix="directory" %>
  3. <%@ page import="com.vnex.intranet.directory.proxy.DirectoryProxyBean" %>
  4. <%@ page import="com.vnex.intranet.directory.proxy.DirectoryPermissionProxyBean" %>
  5. <%@ page import="com.vnex.intranet.directory.value.DirectoryValueBean" %>
  6. <%@ page import="com.vnex.intranet.directory.value.FileValueBean" %>
  7. <%@ taglib uri="/vnex_hr.tld" prefix="emp" %>
  8. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  9. <jsp:useBean id="dPermissionProxy" class="com.vnex.intranet.directory.proxy.DirectoryPermissionProxyBean" scope="application"/>
  10. <jsp:useBean id="dProxy" class="com.vnex.intranet.directory.proxy.DirectoryProxyBean" scope="application"/>
  11. <jsp:useBean id="BusinessName"  class="com.vnex.intranet.pub.BusinessSession"  scope="session"/>
  12. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  13. <HTML><jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  14. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  15. <script language="JavaScript1.2" src="/vnex/util/popSelect.js"></script>
  16. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_leader.js"></script>
  17. <script language="JavaScript1.2" src="/vnex/util/strutil.js"></script>
  18. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  19. <script language="JavaScript1.2" src="/vnex/util/validate.js"></script>
  20. <script language="JavaScript1.2">
  21. function dosubmit()
  22. {
  23.    if(isEmpty(form1.directoryName.value) || isEmptyStr(form1.directoryName.value) )
  24.    {
  25. alert("目录名称不能为空!");
  26. form1.directoryName.focus();
  27. return;
  28.    }
  29. if (isInvalidateLen(form1.directoryName.value,30))
  30. {
  31. alert("目录名称长度不能大于30!");
  32. form1.directoryName.focus();
  33. return;
  34. }
  35.    selectAll(document.forms[0].selectedIDList);
  36.    selectAll(document.forms[0].selectedIDListWrite);
  37.    form1.action="/mainctrl/directory/management/directory_modify_process";
  38.    form1.submit();
  39. }
  40. </script>
  41. <%
  42.    int i = 0;
  43.    int userId = BusinessName.getEmpId();
  44.    int id = Integer.parseInt(request.getParameter("id"));
  45.    int isLeaf = Integer.parseInt(request.getParameter("isLeaf"));
  46.    
  47.    if (!dPermissionProxy.isCreator(id,userId)){
  48.         response.sendRedirect("/mainctrl/directory/directory_deny?id="+id+"&type=modify");
  49.         return;
  50.    }
  51.         
  52.    DirectoryValueBean tmpBean = dProxy.getDirectoryInfo(id);   
  53.    int[] readers = dPermissionProxy.getReadRight(id);
  54.    int[] writers = dPermissionProxy.getWriteRight(id);   
  55. %>
  56. <DIV align=center>
  57. <form name="form1" method="post">
  58.   <input type=hidden name="id" value="<%= id%>">
  59.   <input type=hidden name="superId" value="<%=request.getParameter("superId")%>">
  60.   <input type=hidden name="isLeaf" value="<%=isLeaf%>">
  61.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  62.     <TBODY>
  63.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" /> 
  64.     <TR>
  65.         <TD colSpan=3 align="center" class="iframestyle" valign="top">
  66.           <br>
  67.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  68.             <tr valign="top" bgcolor="#fafafa">
  69.               <td bgcolor="#fafafa" >
  70.                   <table width="600" border="0" cellpadding="2" cellspacing="0">
  71.                     <tr>
  72.                     <td bgcolor="#666666"><font class=strongw>
  73. <directory:DirectoryNaviBar1 isAdmin="true"/>目录修改</font></td>
  74.                     </tr>
  75.                   </table>
  76.                   <table width="600" border="0" cellpadding="2" cellspacing="1" class=title>
  77.                     <tr bgcolor="#fafafa">
  78.                       <td width="115"><font class=strong>&nbsp;目录名称:</font></td>
  79.                       
  80.                     <td width="474"> 
  81.                       <input type="text" class=text name="directoryName" value="<%= tmpBean.getDirectoryName() %>" maxlength="30">&nbsp;
  82.                             *&nbsp; (注:带*为必填内容) 
  83.                     </td>
  84.                     </tr>
  85.                     <tr bgcolor="#e0e0e0">
  86.                       <td width="115"><font class=strong>&nbsp;是否叶子结点:</font></td>
  87.                       <td width="474">
  88.                         <input type="radio" name="isLeaf" value="0" disabled <%= (tmpBean.getIsLeaf() == 1)? "checked" : "" %>>是
  89.                         <input type="radio" name="isLeaf" value="1" disabled <%= (tmpBean.getIsLeaf() == 0)? "checked" : "" %>>否</td>
  90.                     </tr>
  91.                     <tr bgcolor="#fafafa">
  92.                       <td width="115"><font class=strong>&nbsp;限制读权限:</font></td>
  93.                       <td width="474">
  94.                         <input type="radio" name="readControl" onclick="form1.selectedIDList.disabled=false;" value="1" <%= (tmpBean.getControlRead() == 1)? "checked" : "" %>>是
  95.                         <input type="radio" onclick="form1.selectedIDList.disabled=true;" name="readControl" value="0" <%= (tmpBean.getControlRead() == 0)? "checked" : "" %>>否</td>
  96.                     </tr>
  97.                     <tr bgcolor="#e0e0e0">
  98.                       <td width="115"><font class=strong>&nbsp;分配读权限:</font></td>
  99.                       <td width="474">
  100.                         <input type="hidden" name="updated" value="false">
  101.                         <input type="hidden" name="tempHidden" value="">
  102.                         <select name="selectedIDList"  size="6" multiple style="width:260" <%= (tmpBean.getControlRead() == 0)? "disabled" : "" %>>
  103.                         <% if (readers != null){ %>
  104.                         <emp:EmployeeList empIds='<%= readers%>'>
  105.                         <vnex:items>
  106.                         <option value="<emp:EmployeeAttribute attribute="id"/>;null">
  107.                         <emp:EmployeeAttribute attribute="employee_name"/>&nbsp;&nbsp;&nbsp;
  108.                         </option>
  109.                         </vnex:items>
  110.                         </emp:EmployeeList>
  111.                         <% } %>
  112.                         </select>                        
  113.                         <input type="button" style="width:70px" name="Submit1" value="按部门选择" class="file" onClick="javascript:addList(selectedIDList)">&nbsp;
  114.                         <input type="button"  name="Submit5" value="删除" class="file" onClick="javascript:remove1(selectedIDList)">
  115.                       </td>
  116.                     </tr>
  117.                     <tr bgcolor="#fafafa">
  118.                       <td width="115"><font class=strong>&nbsp;限制写权限:</font></td>
  119.                       <td width="474">
  120.                         <input type="radio" onclick="form1.selectedIDListWrite.disabled=false;" name="writeControl" value="1" <%= (tmpBean.getControlWrite() == 1)? "checked" : "" %>>是
  121.                         <input type="radio" onclick="form1.selectedIDListWrite.disabled=true;" name="writeControl" value="0" <%= (tmpBean.getControlWrite() == 0)? "checked" : "" %>>否</td>
  122.                     </tr>
  123.                     <tr bgcolor="#e0e0e0">
  124.                       <td width="115"><font class=strong>&nbsp;分配写权限:</font></td>
  125.                       <td width="474">
  126.                         <input type="hidden" name="updated2" value="false">
  127.                         <input type="hidden" name="tempHidden2" value="">
  128.                         <select name="selectedIDListWrite" size="6" multiple style="width:260" <%= (tmpBean.getControlWrite() == 0)? "disabled" : "" %>>
  129.                         <% if (writers != null){ %>                        
  130.                         <emp:EmployeeList empIds='<%= writers%>'>                                                
  131.                         <vnex:items>                                                
  132.                         <option value="<emp:EmployeeAttribute attribute="id"/>;null" >
  133.                         <emp:EmployeeAttribute attribute="employee_name"/>&nbsp;&nbsp;&nbsp;
  134.                         </option>
  135.                         </vnex:items>
  136.                         </emp:EmployeeList>
  137.                         <% } %>
  138.                         </select>
  139.                         <input type="button" style="width:70px" name="Submit2" value="按部门选择" class="file" onClick="javascript:addList2(selectedIDListWrite)">&nbsp;
  140.                         <input type="button"  name="Submit6" value="删除" class="file" onClick="javascript:remove1(selectedIDListWrite)">
  141.                       </td>
  142.                     </tr>
  143.                     <tr align="center" bgcolor="#fafafa">
  144.                       <td colspan="2" height="30">
  145.                         
  146.                       <input type="button" name="Submit3" class=text onClick="dosubmit()" value="保存">
  147.                       &nbsp;&nbsp;<input type="submit" name="Reset" value="重置" class=text >
  148.                       &nbsp;&nbsp; 
  149.                       <% if( request.getParameter("superId") != null && !"".equals(request.getParameter("supberId"))) { %>
  150.                       <input type="reset" name="Submit4" class=text onClick="location='/mainctrl/directory/management/directory_list_sub?id=<%= request.getParameter("superId")%>&isLeaf=0'" value="放弃">
  151.                       &nbsp;&nbsp;
  152.                         <% }else{ %>
  153.                         
  154.                       <input type="button" name="Submit5" class=text onClick="location='/mainctrl/directory/management/directory_list'" value="放弃">
  155.                       &nbsp;&nbsp;
  156.                         <% } %>
  157.                     </td>
  158.                     </tr>
  159.                   </table>
  160.                   </td></tr></table>
  161.           <br>
  162.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  163.        </TD>
  164.      </TR>
  165.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  166.     </TBODY> 
  167.   </TABLE>
  168.     <BR>
  169.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  170. </form>
  171. </DIV>
  172. </BODY>
  173. </HTML>