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

电子政务应用

开发平台:

Java

  1. <%@ taglib uri="/vnex.tld" prefix="vnex"%>
  2. <%@ taglib uri="/vnex_employee_group.tld" prefix="employee"%>
  3. <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
  4. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  5. <%@ page import="com.vnex.intranet.util.*"%>
  6. <%@ page import="com.vnex.intranet.hr.util.*"%>
  7. <%
  8.    String employeeCondition = "";
  9.    String pageTo = "/mainctrl/employeegroup/list?a";
  10.    
  11.    CommonDBOperation cdb = new CommonDBOperation();
  12.    String DBProductName = cdb.getDBProduct();
  13.    if(DBProductName.startsWith("Oracle")) 
  14.    {
  15.      if(request.getParameter("search_name") != null)
  16.      {
  17.         employeeCondition += " and name like '%"+request.getParameter("search_name")+"%' ";
  18.         pageTo += "&search_name="+request.getParameter("search_name");
  19.      }
  20.    }
  21.    else if(DBProductName.startsWith("Microsoft SQL Server"))
  22.    {
  23.      if(request.getParameter("search_name") != null)
  24.      {
  25.         employeeCondition += " and name like '%"+cdb.changeCode(request.getParameter("search_name"))+"%' ";
  26.         pageTo += "&search_name="+request.getParameter("search_name");
  27.      }
  28.    }
  29.    if(request.getParameter("empId") != null && !request.getParameter("empId").equals("0"))
  30.    {
  31.       employeeCondition += " and emp_id="+request.getParameter("empId");
  32.       pageTo += "&empId="+request.getParameter("empId");
  33.    }
  34.    else if(request.getParameter("deptId") != null && !request.getParameter("deptId").equals("0"))
  35.    {
  36.       employeeCondition += " and (emp_id in "
  37.                             + " (select emp_id from " + MemberDbTable.T_EMP_X_DUTY + " where duty_id in "
  38.                             + " (select duty_id from " + MemberDbTable.T_DUTY + " where division_id=" + request.getParameter("deptId") + ") "
  39.                             + " ) or division_id = " + request.getParameter("deptId") + " )";
  40.                             
  41.       pageTo += "&deptId="+request.getParameter("deptId");
  42.    }
  43. %>
  44. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  45. <HTML>
  46. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  47. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_public.js"></script>
  48. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  49. <script language="javascript">
  50. function checkChar(str)
  51. {
  52.     var i,j,strTemp;
  53.     strTemp=""<>/\'%&";
  54.     for (i=0;i<str.length;i++)
  55.     {
  56.       j=strTemp.indexOf(str.charAt(i));
  57.       if (j!=-1)
  58.       {
  59.         return false;
  60.       }
  61.     }
  62.     return true;
  63. }
  64. function searchIt(form)
  65. {
  66.   if(checkChar(form.search_name.value))
  67.   {
  68.      form.action="/mainctrl/employeegroup/list";
  69.      form.submit();
  70.   }
  71.   else
  72.       alert("请不要在查询条件中加入"<>/\'%&这样的字符");
  73. }
  74. </script>
  75. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  76. <DIV align=center>
  77. <form name="form1" method="post" action="">
  78.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  79.     <TBODY>
  80.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  81.     <TR> 
  82.         <TD colSpan=3 align="center"><br>
  83.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  84.             <tr> 
  85.               <td align="center" colspan="2" bgcolor="#FFFFFF"> 
  86.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  87.                   <tr bgcolor="#666666"> 
  88.                         <td colspan="2"><font class="strongw">
  89.                         <a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>&gt;&gt;
  90.                         <a href="/mainctrl/public/main"><font color="#ffffff">公用信息</font></a>&gt;&gt;
  91.                         员工通讯录</font>
  92.                         </td>
  93.                   </tr>
  94.                    <tr bgcolor="#fafafa" height="30">
  95.                       <td><strong>&nbsp;&nbsp;姓名:</strong>&nbsp;
  96.                         <input type="text" class="text" name="search_name" size="20" maxlength="10">&nbsp;
  97.                         <input type="button" class="text" name="b1" value="查询" onclick="searchIt(this.form)">&nbsp;&nbsp;
  98.                         <input type="button" class="text" name="b2" value="高级查询" onclick="location='/mainctrl/employeegroup/advanceSearch'">&nbsp;&nbsp;
  99.                         <input type="button" class="text" name="b3" value="显示全部员工信息" onclick="location='/mainctrl/employeegroup/list'" style="width:100px">
  100.               </td>
  101.            </tr>
  102.          </table>   
  103.                 <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
  104.                             <tr align="center">
  105.                               <td align="center"><strong>姓名</strong></td>
  106.                               <td align="center"><strong>办公室电话</strong></td>
  107.                               <td align="center"><strong>手机</strong></td>
  108.                               <td align="center"><strong>家庭电话</strong></td>
  109.                               <td align="center"><strong>E-Mail</strong></td>
  110.                             </tr>
  111.                             <employee:contactList queryStr="<%=employeeCondition%>">
  112.                             <vnex:items paging="true">
  113.                             <tr bgcolor="<vnex:itemsColor />" align="center">
  114.                               <td align="center"><employee:contactListAttribute attribute="name"/></td>
  115.                               <td align="center"><employee:contactListAttribute attribute="office_telephone"/></td>
  116.                               <td align="center"><employee:contactListAttribute attribute="mobile"/></td>
  117.                               <td align="center"><employee:contactListAttribute attribute="fax"/></td>
  118.                               <td align="center"><a href="mailto:<employee:contactListAttribute attribute="email"/>"><employee:contactListAttribute attribute="email"/></a></td>
  119.                            </tr>
  120.                            </vnex:items>
  121.                           <tr bgcolor="#fafafa">
  122.                               <td colspan="5">&nbsp;
  123.                                 <vnex:pagingTag pageName="<%=pageTo%>" />
  124.                               </td>
  125.                           </tr>
  126.                           </employee:contactList>  
  127.                   </table> 
  128.               </td>
  129.             </tr>
  130.           </table>
  131.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  132.        </TD>
  133.      </TR>
  134.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  135.     </TBODY> 
  136.   </TABLE>
  137.     <BR>
  138.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  139. </form>
  140. </DIV>
  141. </BODY>
  142. </HTML>