upload_file_modify.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:7k
源码类别:
电子政务应用
开发平台:
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");
- %>
- <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="JavaScript1.2" src="/vnex/menu/dockmenu_archives.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <script language="JavaScript" src="/vnex/validate.js"></script>
- <script language=javascript>
- function isDataValid(form)
- {
- if (form.fileTitle.value.length == 0)
- {
- alert("标题不能为空!");
- form.fileTitle.focus();
- return false;
- }
- str = form.fileTitle.value;
- if (str.substring(0,1) == " ")
- {
- alert("标题开头不能是空格!");
- form.fileTitle.focus();
- return false;
- }
- if (form.fileSummary.value.length > 125)
- {
- alert("文件的摘要必须小于125个文字!");
- form.fileSummary.focus();
- return false;
- }
- if (form.others.value.length > 250)
- {
- alert("备注必须小于250个文字!");
- form.others.focus();
- 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)
- {
- if(confirm("是否删除本记录?"))
- {
- form.action = "/mainctrl/archive/deleteUploadFile?fileId=<%=fileInfo.getFileId()%>&archiveId=<%=fileInfo.getArchiveId()%>&isToday=<%=request.getParameter("isToday")%>"
- form.submit();
- }
- }
- </script>
- <DIV align=center>
- <form name="form1" method="post">
- <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>
- <td align="center" colspan="2" bgcolor="#FFFFFF">
- <table width="600" border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#666666">
- <td><font class="strongw"><a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>>><a href="/mainctrl/archive/todayArchives"><font color="#ffffff">档案管理</font></a>>><a href="/mainctrl/archive/archiveDetail?archiveId=<%=fileInfo.getArchiveId()%>"><font color="#ffffff">档案信息</font></a>>>修改文件</font>
- </td>
- </tr>
- </table>
- <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
- <tr bgcolor="#e0e0e0">
- <td width="14%">
- <div align="left"><strong> 源文件:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <%
- String str2 = fileInfo.getFileName().substring(root.length());
- int s = str2.lastIndexOf(SubPathGenerater.getSeperator());
- String filename = str2.substring(s+1);
- String UTFurl = str2.substring(0,s+1)+StringUtil.encode(filename);
- %>
- <a href=<%= UTFurl%> target="_blank"><%= fileName %></a>
- </div>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="14%">
- <div align="left"><strong> 标题:</strong></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 bgcolor="#e0e0e0">
- <td width="14%">
- <div align="left"><strong> 概要:</strong></div>
- </td>
- <td width="86%">
- <div align="left">
- <textarea rows="10" name="fileSummary" cols="49" wrap="VIRTUAL"><%=fileInfo.getFileSummary()%></textarea>
- </div>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="14%">
- <div align="left"><strong> 上传日期:</strong></div>
- </td>
- <td width="86%">
- <div align="left"><%=TimeStamp.formatCalendar(1,fileInfo.getSendDate())%></div>
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="14%">
- <div align="left"><strong> 备注:</strong></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>
- <tr bgcolor="#fafafa">
- <td colspan="2" align="center" height="30">
- <input onClick="toModify(this.form)" type="button" value="保存" name="B211" class="text">
-
- <input onClick="toDelete(this.form)" type="button" value="删除" name="B212" class="text">
-
- <input type="reset" value="重置" name="B2123" class="text">
-
- <input onClick="toDetail(this.form)" type="button" value="返回" name="B2124" class="text">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <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>