archives_search_result.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="com.vnex.intranet.util.TimeStamp" %>
  5. <%@ page import="java.lang.*" %>
  6. <%@ page import="java.sql.*" %>
  7. <%@ page import="java.util.*" %>
  8. <jsp:useBean id="archiveCondition" class="com.vnex.intranet.archives.value.ArchiveValueBean" scope="session" /> 
  9. <jsp:useBean id="archiveProxy" class="com.vnex.intranet.archives.proxy.ArchiveProxyBean" scope="session" /> 
  10. <jsp:setProperty name="archiveCondition" property="*" />
  11. <%!
  12. Calendar cal;
  13. String str;
  14. Timestamp ts;
  15. String saveDate;
  16. String saveEndDate;
  17. String createDate;
  18. String createEndDate;
  19. String pageTo;
  20. String toDelete;
  21. %>
  22. <%
  23. archiveCondition.setArchiveDisplayId(request.getParameter("archiveDisplayId"));
  24. if (! (request.getParameter("saveDate").equals("")))
  25. {
  26. str = request.getParameter("saveDate") + " 00:00:00";
  27. ts = TimeStamp.toTimestamp(str);
  28. archiveCondition.setSaveArchiveDate(TimeStamp.convertTimestampToCalendar(ts));
  29. }
  30. if (! (request.getParameter("saveEndDate").equals("")))
  31. {
  32. str = request.getParameter("saveEndDate") + " 00:00:00";
  33. ts = TimeStamp.toTimestamp(str);
  34. archiveCondition.setSaveArchiveDateEnd(TimeStamp.convertTimestampToCalendar(ts));
  35. }
  36. if (! (request.getParameter("createDate").equals("")))
  37. {
  38. str = request.getParameter("createDate") + " 00:00:00";
  39. ts = TimeStamp.toTimestamp(str);
  40. archiveCondition.setCreateDate(TimeStamp.convertTimestampToCalendar(ts));
  41. }
  42. if (! (request.getParameter("createEndDate").equals("")))
  43. {
  44. str = request.getParameter("createEndDate") + " 00:00:00";
  45. ts = TimeStamp.toTimestamp(str);
  46. archiveCondition.setCreateDateEnd(TimeStamp.convertTimestampToCalendar(ts));
  47. }
  48. //str = request.getParameter("safetyLevel");
  49. Collection col= archiveProxy.selectArchives(archiveCondition);
  50. saveDate = request.getParameter("saveDate");
  51. saveEndDate = request.getParameter("saveEndDate");
  52. createDate = request.getParameter("createDate");
  53. createEndDate = request.getParameter("createEndDate");
  54. pageTo = "/mainctrl/archive/archivesSearchResult?saveDate=" + saveDate + "&saveEndDate=" + saveEndDate +
  55. "&createDate=" + createDate + "&createEndDate=" + createEndDate;
  56. toDelete = "/mainctrl/archive/deleteSearchArchives?saveDate=" + saveDate + "&saveEndDate=" + saveEndDate +
  57. "&createDate=" + createDate + "&createEndDate=" + createEndDate;
  58. %> 
  59. <script language=javascript>
  60. function checkAll(checkbox_select,checkbox_names)
  61. {
  62.       var items=checkbox_names.length;
  63.       if(items>1)
  64.         {
  65.          for(i=0;i<items;i++) 
  66.            if(!checkbox_names[i].disabled)
  67.              checkbox_names[i].checked=checkbox_select.checked;      
  68.         }
  69.       else
  70.        {
  71.           if(!checkbox_names.disabled)
  72.             checkbox_names.checked=checkbox_select.checked;
  73.        }
  74. }
  75. function toDelete(form)
  76. {
  77. if(form.check1 == null)
  78. {
  79.    alert("目前尚未有任何数据可供删除");
  80.    return;
  81. }
  82. var items=form.check1.length; 
  83. var j = -1;
  84. var sign = 1;
  85. if (items>1)
  86. {
  87. for (i=0;i < items;i++)
  88. if (form.check1[i].checked)
  89. j = i;
  90. }
  91. if (j == -1)
  92. {
  93. alert ("没有可供删除的选项!" );
  94. sign = 0;
  95. }
  96. }
  97. else
  98. {
  99. if (form.check1.checked)
  100. sign = 1;
  101. else
  102. {
  103. alert ("没有可供删除的选项!" );
  104. sign = 0
  105. }
  106. }
  107. if (sign == 1)
  108. {
  109. if(confirm("是否删除所选数据?"))
  110. {
  111.   form.action="<%= toDelete%>" ;
  112.   form.submit();
  113. }  
  114. }
  115. </script>
  116. <HTML>
  117. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  118. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  119. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_archives.js"></script>
  120. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  121. <DIV align=center>
  122. <form name="form1" method="post" action="">
  123.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  124.     <TBODY>
  125.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  126.     <TR> 
  127.         <TD colSpan=3 align="center"><br>
  128.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  129.             <tr> 
  130.               <td align="center" colspan="2" bgcolor="#FFFFFF"> 
  131.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  132.                   <tr bgcolor="#666666"> 
  133.                       <td><font class="strongw"><a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>&gt;&gt;<a href="/mainctrl/archives/main"><font color="#ffffff">档案管理</font></a>&gt;&gt;查询结果</font>
  134.                       </td>
  135.                   </tr>
  136.                 </table>
  137.                 <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
  138.                   <tr bgcolor="#fafafa">
  139.                      <td colspan="7" height="30">&nbsp;
  140.                      <input onClick=toDelete(form1) type="button" value="删除" name="B21" class="text">
  141.                    </td>
  142.                 </tr>  
  143.       <tr align="center"> 
  144.        <td><font class="strong">选择</font></td>
  145.        <td><font class="strong">文件来源</font></td>
  146.         <td> 
  147.           <font class="strong">档案编号</font>
  148.         </td>
  149.         <td><font class="strong">存档日期</font></td>
  150.         <td><font class="strong">标题</font></td>
  151.         <td><font class="strong">发文日期</font></td>        
  152.         <td><font class="strong">是否在库</font></td>        
  153.       </tr>
  154. <archive:ArchiveList archiveCondition="<%= archiveCondition %>" >  
  155. <vnex:items paging="true">    
  156.       <tr bgcolor="<vnex:itemsColor />" align="center"> 
  157.         <td> 
  158.              <input type="checkbox" name="check1" value="<archive:ArchiveAttribute attribute = "archive_id"/>" <archive:ArchiveAttribute attribute = "is_disabled" />>
  159.         </td>
  160.         <td><archive:ArchiveAttribute attribute = "file_source"/></td>
  161.         <td><archive:ArchiveAttribute attribute = "archive_display_id"/></td>
  162.         <td><archive:ArchiveAttribute attribute = "save_archive_date"/></td>
  163.         <td><a href=/mainctrl/archive/archiveDetail?archiveId=<archive:ArchiveAttribute attribute = "archive_id"/>><archive:ArchiveAttribute attribute = "archive_title"/></a></td>
  164.         <td><archive:ArchiveAttribute attribute = "create_date"/></td>        
  165.         <td><archive:ArchiveAttribute attribute = "is_borrowed"/></td>        
  166.       </tr>
  167. </vnex:items> 
  168. <tr bgcolor="#fafafa">
  169.       <td width="7%" align="center">
  170.          <input type="checkbox" name="selectAll" value="checkbox" onClick= checkAll(selectAll,check1)>
  171.       </td>
  172.       <td colspan="6">&nbsp;&nbsp;全选</td>
  173.     </tr>
  174. <tr bgcolor="#e0e0e0">
  175.          <td colspan="7">&nbsp;&nbsp;<vnex:pagingTag pageName="<%=pageTo%>"/></td>
  176.     </tr>   
  177. </archive:ArchiveList>       
  178.     </table>
  179.    </td>
  180.   </tr>
  181.         </table>
  182.             <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  183.         </TD>
  184.      </TR> 
  185.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />    
  186.     </TBODY> 
  187.   </TABLE>
  188.   <BR>
  189.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  190. </form>
  191. </DIV>
  192. </BODY>
  193. </HTML>