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