" . $lang['entry_chooser_title'] . "\n"; flush(); ?> " . htmlspecialchars( $servers[ $server_id ][ 'name' ] ) . "
\n"; echo $lang['look_in'] . "" . htmlspecialchars( $container ) . "
\n"; } /* Has the use already begun to descend into a specific server tree? */ if( $server_id !== false && $container !== false ) { $ldapserver = new LDAPServer($server_id); if( ! $ldapserver->haveAuthInfo()) pla_error( $lang['not_enough_login_info'] ); $dn_list = get_container_contents( $ldapserver, $container, 0, '(objectClass=*)', get_tree_deref_setting() ); 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( 0 == 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,$server_id,rawurlencode( $parent_container )); } } echo " " . " ". $lang['back_up_p'] ."
\n"; if( count( $dn_list ) == 0 ) echo "   (". $lang['no_entries'] .")
\n"; else foreach( $dn_list as $dn ) { $href = sprintf("javascript:returnDN( '%s%s' )",($rdn ? "$rdn," : ''),$dn); echo "    " . "" . htmlspecialchars( $dn ) . "
\n"; } /* draw the root of the selection tree (ie, list all the servers) */ } else { foreach( $servers as $id => $server ) { $ldapserver = new LDAPServer($id); if( $ldapserver->isVisible() ) { if( ! $ldapserver->haveAuthInfo() ) continue; else { echo "" . htmlspecialchars( $ldapserver->name ) . "
\n"; foreach ($ldapserver->getBaseDN() as $dn) { if( ! $dn ) { echo "   (". $lang['could_not_det_base_dn'] .")
"; } else { $href = sprintf("javascript:returnDN( '%s%s' )",($rdn ? "$rdn," : ''),$dn); echo "    " . "" . htmlspecialchars( $dn ) . "
\n"; } } } } } } // added by PD. 14082003, // adding the element access allows it to work with javascript arrays // the name of the form extracted from the first part of the URL variable. $formpart=substr($return_form_element,0,strpos($return_form_element,".")); // the name of the element extracted from the last part of the URL variable (after the dot) $elmpart =substr($return_form_element,strpos($return_form_element,".")+1); // rebuilt return value $return_form_element = $formpart . ".elements[\"" . $elmpart . "\"]"; ?>