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

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%@ page import="com.vnex.intranet.commoninfo.directory.value.*"%>
  3. <%@ page import="com.vnex.intranet.commoninfo.directory.proxy.*"%>
  4. <%@ page import="com.vnex.intranet.util.*"%>
  5. <%@ page import="com.vnex.intranet.system.loader.ConfigParaLoader"%>
  6. <%@ page import="java.util.*" %>
  7. <%@ page import="java.sql.*" %>
  8. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  9. <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
  10. <jsp:useBean id="directoryProxy" class="com.vnex.intranet.commoninfo.directory.proxy.DirectoryProxyBean" scope="application" />
  11. <jsp:useBean id="directoryBean" class="com.vnex.intranet.commoninfo.directory.value.DirectoryValueBean" scope="page" />
  12. <%
  13.   
  14.   int directoryId = 0;
  15.   int start = 1;
  16.   if(request.getParameter("directoryIds")!=null && !request.getParameter("directoryIds").equals(""))
  17.     directoryId = Integer.parseInt(request.getParameter("directoryIds"));
  18.   directoryBean = directoryProxy.getDirectoryDetail(directoryId);
  19.   if(request.getParameter("start")!=null && !request.getParameter("start").equals(""))
  20.     start = Integer.parseInt(request.getParameter("start"));
  21. %>
  22. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  23. <HTML>
  24. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  25. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  26. <script language="javascript" src="/vnex/validate.js" ></script>
  27. <script language=JavaScript>
  28. function isValidChar(str)
  29. {
  30.   var i,j,strTemp;
  31.   strTemp="<>";
  32.   for (i=0;i<str.length;i++)
  33.   {
  34.     j=strTemp.indexOf(str.charAt(i));
  35.     if (j!=-1)
  36.     {
  37.       return false;
  38.     }
  39.   }
  40.   return true;
  41. }
  42. function check()
  43. {
  44.   if (!stripWhitespace(document.myform.directoryName.value) || document.myform.directoryName.value=="" || document.myform.directoryName.value.length>50)
  45. {
  46.   alert("规章名不能为空,并且少于50个字。");
  47.   document.myform.directoryName.focus();
  48.   return false;
  49. }
  50. if (document.myform.directoryDepartment.value==0)
  51. {
  52.   alert("请选择部门。");
  53.   document.myform.directoryDepartment.focus();
  54.   return false;
  55. }
  56. if(!isValidChar(myform.attachmentUrl.value))
  57.   {
  58.     alert("上传文件不能包括 < > 这些特殊字符。");
  59.     return false;
  60.   }
  61.   else
  62.     return true;
  63. }
  64. function modifyDirectory()
  65. {
  66.   if( !check() )
  67.   {
  68.     return false;
  69.   }
  70.  myform.action= "/mainctrl/commoninfo/directory/modifyDirectorySuccess";
  71.  myform.encoding="multipart/form-data";
  72.   myform.submit();
  73. }
  74. </script>
  75. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
  76. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  77. <DIV align=center>
  78.   <form name="myform" method="post" action="">
  79.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  80.     <TBODY> 
  81.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  82.     <TR> 
  83.         <TD colSpan=3 align="center"><br>
  84.           <!--个人信息开始 -->
  85.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  86.             <tr bgcolor="#fafafa"> 
  87.               <td> 
  88.                 <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
  89.                   <tr bgcolor="#666666"> 
  90.                     <td colspan="2" height="15"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/office/main"><font color="#FFFFFF">办公室管理</font></a>&gt;&gt;<a href="/mainctrl/commoninfo/directory/getDirectoryList"><font color="#FFFFFF">办事指南</font></a>&gt;&gt;修改办事指南</font></td>
  91.                   </tr>
  92.                   <tr bgcolor="#fafafa"> 
  93.                     <td width="20%"> 
  94.                       <font class="strong">&nbsp;名称:</font>
  95.                     </td>
  96.                     <td width="80%"> 
  97.                       <input type="text" name="directoryName" class="file" value="<%= FieldUtil.filterQuotTag(directoryBean.getDirectoryName())%>">&nbsp;*&nbsp;(注:带*为必填内容)
  98.                     </td>
  99.                   </tr>
  100.                   <tr bgcolor="#e0e0e0"> 
  101.                     <td> 
  102.                       <font class="strong">&nbsp;发布部门:</font>
  103.                     </td>
  104.                     <td>
  105.                     <org:DivisionList>
  106.                       <select name="directoryDepartment">
  107.                         <option value="0">-请选择-</option>
  108.                         <vnex:items select="<%= directoryBean.getDirectoryDepartment()%>">
  109.                           <option value="<org:DivisionAttribute attribute="name"/>" <org:DivisionAttribute attribute="isSelectedByName"/> > 
  110.                             <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/>
  111.                           </option>
  112.                         </vnex:items>
  113.                       </select>&nbsp;*
  114.                     </org:DivisionList>
  115.                     </td>
  116.                   </tr>
  117.                   <tr bgcolor="#fafafa"> 
  118.                     <td>
  119.                       <font  class="strong">&nbsp;附件:</font>
  120.                     </td>
  121.                     <td><font  class="strong">
  122.                     <%
  123.                       String str = directoryBean.getAttachmentUrl();
  124.                       int s = str.lastIndexOf(SubPathGenerater.getSeperator());
  125.                     String filename = str.substring(s+1);
  126.                     out.println(filename);
  127.                     %>
  128.                     </font></td>
  129.                     <input type="hidden" name="oldUrl" value="<%= directoryBean.getAttachmentUrl()%>">
  130.                   </tr>
  131.                   <tr bgcolor="#e0e0e0"> 
  132.                     <td> 
  133.                       <font  class="strong">&nbsp;上传文件:</font>
  134.                     </td>
  135.                     <td>
  136.                       <input type="file" name="attachmentUrl" class="file">
  137.                     </td>
  138.                   </tr>
  139.                   <input type="hidden" name="directoryId" value="<%= directoryId%>">
  140.                   <tr bgcolor="#fafafa"> 
  141.                     <td colspan="2" height="30"> 
  142.                       <div align="center">
  143.                         <input type="button" name="Submit3" value="保存" class="text" onclick="return modifyDirectory()">&nbsp;&nbsp;
  144.                         <input type="reset" name="Submit32" value="重置" class="text" >&nbsp;&nbsp;
  145.                         <input type="button" name="Submit33" value="放弃" class="text" onclick="history.back()">
  146.                       </div>
  147.                     </td>
  148.                   </tr>
  149.                 </table>
  150.               </td>
  151.             </tr>
  152.             <input type="hidden" name="start" value="<%= start%>">
  153.           </table>
  154.           <br>
  155.           <br>
  156.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  157.        </TD>
  158.     </TR>
  159.     <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  160.     </TBODY> 
  161.   </TABLE>
  162.   <BR>
  163.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  164. </form></DIV>
  165. </BODY></HTML>