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

电子政务应用

开发平台:

Java

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