%s',$lang['entry_chooser_title']);
flush();
?>
%s',$lang['server_colon_pare'],htmlspecialchars($ldapserver->name));
print '
';
printf('%s%s',$lang['look_in'],htmlspecialchars($container));
print '
';
}
/* Has the use already begun to descend into a specific server tree? */
if (isset($ldapserver) && $container !== false) {
if (! $ldapserver->haveAuthInfo())
pla_error($lang['not_enough_login_info']);
$dn_list = get_container_contents($ldapserver,$container,0,'(objectClass=*)',$config->GetValue('deref','tree'));
sort($dn_list);
foreach ($ldapserver->getBaseDN() as $base_dn) {
debug_log(sprintf('%s: Comparing BaseDN [%s] with container [%s]','entry_chooser.php',$base_dn,$container),9);
if (! pla_compare_dns($container,$base_dn)) {
$parent_container = false;
$up_href = sprintf('entry_chooser.php?form_element=%s&rdn=%s',$return_form_element,$rdn);
break;
} else {
$parent_container = get_container($container);
$up_href = sprintf('entry_chooser.php?form_element=%s&rdn=%s&server_id=%s&container=%s',
$return_form_element,$rdn,$ldapserver->server_id,rawurlencode($parent_container));
}
}
print ' ';
printf(' %s',$up_href,$lang['back_up_p']);
print '
';
if (! count($dn_list))
printf(' (%s)
',$lang['no_entries']);
else
foreach ($dn_list as $dn) {
$href = sprintf("javascript:returnDN('%s%s')",($rdn ? "$rdn," : ''),$dn);
print ' ';
printf('',
$ldapserver->server_id,$return_form_element,$rdn,rawurlencode($dn));
printf('%s',$href,htmlspecialchars($dn));
print '
';
}
/* draw the root of the selection tree (ie, list all the servers) */
} else {
foreach ($ldapservers->GetServerList() as $id) {
$ldapserver = $ldapservers->Instance($id);
if ($ldapserver->isVisible()) {
if (! $ldapserver->haveAuthInfo())
continue;
else {
printf('%s',htmlspecialchars($ldapserver->name));
print '
';
foreach ($ldapserver->getBaseDN() as $dn) {
if (! $dn) {
printf(' (%s)
',$lang['could_not_det_base_dn']);
} else {
$href = sprintf("javascript:returnDN('%s%s')",($rdn ? "$rdn," : ''),$dn);
print ' ';
printf(' ',
$ldapserver->server_id,$return_form_element,$rdn,rawurlencode($dn));
printf('%s',$href,htmlspecialchars($dn));
print '
';
}
}
}
}
}
}
?>