employee_list.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:7k
源码类别:
电子政务应用
开发平台:
Java
- <%@ taglib uri="/vnex.tld" prefix="vnex"%>
- <%@ taglib uri="/vnex_employee_group.tld" prefix="employee"%>
- <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="com.vnex.intranet.util.*"%>
- <%@ page import="com.vnex.intranet.hr.util.*"%>
- <%
- String employeeCondition = "";
- String pageTo = "/mainctrl/employeegroup/list?a";
- CommonDBOperation cdb = new CommonDBOperation();
- String DBProductName = cdb.getDBProduct();
- if(DBProductName.startsWith("Oracle"))
- {
- if(request.getParameter("search_name") != null)
- {
- employeeCondition += " and name like '%"+request.getParameter("search_name")+"%' ";
- pageTo += "&search_name="+request.getParameter("search_name");
- }
- }
- else if(DBProductName.startsWith("Microsoft SQL Server"))
- {
- if(request.getParameter("search_name") != null)
- {
- employeeCondition += " and name like '%"+cdb.changeCode(request.getParameter("search_name"))+"%' ";
- pageTo += "&search_name="+request.getParameter("search_name");
- }
- }
- if(request.getParameter("empId") != null && !request.getParameter("empId").equals("0"))
- {
- employeeCondition += " and emp_id="+request.getParameter("empId");
- pageTo += "&empId="+request.getParameter("empId");
- }
- else if(request.getParameter("deptId") != null && !request.getParameter("deptId").equals("0"))
- {
- employeeCondition += " and (emp_id in "
- + " (select emp_id from " + MemberDbTable.T_EMP_X_DUTY + " where duty_id in "
- + " (select duty_id from " + MemberDbTable.T_DUTY + " where division_id=" + request.getParameter("deptId") + ") "
- + " ) or division_id = " + request.getParameter("deptId") + " )";
- pageTo += "&deptId="+request.getParameter("deptId");
- }
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_public.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <script language="javascript">
- function checkChar(str)
- {
- var i,j,strTemp;
- strTemp=""<>/\'%&";
- for (i=0;i<str.length;i++)
- {
- j=strTemp.indexOf(str.charAt(i));
- if (j!=-1)
- {
- return false;
- }
- }
- return true;
- }
- function searchIt(form)
- {
- if(checkChar(form.search_name.value))
- {
- form.action="/mainctrl/employeegroup/list";
- form.submit();
- }
- else
- alert("请不要在查询条件中加入"<>/\'%&这样的字符");
- }
- </script>
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <DIV align=center>
- <form name="form1" method="post" action="">
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <TBODY>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center"><br>
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr>
- <td align="center" colspan="2" bgcolor="#FFFFFF">
- <table width="600" border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#666666">
- <td colspan="2"><font class="strongw">
- <a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>>>
- <a href="/mainctrl/public/main"><font color="#ffffff">公用信息</font></a>>>
- 员工通讯录</font>
- </td>
- </tr>
- <tr bgcolor="#fafafa" height="30">
- <td><strong> 姓名:</strong>
- <input type="text" class="text" name="search_name" size="20" maxlength="10">
- <input type="button" class="text" name="b1" value="查询" onclick="searchIt(this.form)">
- <input type="button" class="text" name="b2" value="高级查询" onclick="location='/mainctrl/employeegroup/advanceSearch'">
- <input type="button" class="text" name="b3" value="显示全部员工信息" onclick="location='/mainctrl/employeegroup/list'" style="width:100px">
- </td>
- </tr>
- </table>
- <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
- <tr align="center">
- <td align="center"><strong>姓名</strong></td>
- <td align="center"><strong>办公室电话</strong></td>
- <td align="center"><strong>手机</strong></td>
- <td align="center"><strong>家庭电话</strong></td>
- <td align="center"><strong>E-Mail</strong></td>
- </tr>
- <employee:contactList queryStr="<%=employeeCondition%>">
- <vnex:items paging="true">
- <tr bgcolor="<vnex:itemsColor />" align="center">
- <td align="center"><employee:contactListAttribute attribute="name"/></td>
- <td align="center"><employee:contactListAttribute attribute="office_telephone"/></td>
- <td align="center"><employee:contactListAttribute attribute="mobile"/></td>
- <td align="center"><employee:contactListAttribute attribute="fax"/></td>
- <td align="center"><a href="mailto:<employee:contactListAttribute attribute="email"/>"><employee:contactListAttribute attribute="email"/></a></td>
- </tr>
- </vnex:items>
- <tr bgcolor="#fafafa">
- <td colspan="5">
- <vnex:pagingTag pageName="<%=pageTo%>" />
- </td>
- </tr>
- </employee:contactList>
- </table>
- </td>
- </tr>
- </table>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form>
- </DIV>
- </BODY>
- </HTML>