35 global $langs,
$conf, $user;
43 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap.php";
44 $head[$h][1] = $langs->trans(
"LDAPGlobalParameters");
45 $head[$h][2] =
'ldap';
49 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap_users.php";
50 $head[$h][1] = $langs->trans(
"LDAPUsersSynchro");
51 $head[$h][2] =
'users';
56 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap_groups.php";
57 $head[$h][1] = $langs->trans(
"LDAPGroupsSynchro");
58 $head[$h][2] =
'groups';
63 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap_contacts.php";
64 $head[$h][1] = $langs->trans(
"LDAPContactsSynchro");
65 $head[$h][2] =
'contacts';
70 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap_members.php";
71 $head[$h][1] = $langs->trans(
"LDAPMembersSynchro");
72 $head[$h][2] =
'members';
77 $head[$h][0] = DOL_URL_ROOT.
"/admin/ldap_members_types.php";
78 $head[$h][1] = $langs->trans(
"LDAPMembersTypesSynchro");
79 $head[$h][2] =
'memberstypes';
106 global $langs,
$conf, $user;
110 if (!function_exists(
"ldap_connect")) {
111 print
'<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
'LDAPFunctionsNotAvailableOnPHP').
'">'.$butlabel.
'</a>';
113 print
'<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
'LDAPSetupNotComplete').
'">'.$butlabel.
'</a>';
114 } elseif (empty($key) || empty($dn) || empty($objectclass)) {
115 $langs->load(
"errors");
116 print
'<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
'ErrorLDAPSetupNotComplete').
'">'.$butlabel.
'</a>';
118 print
'<a class="butAction reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action='.$testlabel.
'">'.$butlabel.
'</a>';
140 if (!is_array($result)) {
146 foreach ($result as $key => $val) {
147 if (
"$key" ==
"objectclass") {
150 if (
"$key" ==
"count") {
153 if (
"$key" ==
"dn") {
156 if (!is_array($val) &&
"$val" ==
"objectclass") {
160 $lastkey[$level] = $key;
162 if (is_array($val)) {
164 if (!is_numeric($key)) {
165 print
'<tr class="oddeven">';
169 if (strtolower($key) ==
'userpassword') {
174 } elseif ($subcount) {
178 print preg_replace(
'/./i',
'*', $newstring);
184 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 a 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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...