AddressBookView.jsp
3.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="weaver.general.Util" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="PluginUserCheck" class="weaver.license.PluginUserCheck" scope="page" />
<jsp:useBean id="HrmSearchComInfo" class="weaver.hrm.search.HrmSearchComInfo" scope="session" />
<jsp:useBean id="xssUtil" class="weaver.filter.XssUtil" scope="page" />
<%
String imagefilename = "/images/hdHRM_wev8.gif";
String titlename = "";
String needfav ="1";
String needhelp ="";
%>
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
</HEAD>
<body>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<%
String sqlwhere = " where (status = 0 or status = 1 or status = 2 or status = 3) and status != 10 ";
String organizationtype = Util.null2String(request.getParameter("organizationtype"));
String organizationid = Util.null2String(request.getParameter("organizationid"));
if("1".equals(organizationtype)){
sqlwhere += " and subcompanyid1 = " + organizationid + " ";
} else if("2".equals(organizationtype)){
sqlwhere += " and departmentid = " + organizationid + " ";
}
int pagenum=Util.getIntValue(request.getParameter("pagenum"),1);
int perpage=Util.getIntValue(request.getParameter("perpage"),0);
boolean flagaccount = weaver.general.GCONST.getMOREACCOUNTLANDING();
RecordSet.executeProc("HrmUserDefine_SelectByID",""+user.getUID());
if(RecordSet.next()){
perpage =Util.getIntValue(RecordSet.getString(36),-1);
}
if(perpage<=1 ) perpage=10;
String backfields = "hrmresource.id,lastname,workcode,departmentid,email,telephone,mobile,jobtitle,managerid,dsporder,subcompanyid1,accounttype";
String sqlWhere = " "+sqlwhere;
String fromSql = " from HrmResource left join cus_fielddata on hrmresource.id=cus_fielddata.id and cus_fielddata.scopeid=1 ";
String orderby = " dsporder,lastname" ;
String tableString = "";
boolean isHaveMessager=Prop.getPropValue("Messager","IsUseWeaverMessager").equalsIgnoreCase("1");
int isHaveMessagerRight = PluginUserCheck.checkPluginUserRight("messager",user.getUID()+"");
tableString =" <table instanceid=\"hrmDetailTable\" tabletype=\"none\" pagesize=\""+perpage+"\" >"+
" <sql backfields=\""+backfields+"\" sqlform=\""+fromSql+"\" sqlwhere=\""+Util.toHtmlForSplitPage(sqlWhere)+"\" sqlorderby=\""+orderby+"\" sqlprimarykey=\"hrmresource.id\" sqlsortway=\"Asc\" sqlisdistinct=\"true\"/>"+
" <head>"+
" <col width=\"100%\" text=\"\" column=\"id\" transmethod=\"weaver.addressbook.AddressBookUtil.getAddressBookUserInfo\" />"+
" </head>"+
" </table>";
String sql = "SELECT " + backfields + " " + fromSql + " " + sqlWhere + " ORDER BY " + orderby;
%>
<table width=100% height=96% border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="10">
<col width="">
<col width="10">
<tr><td height="10" colspan="3"></td></tr>
<tr>
<td ></td>
<td valign="top">
<TABLE class=Shadow>
<tr>
<td valign="top">
<wea:SplitPageTag tableString='<%=tableString%>' mode="run" isShowTopInfo="false" />
<FORM id=weaver name=frmMain action="AddressBookView.jsp" method=post>
<input class=inputstyle type=hidden name=sqlwhere value="<%=xssUtil.put(sqlwhere)%>" >
</FORM>
</td>
</tr>
</TABLE>
</td>
<td></td>
</tr>
<tr><td height="10" colspan="3"></td></tr>
</table>
</body>
</html>