address_list_home.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:9k
源码类别:
电子政务应用
开发平台:
Java
- <%@ taglib uri="/vnex.tld" prefix="vnex"%>
- <%@ taglib uri="/vnex_addresslist.tld" prefix="addresslist"%>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="com.vnex.intranet.util.*"%>
- <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
- <jsp:useBean id="groupSelect" scope="request" class="com.vnex.intranet.addresslist.handler.GroupSelectHandler" />
- <%
- String queryStr = " where emp_id="+BusinessName.getEmpId();
- String pageTo = "/mainctrl/addressbook/home?a";
- String queryCondition = "";
- String start = "1";
- CommonDBOperation cdb = new CommonDBOperation();
- String DBProductName = cdb.getDBProduct();
- if(DBProductName.startsWith("Oracle"))
- {
- if(request.getParameter("search_text") != null)
- {
- String searchText = request.getParameter("search_text");
- pageTo += "&search_text="+searchText;
- queryStr += " and (name like '%"+searchText+"%') ";
- if(!searchText.equals(""))
- {
- queryCondition = "姓名或昵称中包含有"+searchText+"字符的用户";
- }
- }
- }
- else if(DBProductName.startsWith("Microsoft SQL Server"))
- {
- if(request.getParameter("search_text") != null)
- {
- String searchText = request.getParameter("search_text");
- pageTo += "&search_text="+searchText;
- queryStr += " and (name like '%"+cdb.changeCode(searchText)+"%') ";
- if(!searchText.equals(""))
- {
- queryCondition = "姓名或昵称中包含有"+searchText+"字符的用户";
- }
- }
- }
- if(request.getParameter("contactGrp") != null)
- {
- String contactGrp = request.getParameter("contactGrp");
- if(!contactGrp.equals("0"))
- {
- pageTo += "&contactGrp="+contactGrp;
- queryStr += " and contact_id in (select contact_id from t_contact_x_group where group_id="+contactGrp+") ";
- if( !queryCondition.equals(""))
- {
- queryCondition += "以及";
- }
- queryCondition += "属于"+contactGrp+"组别的用户";
- }
- }
- if(request.getParameter("start") != null)
- start = request.getParameter("start");
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
- <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
- <script language="JavaScript" src="/vnex/util/strUtil.js"></script>
- <script language="JavaScript">
- function SelectAll(form)
- {
- for (var i=0;i<form.elements.length;i++)
- {
- var e = form.elements[i];
- if (e.name != 'C1')
- e.checked = form.C1.checked;
- }
- }
- function searchByName(form)
- {
- if(checkChar(form.search_text.value))
- {
- form.action = "/mainctrl/addressbook/home";
- form.submit();
- }
- else
- {
- alert("请不要在查询条件中加入"<>/\'%&这样的字符");
- }
- }
- 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 deleteThem(form)
- {
- if(form.contactIds == null)
- {
- alert("现在尚未有数据可供删除");
- return;
- }
- if(!isChecked(form.contactIds))
- {
- alert("请选择至少一个人员再进行删除");
- return;
- }
- if(confirm("是否要删除所选人员?"))
- {
- form.action="/mainctrl/addressbook/deleteContacts";
- form.submit();
- }
- }
- </script>
- <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/personal/main"><font color="#ffffff">个人办公</font></a>>>个人通讯录</font>
- </td>
- </tr>
- </table>
- <table width="600" border="0" cellspacing="0" cellpadding="0">
- <tr bgcolor="#ffffff" height="30">
- <td align="left">
- <strong>请选择你的用户组:</strong>
- <select name="contactGrp" size="1">
- <%=groupSelect.generateGroupCode(""+BusinessName.getEmpId())%>
- </select>
- <strong>查找用户姓名:</strong>
- <input type="text" name="search_text" size="10" class="text">
- <input type="button" name="button1" value="查找" class="text" onclick="searchByName(this.form)">
- </td>
- </tr>
- </table>
- <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
- <tr bgcolor="#fafafa" height="30">
- <td colspan="7">
- <input type="button" name="Button2" value="新增" onClick="location='/mainctrl/addressbook/createContact'" class="text">
-
- <input type="button" name="Button2" value="删除" onClick="deleteThem(this.form)" class="text">
-
- <input type="button" name="Button3" value="组管理" onclick="location='/mainctrl/addressbook/groupList'" class="text">
-
- <input type="button" name="button4" value="导入" class="text" onclick="location='/mainctrl/addressbook/import'">
-
- <input type="button" name="button5" value="导出" class="text" onclick="location='/mainctrl/addressbook/export'">
- </td>
- </tr>
- <tr>
- <td height="12" width="7%" align="center"><strong>选择</strong></td>
- <td height="12" align="center"><strong>姓名</strong></td>
- <td height="12" align="center"><strong>家庭电话</strong></td>
- <td height="12" align="center"><strong>EMail</strong></td>
- <td height="12" align="center"><strong>单位电话</strong></td>
- <td height="12" align="center"><strong>手机</strong></td>
- <td height="12" align="center"><strong>呼机</strong></td>
- </tr>
- <addresslist:addressList queryStr="<%=queryStr%>">
- <vnex:items paging="true">
- <tr bgcolor="<vnex:itemsColor />">
- <td height="12" width="7%" align="center">
- <input type="checkbox" name="contactIds" value="<addresslist:addressAttribute attribute="contact_id" />">
- </td>
- <td height="12" align="center">
- <a href="/mainctrl/addressbook/contactDetail?contactId=<addresslist:addressAttribute attribute="contact_id" />&start=<%=start%>">
- <addresslist:addressAttribute attribute="contact_name"/></a>
- </td>
- <td height="12" align="center">
- <addresslist:addressAttribute attribute="home_tele_num"/>
- </td>
- <td height="12" align="center">
- <addresslist:addressAttribute attribute="email_address"/>
- </td>
- <td height="12" align="center">
- <addresslist:addressAttribute attribute="unit_tele_num"/>
- </td>
- <td height="12" align="center">
- <addresslist:addressAttribute attribute="mobile_num"/>
- </td>
- <td height="12" align="center">
- <addresslist:addressAttribute attribute="pager_num"/>
- </td>
- </tr>
- </vnex:items>
- <tr bgcolor="#fafafa">
- <td width="7%" align="center"><input type="checkbox" name="C1" onclick="SelectAll(this.form)"></td>
- <td colspan="6"> 全选</td>
- </tr>
- <tr>
- <td colspan="7" bgcolor="#e0e0e0" align="left">
- <vnex:pagingTag pageName="<%=pageTo%>" />
- </td>
- </tr>
- </addresslist:addressList>
- </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>