Changeset 4984 for branches/2.2/reports/inc/class.functions.inc.php
- Timestamp:
- 08/24/11 16:00:47 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/reports/inc/class.functions.inc.php
r4570 r4984 1111 1111 return $total_count; 1112 1112 } 1113 1113 1114 function get_num_users_sector($query, $contexts) { 1115 $dn = $GLOBALS['phpgw_info']['server']['ldap_root_dn']; 1116 $passwd = $GLOBALS['phpgw_info']['server']['ldap_root_pw']; 1117 $ldap_conn = ldap_connect($GLOBALS['phpgw_info']['server']['ldap_host']); 1118 ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3); 1119 ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0); 1120 ldap_bind($ldap_conn,$dn,$passwd); 1121 1122 $filter="(phpgwAccountType=u)"; 1123 $justthese = array("uidnumber"); 1124 $count = 0; 1125 foreach ($contexts as $index=>$context) { 1126 $search = ldap_search($ldap_conn, $query, $filter, $justthese); 1127 $count+=ldap_count_entries($ldap_conn, $search); 1128 } 1129 return $count; 1130 } 1131 1114 1132 function get_list_user_sector_logon($query, $contexts,$sizelimit,$numacesso) 1115 1133 {
Note: See TracChangeset
for help on using the changeset viewer.