';
}
/* Has the use already begun to descend into a specific server tree? */
if (isset($ldapserver) && ! is_null($entry['container'])) {
if (! $ldapserver->haveAuthInfo())
pla_error(_('Not enough information to login to server. Please check your configuration.'));
$entry['children'] = $ldapserver->getContainerContents($entry['container'],0,'(objectClass=*)',$_SESSION[APPCONFIG]->GetValue('deref','tree'));
sort($entry['children']);
foreach ($ldapserver->getBaseDN() as $base_dn) {
if (DEBUG_ENABLED)
debug_log('Comparing BaseDN [%s] with container [%s]',64,__FILE__,__LINE__,__METHOD__,$base_dn,$entry['container']);
if (! pla_compare_dns($entry['container'],$base_dn)) {
$parent_container = false;
$href['up'] = htmlspecialchars(sprintf('entry_chooser.php?form_element=%s&rdn=%s',$entry['element'],$entry['rdn']));
break;
} else {
$parent_container = get_container($entry['container']);
$href['up'] = htmlspecialchars(sprintf('entry_chooser.php?form_element=%s&rdn=%s&server_id=%s&container=%s',
$entry['element'],$entry['rdn'],$ldapserver->server_id,rawurlencode($parent_container)));
}
}
echo '
';
echo "\n\n";
}
/* draw the root of the selection tree (ie, list all the servers) */
} else {
foreach ($_SESSION[APPCONFIG]->ldapservers->GetServerList() as $id) {
$ldapserver = $_SESSION[APPCONFIG]->ldapservers->Instance($id);
if ($ldapserver->isVisible()) {
if (! $ldapserver->haveAuthInfo())
continue;
else {
printf('
%s:
%s
',_('Server'),htmlspecialchars($ldapserver->name));
foreach ($ldapserver->getBaseDN() as $dn) {
if (! $dn) {
printf('