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

电子政务应用

开发平台:

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. <HTML>
  18. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  19. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  20. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_archives.js"></script>
  21. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  22. <script language="JavaScript" src="/vnex/validate.js"></script>
  23. <script language=javascript>
  24. function isDataValid(form)
  25. {
  26. if (form.fileTitle.value.length == 0)
  27. {
  28. alert("标题不能为空!");
  29. form.fileTitle.focus();
  30. return false;
  31. }
  32. str = form.fileTitle.value;
  33. if (str.substring(0,1) == " ")
  34. {
  35. alert("标题开头不能是空格!");
  36. form.fileTitle.focus();
  37. return false;
  38. }
  39. if (form.fileSummary.value.length > 125)
  40. {
  41. alert("文件的摘要必须小于125个文字!");
  42. form.fileSummary.focus();
  43. return false;
  44. }
  45. if (form.others.value.length > 250)
  46. {
  47. alert("备注必须小于250个文字!");
  48. form.others.focus();
  49. return false;
  50. }
  51. return true;
  52. }
  53. function toModify(form)
  54. {
  55. if (! isDataValid(form))
  56. return false;
  57. form.action = "/mainctrl/archive/modifyUploadFileSuccess?fileId=<%=fileInfo.getFileId()%>&archiveId=<%=fileInfo.getArchiveId()%>&isToday=<%=request.getParameter("isToday")%>"
  58. form.submit();
  59. }
  60. function toDetail(form)
  61. {
  62. form.action="/mainctrl/archive/archiveDetail?archiveId=<%=fileInfo.getArchiveId()%>&isToday=<%=request.getParameter("isToday")%>";
  63. form.submit();
  64. }
  65. function toDelete(form)
  66. {
  67.    if(confirm("是否删除本记录?"))
  68.    {
  69.  form.action = "/mainctrl/archive/deleteUploadFile?fileId=<%=fileInfo.getFileId()%>&archiveId=<%=fileInfo.getArchiveId()%>&isToday=<%=request.getParameter("isToday")%>"
  70.  form.submit();
  71.    }   
  72. }
  73. </script>
  74. <DIV align=center>
  75. <form name="form1" method="post">
  76.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  77.     <TBODY> 
  78.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  79.     <TR> 
  80.         <TD colSpan=3 align="center"><br>
  81.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  82.             <tr> 
  83.               <td align="center" colspan="2" bgcolor="#FFFFFF"> 
  84.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  85.                   <tr bgcolor="#666666"> 
  86.                       <td><font class="strongw"><a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>&gt;&gt;<a href="/mainctrl/archive/todayArchives"><font color="#ffffff">档案管理</font></a>&gt;&gt;<a href="/mainctrl/archive/archiveDetail?archiveId=<%=fileInfo.getArchiveId()%>"><font color="#ffffff">档案信息</font></a>&gt;&gt;修改文件</font>
  87.                       </td>
  88.                   </tr>
  89.                 </table>
  90.                 <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
  91.                      <tr bgcolor="#e0e0e0"> 
  92.                         <td width="14%"> 
  93.                           <div align="left"><strong>&nbsp;源文件:</strong></div>
  94.                         </td>
  95.                         <td width="86%"> 
  96.                           <div align="left"> 
  97. <%
  98.   String str2 = fileInfo.getFileName().substring(root.length());
  99.   int s = str2.lastIndexOf(SubPathGenerater.getSeperator());
  100.   String filename = str2.substring(s+1);
  101.   String UTFurl = str2.substring(0,s+1)+StringUtil.encode(filename);
  102. %>
  103.                             <a href=<%= UTFurl%> target="_blank"><%= fileName %></a>
  104.                           </div>
  105.                         </td>
  106.                     </tr>
  107.                     
  108.                     <tr bgcolor="#fafafa"> 
  109.                         <td width="14%"> 
  110.                           <div align="left"><strong>&nbsp;标题:</strong></div>
  111.                         </td>
  112.                         <td width="84%"> 
  113.                            <div align="left"> 
  114.                              <input type="text" name="fileTitle" size="30" class="text" maxlength= 250
  115.                               value = "<%=FieldUtil.filterQuotTag(fileInfo.getFileTitle())%>">
  116.                            </div>
  117.                         </td>
  118.                     </tr>
  119.                     <tr bgcolor="#e0e0e0"> 
  120.                         <td width="14%"> 
  121.                          <div align="left"><strong>&nbsp;概要:</strong></div>
  122.                         </td>
  123.                         <td width="86%"> 
  124.                           <div align="left"> 
  125.                             <textarea rows="10" name="fileSummary" cols="49" wrap="VIRTUAL"><%=fileInfo.getFileSummary()%></textarea>
  126.                           </div>
  127.                         </td>
  128.                     </tr>
  129.                     <tr bgcolor="#fafafa"> 
  130.                         <td width="14%"> 
  131.                           <div align="left"><strong>&nbsp;上传日期:</strong></div>
  132.                         </td>
  133.                         <td width="86%"> 
  134.                           <div align="left"><%=TimeStamp.formatCalendar(1,fileInfo.getSendDate())%></div>
  135.                         </td>
  136.                     </tr>
  137.                     <tr bgcolor="#e0e0e0"> 
  138.                         <td width="14%"> 
  139.                            <div align="left"><strong>&nbsp;备注:</strong></div>
  140.                         </td>
  141.                         <td width="86%" valign="top"> 
  142.                            <div align="left"> 
  143.                            <textarea name="others" cols="49" wrap="VIRTUAL" rows="3"><%=fileInfo.getOthers()%></textarea>
  144.                            </div>
  145.                         </td>
  146.                     </tr>
  147.                     <tr bgcolor="#fafafa">
  148.                        <td colspan="2" align="center" height="30">
  149.   <input onClick="toModify(this.form)" type="button" value="保存" name="B211" class="text">
  150.   &nbsp;&nbsp;
  151.   <input onClick="toDelete(this.form)" type="button" value="删除" name="B212" class="text">
  152.   &nbsp;&nbsp;
  153.   <input type="reset" value="重置" name="B2123" class="text">
  154.   &nbsp;&nbsp;
  155.   <input onClick="toDetail(this.form)" type="button" value="返回" name="B2124" class="text">
  156.    </td>
  157.    </tr>    
  158.                </table>
  159.              </td>
  160.           </tr>
  161.        </table>
  162.        <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  163.        </TD>
  164.      </TR>
  165.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  166.     </TBODY> 
  167.   </TABLE>
  168.     <BR>
  169.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  170. </form>
  171. </DIV>
  172. </BODY>
  173. </HTML>