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

电子政务应用

开发平台:

Java

  1. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  2. <%@ taglib uri="/vnex_archive.tld" prefix="archive" %>
  3. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  4. <%@ page import="java.lang.*"%>
  5. <%@ page import="java.sql.Timestamp"%>
  6. <%@ page import="com.vnex.intranet.util.*"%>
  7. <%@ page import="com.vnex.intranet.system.loader.ConfigParaLoader"%>
  8. <%@ page import="com.vnex.intranet.archives.value.ArchiveAttachmentValueBean"%>
  9. <jsp:useBean id="archiveProxy" class="com.vnex.intranet.archives.proxy.ArchiveProxyBean" scope="session" /> 
  10. <%
  11. String str = request.getParameter("fileId");
  12. ArchiveAttachmentValueBean fileInfo = archiveProxy.selectAttachement((new Integer(str)).intValue());
  13. String fileName = fileInfo.getFileName();
  14. fileName = fileName.substring(fileName.lastIndexOf("\")+1); 
  15. String root = ConfigParaLoader.getParameter("rootUrl");
  16. %>
  17. <script language="JavaScript" src="/vnex/util/validate.js"></script>
  18. <script language=javascript>
  19. function isDataValid(form)
  20. {
  21. if (form.fileTitle.value.length == 0)
  22. {
  23. alert("标题不能为空!");
  24. return false;
  25. }
  26. str = form.fileTitle.value;
  27. if (str.substring(0,1) == " ")
  28. {
  29. alert("标题开头不能是空格!");
  30. return false;
  31. }
  32. if (form.fileSummary.value.length > 125)
  33. {
  34. alert("文件的摘要必须小于125个文字!");
  35. return false;
  36. }
  37. if (form.others.value.length > 250)
  38. {
  39. alert("备注必须小于250个文字!");
  40. return false;
  41. }
  42. return true;
  43. }
  44. function toModify(form)
  45. {
  46. if (! isDataValid(form))
  47. return false;
  48. form.action = "/mainctrl/archive/modifyUploadFileSuccess?fileId=<%=fileInfo.getFileId()%>&archiveId=<%=fileInfo.getArchiveId()%>&isToday=<%=request.getParameter("isToday")%>"
  49. form.submit();
  50. }
  51. function toDetail(form)
  52. {
  53. form.action="/mainctrl/archive/archiveDetail?archiveId=<%=fileInfo.getArchiveId()%>&isToday=<%=request.getParameter("isToday")%>";
  54. form.submit();
  55. }
  56. function toDelete(form)
  57. {
  58. form.action = "/mainctrl/archive/deleteUploadFile?fileId=<%=fileInfo.getFileId()%>&archiveId=<%=fileInfo.getArchiveId()%>&isToday=<%=request.getParameter("isToday")%>"
  59. form.submit();
  60. }
  61. </script>
  62. <table width="600" border="0" cellpadding="5" cellspacing="1" class="iframestyle">
  63.    <tr>
  64.      <td colspan="2" bgcolor="#ffffff">&nbsp;&nbsp;<a href="/mainctrl/archive/todayArchives">档案管理</a>&gt;&gt;<a href="/mainctrl/archive/archiveDetail?archiveId=<%=fileInfo.getArchiveId()%>">档案信息</a>&gt;&gt;修改文件&nbsp;
  65.      </td>
  66.    </tr>
  67.    <tr> 
  68.       <td colspan="2" height="4" bgcolor="#666666"><font class="strongw">修改文件</font></td>
  69.    </tr>
  70.    <tr bgcolor="#FFFFFF"> 
  71.       <td align="center" colspan="2">
  72.          <table width="100%" border="0" cellspacing="0" cellpadding="0">
  73.             <tr>
  74.                <td>
  75.                   <table width="100%" border="0">
  76.                      <tr> 
  77.                         <td width="14%"> 
  78.                           <div align="left">源文件:</div>
  79.                         </td>
  80.                         <td width="86%"> 
  81.                           <div align="left"> 
  82.                             <a href=<%=fileInfo.getFileName().substring(root.length())%> target="_blank"><%= fileName %></a>
  83.                           </div>
  84.                         </td>
  85.                     </tr>
  86.                     
  87.                     <tr> 
  88.                         <td width="14%"> 
  89.                           <div align="left">标题:</div>
  90.                         </td>
  91.                         <td width="84%"> 
  92.                            <div align="left"> 
  93.                              <input type="text" name="fileTitle" size="30" class="text" maxlength= 250
  94.                               value = "<%=FieldUtil.filterQuotTag(fileInfo.getFileTitle())%>">
  95.                            </div>
  96.                         </td>
  97.                     </tr>
  98.                     <tr> 
  99.                         <td width="14%" valign="top"> 
  100.                          <div align="left">概要:</div>
  101.                         </td>
  102.                         <td width="86%"> 
  103.                           <div align="left"> 
  104.                             <textarea rows="10" name="fileSummary" cols="49" wrap="VIRTUAL"><%=fileInfo.getFileSummary()%></textarea>
  105.                           </div>
  106.                         </td>
  107.                     </tr>
  108.                     <tr> 
  109.                         <td width="14%"> 
  110.                           <div align="left">上传日期:</div>
  111.                         </td>
  112.                         <td width="86%"> 
  113.                           <div align="left"><%=TimeStamp.formatCalendar(1,fileInfo.getSendDate())%></div>
  114.                         </td>
  115.                     </tr>
  116.                     <tr> 
  117.                         <td width="14%" valign="top"> 
  118.                            <div align="left">备注:</div>
  119.                         </td>
  120.                         <td width="86%" valign="top"> 
  121.                            <div align="left"> 
  122.                            <textarea name="others" cols="49" wrap="VIRTUAL" rows="3"><%=fileInfo.getOthers()%></textarea>
  123.                            </div>
  124.                         </td>
  125.                     </tr>
  126.                </table>
  127.              </td>
  128.           </tr>
  129.        </table>
  130.      </td>
  131.    </tr>
  132. </table>         
  133. <p> 
  134.   <input onClick="toModify(this.form)" type="button" value=" 保 存 " name="B211" class="button">
  135.   &nbsp;&nbsp;
  136.   <input onClick="toDelete(this.form)" type="button" value=" 删 除 " name="B212" class="button">
  137.   &nbsp;&nbsp;
  138.   <input type="reset" value=" 重 置 " name="B2123" class="button">
  139.   &nbsp;&nbsp;
  140.   <input onClick="toDetail(this.form)" type="button" value=" 返 回 " name="B2124" class="button">
  141.   &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  142. </p>