33 global $langs, $conf, $user;
41 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap.php";
42 $head[$h][1] = $langs->trans(
"LDAPGlobalParameters");
43 $head[$h][2] =
'ldap';
47 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap_users.php";
48 $head[$h][1] = $langs->trans(
"LDAPUsersSynchro");
49 $head[$h][2] =
'users';
54 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap_groups.php";
55 $head[$h][1] = $langs->trans(
"LDAPGroupsSynchro");
56 $head[$h][2] =
'groups';
61 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap_contacts.php";
62 $head[$h][1] = $langs->trans(
"LDAPContactsSynchro");
63 $head[$h][2] =
'contacts';
68 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap_members.php";
69 $head[$h][1] = $langs->trans(
"LDAPMembersSynchro");
70 $head[$h][2] =
'members';
75 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap_members_types.php";
76 $head[$h][1] = $langs->trans(
"LDAPMembersTypesSynchro");
77 $head[$h][2] =
'memberstypes';
104 global $langs, $conf, $user;
108 if (!function_exists(
"ldap_connect")) {
109 print
'<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
'LDAPFunctionsNotAvailableOnPHP').
'">'.$butlabel.
'</a>';
111 print
'<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
'LDAPSetupNotComplete').
'">'.$butlabel.
'</a>';
112 } elseif (empty($key) || empty($dn) || empty($objectclass)) {
113 $langs->load(
"errors");
114 print
'<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
'ErrorLDAPSetupNotComplete').
'">'.$butlabel.
'</a>';
116 print
'<a class="butAction reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action='.$testlabel.
'">'.$butlabel.
'</a>';
140 if (!is_array($result)) {
144 foreach ($result as $key => $val) {
145 if (
"$key" ==
"objectclass") {
148 if (
"$key" ==
"count") {
151 if (
"$key" ==
"dn") {
154 if (!is_array($val) &&
"$val" ==
"objectclass") {
158 $lastkey[$level] = $key;
160 if (is_array($val)) {
162 if (!is_numeric($key)) {
163 print
'<tr class="oddeven">';
167 if (strtolower($key) ==
'userpassword') {
172 } elseif ($subcount) {
176 print preg_replace(
'/./i',
'*', $newstring);
182 if (!is_array($val) &&
"$val" != $lastkey[$level] && !$subcount) {
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1)
This function is called to encode a string into a HTML string but differs from htmlentities because a...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
ldap_prepare_head()
Initialize the array of tabs for customer invoice.
show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass)
Show button test LDAP synchro.
show_ldap_content($result, $level, $count, $var, $hide=0, $subcount=0)
Show a LDAP array into an HTML output array.