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

电子政务应用

开发平台:

Java

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML>
  3. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  4. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  5. <script language="javascript" src="/vnex/validate.js" ></script>
  6. <script language=JavaScript>
  7. function removeCompanys()
  8. {
  9.   if( document.myform.companyIds==null )
  10.   {
  11.     alert("没有要删除的公司。");
  12.     return false;
  13.   }
  14.   if( !isChecked(document.myform.companyIds) )
  15.   {
  16.     alert("请选择要删除的公司。");
  17.     return false;
  18.   }
  19.   if(!confirm("是否确定删除?"))
  20.   {
  21.     return false;
  22.   }
  23.  myform.action= "/mainctrl/commoninfo/addresslist/removeAddressListSuccess";
  24.   myform.submit();
  25. }
  26. function CheckAll(form)
  27. {
  28.   for (var i=0;i<form.elements.length;i++)
  29.   {
  30.     var e = form.elements[i];
  31.     if (e.name != 'chkall')
  32.        e.checked = form.chkall.checked;
  33.   }
  34. }
  35. </script>
  36. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
  37. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  38. <DIV align=center>
  39.   <form name="myform" method="post" action="">
  40.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  41.     <TBODY> 
  42.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  43.     <TR> 
  44.         <TD colSpan=3 align="center">
  45.           <br>
  46.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  47.             <tr>
  48.               <td bgcolor="#fafafa"> 
  49.                 <table class=title cellspacing=1 cellpadding=2 width="600" border=0>
  50.                 <tr>
  51.                  <td colspan="3" bgcolor="#666666"> 
  52.                    <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>
  53.                  </td>
  54.                 </tr>
  55.                 
  56.             <tr bgcolor="#fafafa"> 
  57.               <td colspan="3" height="30">&nbsp;
  58.                 <input type="button" name="Button322" value="新增" class="text" onClick="location='/mainctrl/commoninfo/addresslist/createAddressList'">
  59.                 &nbsp;&nbsp;<input type="button" name="Button3223" value="删除" class="text" onClick="return removeCompanys()">
  60.               </td>
  61.             </tr>
  62.             <tr align=middle> 
  63.               <td width="7%"><font class="strong">选择</font></td>
  64.               <td width="83%"><font class="strong">公司名称</font></td>
  65.               <td width="10%"><font class="strong">操作</font></td>
  66.             </tr>
  67. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  68. <%@ page import="com.vnex.intranet.commoninfo.addresslist.value.*"%>
  69. <%@ page import="com.vnex.intranet.commoninfo.addresslist.proxy.*"%>
  70. <%@ page import="com.vnex.intranet.util.*"%>
  71. <%@ page import="java.util.*" %>
  72. <%@ page import="java.sql.*" %>
  73. <jsp:useBean id="addressListProxy" class="com.vnex.intranet.commoninfo.addresslist.proxy.AddressListProxyBean" scope="application" />
  74. <%
  75.   Collection coll = addressListProxy.getAddressList();
  76.   AddressListValueBean avb = null;
  77.   
  78.   int start = 1;
  79.   if ( request.getParameter("start") !=null )
  80.   {
  81.     start = Integer.parseInt( request.getParameter("start") );
  82.   }
  83.   //int rowPerPage = com.vnex.intranet.statictable.ConfigParaLoader.getParameterByInt("rowNum");
  84.   int rowPerPage = com.vnex.intranet.system.loader.ConfigParaLoader.getParameterByInt("rowNum");
  85.   int size = coll.size(); 
  86.   String action = "/mainctrl/commoninfo/addresslist/getAddressList?";
  87.   String nav = NavBar.makeNavbar(start, size, rowPerPage, action);
  88.   int i = 0;
  89.      if(coll != null && coll.size() != 0)
  90.      {
  91.        Iterator it = coll.iterator();
  92.        int flag = 0;
  93.        String bgcolor = null;
  94.        while( it.hasNext() && i < size && i < ( start+rowPerPage-1) )
  95.        {
  96.            i++;
  97.            avb = (AddressListValueBean)it.next();
  98.            if ( i < start ) continue;
  99.            if( flag%2==0 )
  100.            {
  101.              bgcolor = "#e0e0e0";
  102.            }
  103.            else
  104.            {
  105.              bgcolor = "#fafafa";
  106.            }
  107.            
  108. %>
  109.             <tr align=middle bgcolor="<%= bgcolor%>"> 
  110.               <td width="7%"> 
  111.                 <input type="checkbox" name="companyIds" value="<%= avb.getCompanyId()%>">
  112.               </td>
  113.               <td width="83%"><a href="/mainctrl/commoninfo/addresslist/detailAddressList?companyId=<%= avb.getCompanyId()%>&sstart=<%= start%>"><%= avb.getCompanyName()%></a></td>
  114.               <td width="10%"><a href="/mainctrl/commoninfo/addresslist/modifyAddressList?companyIds=<%= avb.getCompanyId()%>&start=<%= start%>">修改</a></td>
  115.             </tr>
  116. <%
  117.            flag++;
  118.          }
  119.        }
  120. %>
  121. <%
  122.   if(size!=0)
  123.   {
  124. %>
  125.             <tr bgcolor="#fafafa">
  126.               <td align="middle">
  127.                 <input type="checkbox" name="chkall" value="on" onclick="CheckAll(this.form)">
  128.               </td>
  129.               <td colspan="2">
  130.                 &nbsp;&nbsp;全选
  131.               </td>
  132.             </tr>
  133. <%
  134.   }
  135. %>
  136.             <tr> 
  137.               <td bgcolor="#e0e0e0" colspan="3"> 
  138.                 &nbsp;<%= nav %>
  139.               </td>
  140.             </tr>
  141.           </table>
  142.          </td>
  143.        </tr>
  144.      </table>
  145.      <br>
  146.      <br>
  147.      <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  148.     </TD>
  149.     </TR>
  150.     <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  151.     </TBODY> 
  152.   </TABLE>
  153.   <BR>
  154.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  155. </form></DIV>
  156. </BODY></HTML>