Directory_Modify.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:7k
源码类别:
电子政务应用
开发平台:
Java
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="com.vnex.intranet.commoninfo.directory.value.*"%>
- <%@ page import="com.vnex.intranet.commoninfo.directory.proxy.*"%>
- <%@ page import="com.vnex.intranet.util.*"%>
- <%@ page import="com.vnex.intranet.system.loader.ConfigParaLoader"%>
- <%@ page import="java.util.*" %>
- <%@ page import="java.sql.*" %>
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
- <jsp:useBean id="directoryProxy" class="com.vnex.intranet.commoninfo.directory.proxy.DirectoryProxyBean" scope="application" />
- <jsp:useBean id="directoryBean" class="com.vnex.intranet.commoninfo.directory.value.DirectoryValueBean" scope="page" />
- <%
- int directoryId = 0;
- int start = 1;
- if(request.getParameter("directoryIds")!=null && !request.getParameter("directoryIds").equals(""))
- directoryId = Integer.parseInt(request.getParameter("directoryIds"));
- directoryBean = directoryProxy.getDirectoryDetail(directoryId);
- if(request.getParameter("start")!=null && !request.getParameter("start").equals(""))
- start = Integer.parseInt(request.getParameter("start"));
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <script language="javascript" src="/vnex/validate.js" ></script>
- <script language=JavaScript>
- function isValidChar(str)
- {
- var i,j,strTemp;
- strTemp="<>";
- for (i=0;i<str.length;i++)
- {
- j=strTemp.indexOf(str.charAt(i));
- if (j!=-1)
- {
- return false;
- }
- }
- return true;
- }
- function check()
- {
- if (!stripWhitespace(document.myform.directoryName.value) || document.myform.directoryName.value=="" || document.myform.directoryName.value.length>50)
- {
- alert("规章名不能为空,并且少于50个字。");
- document.myform.directoryName.focus();
- return false;
- }
- if (document.myform.directoryDepartment.value==0)
- {
- alert("请选择部门。");
- document.myform.directoryDepartment.focus();
- return false;
- }
- if(!isValidChar(myform.attachmentUrl.value))
- {
- alert("上传文件不能包括 < > 这些特殊字符。");
- return false;
- }
- else
- return true;
- }
- function modifyDirectory()
- {
- if( !check() )
- {
- return false;
- }
- myform.action= "/mainctrl/commoninfo/directory/modifyDirectorySuccess";
- myform.encoding="multipart/form-data";
- myform.submit();
- }
- </script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <DIV align=center>
- <form name="myform" method="post" action="">
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <TBODY>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center"><br>
- <!--个人信息开始 -->
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr bgcolor="#fafafa">
- <td>
- <table class=title width="600" border="0" cellspacing="1" cellpadding="2">
- <tr bgcolor="#666666">
- <td colspan="2" height="15"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>>><a href="/mainctrl/office/main"><font color="#FFFFFF">办公室管理</font></a>>><a href="/mainctrl/commoninfo/directory/getDirectoryList"><font color="#FFFFFF">办事指南</font></a>>>修改办事指南</font></td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="20%">
- <font class="strong"> 名称:</font>
- </td>
- <td width="80%">
- <input type="text" name="directoryName" class="file" value="<%= FieldUtil.filterQuotTag(directoryBean.getDirectoryName())%>"> * (注:带*为必填内容)
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td>
- <font class="strong"> 发布部门:</font>
- </td>
- <td>
- <org:DivisionList>
- <select name="directoryDepartment">
- <option value="0">-请选择-</option>
- <vnex:items select="<%= directoryBean.getDirectoryDepartment()%>">
- <option value="<org:DivisionAttribute attribute="name"/>" <org:DivisionAttribute attribute="isSelectedByName"/> >
- <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/>
- </option>
- </vnex:items>
- </select> *
- </org:DivisionList>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td>
- <font class="strong"> 附件:</font>
- </td>
- <td><font class="strong">
- <%
- String str = directoryBean.getAttachmentUrl();
- int s = str.lastIndexOf(SubPathGenerater.getSeperator());
- String filename = str.substring(s+1);
- out.println(filename);
- %>
- </font></td>
- <input type="hidden" name="oldUrl" value="<%= directoryBean.getAttachmentUrl()%>">
- </tr>
- <tr bgcolor="#e0e0e0">
- <td>
- <font class="strong"> 上传文件:</font>
- </td>
- <td>
- <input type="file" name="attachmentUrl" class="file">
- </td>
- </tr>
- <input type="hidden" name="directoryId" value="<%= directoryId%>">
- <tr bgcolor="#fafafa">
- <td colspan="2" height="30">
- <div align="center">
- <input type="button" name="Submit3" value="保存" class="text" onclick="return modifyDirectory()">
- <input type="reset" name="Submit32" value="重置" class="text" >
- <input type="button" name="Submit33" value="放弃" class="text" onclick="history.back()">
- </div>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <input type="hidden" name="start" value="<%= start%>">
- </table>
- <br>
- <br>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form></DIV>
- </BODY></HTML>