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

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%@ page import="com.vnex.intranet.commoninfo.directory.value.*"%>
  3. <%@ page import="com.vnex.intranet.commoninfo.directory.proxy.*"%>
  4. <%@ page import="com.vnex.intranet.util.*"%>
  5. <%@ page import="java.util.*" %>
  6. <%@ page import="java.sql.*" %>
  7. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  8. <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
  9. <jsp:useBean id="directoryProxy" class="com.vnex.intranet.commoninfo.directory.proxy.DirectoryProxyBean" scope="application" />
  10. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  11. <HTML>
  12. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  13. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  14. <script language="javascript" src="/vnex/validate.js" ></script>
  15. <script language=JavaScript>
  16. function createDirectory()
  17. {
  18.  myform.action= "/mainctrl/commoninfo/directory/createDirectory";
  19.   myform.submit();
  20. }
  21. function removeDirectorys()
  22. {
  23.  if(document.myform.directoryIds==null)
  24.  {
  25.     alert("没有要删除的办事指南。");
  26.     return false;
  27.  }
  28.  if( !isChecked(document.myform.directoryIds) )
  29.   {
  30.     alert("请选择要删除的办事指南。");
  31.     return false;
  32.   }
  33.   if(!confirm("是否确定删除?"))
  34.   {
  35.     return false;
  36.   }
  37.  myform.action= "/mainctrl/commoninfo/directory/removeDirectorySuccess";
  38.   myform.submit();
  39. }
  40. function modifyDirectory()
  41. {
  42.  if( !isCheckedOne(document.myform.directoryIds) )
  43.   {
  44.     alert("请选择一个要修改的办事指南。");
  45.     return false;
  46.   }
  47.  myform.action= "/mainctrl/commoninfo/directory/modifyDirectory";
  48.   myform.submit();
  49. }
  50. function CheckAll(form)
  51. {
  52.   for (var i=0;i<form.elements.length;i++)
  53.   {
  54.     var e = form.elements[i];
  55.     if (e.name != 'chkall')
  56.        e.checked = form.chkall.checked;
  57.   }
  58. }
  59. </script>
  60. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
  61. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  62. <DIV align=center>
  63.   <form name="myform" method="post" action="">
  64.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  65.     <TBODY> 
  66.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  67.     <TR> 
  68.         <TD colSpan=3 align="center"><br>
  69.           <!--个人信息开始 -->
  70.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  71.             <tr> 
  72.               <td bgcolor="#fafafa"> 
  73.                 <table width="600" border="0" cellspacing="0" cellpadding="2">
  74.                   <tr bgcolor="#666666"> 
  75.                     <td colspan="2" height="15"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/office/main"><font color="#FFFFFF">办公室管理</font></a>&gt;&gt;办事指南</font></td>
  76.                   </tr>
  77.                 </table>
  78.                 
  79.           <table class=title cellspacing=1 cellpadding=2 width="100%" border=0>
  80.             <tr bgcolor="#fafafa"> 
  81.               <td colspan="4" height="30">&nbsp;
  82.                 <input type="button" name="Button322" value="新增" class="text" onClick="createDirectory()">&nbsp;&nbsp;
  83.                 <input type="button" name="Button322" value="删除" class="text" onClick="return removeDirectorys()">
  84.               </td>
  85.             </tr>
  86.             <tr align=middle> 
  87.               <td width="7%"><font class="strong">选择</font></td>
  88.               <td width="31%"><font class="strong">名称</font></td>
  89.               <td width="31%"><font class="strong">发布部门</font></td>
  90.               <td width="31%"><font class="strong">发布时间</font></td>
  91.             </tr>
  92. <%
  93.   Collection coll = directoryProxy.getDirectoryList();
  94.   DirectoryValueBean rvb = null;
  95.   
  96.   int start = 1;
  97.   if ( request.getParameter("start") !=null )
  98.   {
  99.     start = Integer.parseInt( request.getParameter("start") );
  100.   }
  101.   int rowPerPage = com.vnex.intranet.system.loader.ConfigParaLoader.getParameterByInt("rowNum");
  102.   int size = coll.size(); 
  103.   String action = "/mainctrl/commoninfo/directory/getDirectoryList?";
  104.   String nav = NavBar.makeNavbar(start, size, rowPerPage, action);
  105.   int i = 0;
  106.      if(coll != null && coll.size() != 0)
  107.      {
  108.        Iterator it = coll.iterator();
  109.        int flag = 0;
  110.        String bgcolor = null;
  111.        while( it.hasNext() && i < size && i < ( start+rowPerPage-1) )
  112.        {
  113.            i++;
  114.            rvb = (DirectoryValueBean)it.next();
  115.            if ( i < start ) continue;
  116.            if( flag%2==0 )
  117.            {
  118.              bgcolor = "#e0e0e0";
  119.            }
  120.            else
  121.            {
  122.              bgcolor = "#fafafa";
  123.            }
  124. %>
  125.             <tr align=middle bgcolor="<%= bgcolor%>"> 
  126.               <td width="7%"> 
  127.                 <input type="checkbox" name="directoryIds" value="<%= rvb.getDirectoryId()%>">
  128.               </td>
  129.               <td width="31%"><a href="/mainctrl/commoninfo/directory/detailDirectory?directoryId=<%= rvb.getDirectoryId()%>&start=<%= start%>"><%= FieldUtil.filterScriptTag(rvb.getDirectoryName())%></a></td>
  130.               <td width="31%"><%= rvb.getDirectoryDepartment()%></td>
  131.               <td width="31%"><% if(rvb.getPublishDate()!=null) out.println(rvb.getPublishDate().toString().substring(0,16)); else out.println(rvb.getPublishDate());%></td>
  132.             </tr>
  133. <%
  134.            flag++;
  135.          }
  136.        }
  137. %>
  138. <%
  139.   if(size!=0)
  140.   {
  141. %>
  142.             <tr bgcolor="#fafafa"> 
  143.               <td align="middle"> 
  144.                 <input type="checkbox" name="chkall" value="on" onclick="CheckAll(this.form)">
  145.               </td>  
  146.               <td colspan="3">&nbsp;&nbsp;全选</td>
  147.             </tr>
  148. <%
  149.   }
  150. %>
  151.             <tr align=middle> 
  152.               <td bgcolor="#e0e0e0" colspan="4"> 
  153.                 <div align="left">&nbsp;<%= nav %></div>
  154.               </td>
  155.             </tr>
  156.           </table>
  157.           
  158.               </td>
  159.             </tr>
  160.           </table>
  161.           <br>
  162.           <br>
  163.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  164.        </TD>
  165.     </TR>
  166.     <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  167.     </TBODY> 
  168.   </TABLE>
  169.   <BR>
  170.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  171. </form></DIV>
  172. </BODY></HTML>