Regulation_Modify.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:7k
源码类别:
电子政务应用
开发平台:
Java
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="com.vnex.intranet.commoninfo.regulation.value.*"%>
- <%@ page import="com.vnex.intranet.commoninfo.regulation.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="regulationProxy" class="com.vnex.intranet.commoninfo.regulation.proxy.RegulationProxyBean" scope="application" />
- <jsp:useBean id="regulationBean" class="com.vnex.intranet.commoninfo.regulation.value.RegulationValueBean" scope="page" />
- <%
- int regulationId = 0;
- int start = 1;
- if(request.getParameter("regulationIds")!=null && !request.getParameter("regulationIds").equals(""))
- regulationId = Integer.parseInt(request.getParameter("regulationIds"));
- regulationBean = regulationProxy.getRegulationDetail(regulationId);
- 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.regulationName.value) || document.myform.regulationName.value=="" || document.myform.regulationName.value.length>50)
- {
- alert("规章名不能为空,并且少于50个字。");
- document.myform.regulationName.focus();
- return false;
- }
- if (document.myform.regulationDepartment.value==0)
- {
- alert("请选择部门。");
- document.myform.regulationDepartment.focus();
- return false;
- }
- if(!isValidChar(myform.attachmentUrl.value))
- {
- alert("上传文件不能包括 < > 这些特殊字符。");
- return false;
- }
- else
- return true;
- }
- function modifyRegulation()
- {
- if( !check() )
- {
- return false;
- }
- myform.action= "/mainctrl/commoninfo/regulation/modifyRegulationSuccess";
- 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/regulation/getRegulationList"><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="regulationName" class="file" value="<%= FieldUtil.filterQuotTag(regulationBean.getRegulationName())%>"> * (注:带*为必填内容)
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td>
- <font class="strong"> 发布部门:</font>
- </td>
- <td>
- <org:DivisionList>
- <select name="regulationDepartment">
- <option value="0">-请选择-</option>
- <vnex:items select="<%= regulationBean.getRegulationDepartment()%>">
- <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 = regulationBean.getAttachmentUrl();
- int s = str.lastIndexOf(SubPathGenerater.getSeperator());
- String filename = str.substring(s+1);
- out.println(filename);
- %>
- </font></td>
- <input type="hidden" name="oldUrl" value="<%= regulationBean.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="regulationId" value="<%= regulationId%>">
- <tr bgcolor="#fafafa">
- <td colspan="2" height="30">
- <div align="center">
- <input type="button" name="Submit3" value="保存" class="text" onclick="return modifyRegulation()">
- <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>