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';
46 if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE))
48 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap_users.php";
49 $head[$h][1] = $langs->trans(
"LDAPUsersSynchro");
50 $head[$h][2] =
'users';
54 if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE))
56 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap_groups.php";
57 $head[$h][1] = $langs->trans(
"LDAPGroupsSynchro");
58 $head[$h][2] =
'groups';
62 if (!empty($conf->societe->enabled) && !empty($conf->global->LDAP_CONTACT_ACTIVE))
64 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap_contacts.php";
65 $head[$h][1] = $langs->trans(
"LDAPContactsSynchro");
66 $head[$h][2] =
'contacts';
70 if (!empty($conf->adherent->enabled) && !empty($conf->global->LDAP_MEMBER_ACTIVE))
72 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap_members.php";
73 $head[$h][1] = $langs->trans(
"LDAPMembersSynchro");
74 $head[$h][2] =
'members';
78 if (!empty($conf->adherent->enabled) && !empty($conf->global->LDAP_MEMBER_TYPE_ACTIVE))
80 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap_members_types.php";
81 $head[$h][1] = $langs->trans(
"LDAPMembersTypesSynchro");
82 $head[$h][2] =
'memberstypes';
110 global $langs, $conf, $user;
114 if (!function_exists(
"ldap_connect"))
116 print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
'LDAPFunctionsNotAvailableOnPHP').
'">'.$butlabel.
'</a>';
117 } elseif (empty($conf->global->LDAP_SERVER_HOST))
119 print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
'LDAPSetupNotComplete').
'">'.$butlabel.
'</a>';
120 } elseif (empty($key) || empty($dn) || empty($objectclass))
122 $langs->load(
"errors");
123 print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
'ErrorLDAPSetupNotComplete').
'">'.$butlabel.
'</a>';
125 print '<a class="butAction reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action='.$testlabel.
'">'.$butlabel.
'</a>';
147 if ($count == 0)
return -1;
148 if (!is_array($result))
return -1;
150 foreach ($result as $key => $val)
152 if (
"$key" ==
"objectclass")
continue;
153 if (
"$key" ==
"count")
continue;
154 if (
"$key" ==
"dn")
continue;
155 if (
"$val" ==
"objectclass")
continue;
157 $lastkey[$level] = $key;
162 if (!is_numeric($key))
164 print '<tr class="oddeven">';
168 if (strtolower($key) ==
'userpassword') $hide = 1;
175 if ($hide)
print preg_replace(
'/./i',
'*', $newstring);
176 else print $newstring;
179 if (
"$val" != $lastkey[$level] && !$subcount)
print '</td></tr>';
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...
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.
print
Draft customers invoices.
ldap_prepare_head()
Initialize the array of tabs for customer invoice.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode= 'add')
Complete or removed entries into a head array (used to build tabs).