upload_file_modify_data.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:6k
源码类别:
电子政务应用
开发平台:
Java
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_archive.tld" prefix="archive" %>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="java.lang.*"%>
- <%@ page import="java.sql.Timestamp"%>
- <%@ page import="com.vnex.intranet.util.*"%>
- <%@ page import="com.vnex.intranet.system.loader.ConfigParaLoader"%>
- <%@ page import="com.vnex.intranet.archives.value.ArchiveAttachmentValueBean"%>
- <jsp:useBean id="archiveProxy" class="com.vnex.intranet.archives.proxy.ArchiveProxyBean" scope="session" />
- <%
- String str = request.getParameter("fileId");
- ArchiveAttachmentValueBean fileInfo = archiveProxy.selectAttachement((new Integer(str)).intValue());
- String fileName = fileInfo.getFileName();
- fileName = fileName.substring(fileName.lastIndexOf("\")+1);
- String root = ConfigParaLoader.getParameter("rootUrl");
- %>
- <script language="JavaScript" src="/vnex/util/validate.js"></script>
- <script language=javascript>
- function isDataValid(form)
- {
- if (form.fileTitle.value.length == 0)
- {
- alert("标题不能为空!");
- return false;
- }
- str = form.fileTitle.value;
- if (str.substring(0,1) == " ")
- {
- alert("标题开头不能是空格!");
- return false;
- }
- if (form.fileSummary.value.length > 125)
- {
- alert("文件的摘要必须小于125个文字!");
- return false;
- }
- if (form.others.value.length > 250)
- {
- alert("备注必须小于250个文字!");
- return false;
- }
- return true;
- }
- function toModify(form)
- {
- if (! isDataValid(form))
- return false;
- form.action = "/mainctrl/archive/modifyUploadFileSuccess?fileId=<%=fileInfo.getFileId()%>&archiveId=<%=fileInfo.getArchiveId()%>&isToday=<%=request.getParameter("isToday")%>"
- form.submit();
- }
- function toDetail(form)
- {
- form.action="/mainctrl/archive/archiveDetail?archiveId=<%=fileInfo.getArchiveId()%>&isToday=<%=request.getParameter("isToday")%>";
- form.submit();
- }
- function toDelete(form)
- {
- form.action = "/mainctrl/archive/deleteUploadFile?fileId=<%=fileInfo.getFileId()%>&archiveId=<%=fileInfo.getArchiveId()%>&isToday=<%=request.getParameter("isToday")%>"
- form.submit();
- }
- </script>
- <table width="600" border="0" cellpadding="5" cellspacing="1" class="iframestyle">
- <tr>
- <td colspan="2" bgcolor="#ffffff"> <a href="/mainctrl/archive/todayArchives">档案管理</a>>><a href="/mainctrl/archive/archiveDetail?archiveId=<%=fileInfo.getArchiveId()%>">档案信息</a>>>修改文件
- </td>
- </tr>
- <tr>
- <td colspan="2" height="4" bgcolor="#666666"><font class="strongw">修改文件</font></td>
- </tr>
- <tr bgcolor="#FFFFFF">
- <td align="center" colspan="2">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td>
- <table width="100%" border="0">
- <tr>
- <td width="14%">
- <div align="left">源文件:</div>
- </td>
- <td width="86%">
- <div align="left">
- <a href=<%=fileInfo.getFileName().substring(root.length())%> target="_blank"><%= fileName %></a>
- </div>
- </td>
- </tr>
- <tr>
- <td width="14%">
- <div align="left">标题:</div>
- </td>
- <td width="84%">
- <div align="left">
- <input type="text" name="fileTitle" size="30" class="text" maxlength= 250
- value = "<%=FieldUtil.filterQuotTag(fileInfo.getFileTitle())%>">
- </div>
- </td>
- </tr>
- <tr>
- <td width="14%" valign="top">
- <div align="left">概要:</div>
- </td>
- <td width="86%">
- <div align="left">
- <textarea rows="10" name="fileSummary" cols="49" wrap="VIRTUAL"><%=fileInfo.getFileSummary()%></textarea>
- </div>
- </td>
- </tr>
- <tr>
- <td width="14%">
- <div align="left">上传日期:</div>
- </td>
- <td width="86%">
- <div align="left"><%=TimeStamp.formatCalendar(1,fileInfo.getSendDate())%></div>
- </td>
- </tr>
- <tr>
- <td width="14%" valign="top">
- <div align="left">备注:</div>
- </td>
- <td width="86%" valign="top">
- <div align="left">
- <textarea name="others" cols="49" wrap="VIRTUAL" rows="3"><%=fileInfo.getOthers()%></textarea>
- </div>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <p>
- <input onClick="toModify(this.form)" type="button" value=" 保 存 " name="B211" class="button">
-
- <input onClick="toDelete(this.form)" type="button" value=" 删 除 " name="B212" class="button">
-
- <input type="reset" value=" 重 置 " name="B2123" class="button">
-
- <input onClick="toDetail(this.form)" type="button" value=" 返 回 " name="B2124" class="button">
-
- </p>