117 public function selectLdapDnSynchroActive($selected = 0, $htmlname =
'activesynchro', $exclude = array(), $scriptonly = 0, $showempty = 0)
119 global $langs, $form;
121 if (empty($selected)) {
122 $selected = Ldap::SYNCHRO_NONE;
124 if (empty($htmlname)) {
125 $htmlname =
'activesynchro';
128 $dolibarr2ldaplabel = $langs->trans(
"DolibarrToLDAP") . (($scriptonly == 1 || $scriptonly == 3) ?
" (".$langs->trans(
"SupportedForLDAPExportScriptOnly").
")" :
"");
129 $ldap2dolibarrlabel = $langs->trans(
"LDAPToDolibarr") . (($scriptonly == 2 || $scriptonly == 3) ?
" (".$langs->trans(
"SupportedForLDAPImportScriptOnly").
")" :
"");
132 Ldap::SYNCHRO_NONE => $langs->trans(
"No"),
133 Ldap::SYNCHRO_DOLIBARR_TO_LDAP => $dolibarr2ldaplabel,
134 Ldap::SYNCHRO_LDAP_TO_DOLIBARR => $ldap2dolibarrlabel
137 if (is_array($exclude) && !empty($exclude)) {
138 foreach ($exclude as $value) {
139 if (array_key_exists($value, $arraylist)) {
140 unset($arraylist[$value]);
145 return $form->selectarray($htmlname, $arraylist, $selected, $showempty);