_, so if I wanted to scroll to * dc=example,dc=com for server 3, the URL would be: * tree.php#3_dc%3Dexample%2Cdc%3Dcom */ require 'common.php'; // no expire header stuff header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); // The entire visible tree is stored in the session. session_start(); // do we not have a tree yet? Build a new one. if( ! session_is_registered( 'tree' ) || ! isset( $_SESSION['tree'] ) ) { session_register( 'tree' ); $_SESSION['tree'] = build_initial_tree(); session_register( 'tree_icons' ); $_SESSION['tree_icons'] = build_initial_tree_icons(); } // grab the tree out of the session variable $tree = $_SESSION['tree']; $tree_icons = $_SESSION['tree_icons']; include 'header.php'; ?>

phpLDAPadmin -

()
()
$server_tree ) { if( $servers[$server_id]['host'] != '' ) { // Does this server want mass deletion availble? if( mass_delete_enabled( $server_id ) ) { echo "\n"; echo "\n"; } $server_name = $servers[$server_id]['name']; echo ''; echo ''; echo ''; echo ''; // do we have what it takes to authenticate here, or do we need to // present the user with a login link (for 'form' auth_types)? if( have_auth_info( $server_id ) ) { if( pla_ldap_connect( $server_id ) ) { $schema_href = 'schema.php?server_id=' . $server_id . '" target="right_frame'; $search_href= 'search.php?server_id=' . $server_id . '" target="right_frame'; $refresh_href = 'refresh.php?server_id=' . $server_id; $create_href = 'create_form.php?server_id=' . $server_id . '&container=' . rawurlencode( $servers[$server_id]['base'] ); $logout_href = 'logout.php?server_id=' . $server_id; $info_href = 'server_info.php?server_id=' . $server_id; $import_href = 'ldif_import_form.php?server_id=' . $server_id; // Draw the quick-links below the server name: // ( schema | search | refresh | create ) echo ''; if( $servers[$server_id]['auth_type'] == 'form' && have_auth_info( $server_id ) ) echo ""; if( is_server_read_only( $server_id ) ) echo ""; // Fetch and display the base DN for this server //$rdn = utf8_decode( $dn ); if( null == $servers[ $server_id ]['base'] ) { $base_dn = try_to_get_root_dn( $server_id ); } else { $base_dn = $servers[ $server_id ]['base']; } // Did we get a base_dn for this server somehow? if( $base_dn ) { echo "\n\n\n\n"; // is the root of the tree expanded already? if( isset( $tree[$server_id][$base_dn] ) ) { $expand_href = "collapse.php?server_id=$server_id&" . "dn=" . rawurlencode( $base_dn ); $expand_img = "images/minus.png"; } else { $expand_href = "expand.php?server_id=$server_id&" . "dn=" . rawurlencode( $base_dn ); $expand_img = "images/plus.png"; } $edit_href = "edit.php?server_id=$server_id&dn=" . rawurlencode( $base_dn ); $icon = isset( $tree_icons[ $server_id ][ $base_dn ] ) ? $tree_icons[ $server_id ][ $base_dn ] : get_icon( $server_id, $base_dn ); // Shall we draw the "mass-delete" checkbox? if( mass_delete_enabled( $server_id ) ) { echo "\n"; } echo ""; echo "\n"; echo "\n"; echo "\n"; } else { // end if( $base_dn ) if( "" === $base_dn || null === $base_dn ) { // The server refuses to give out the base dn echo ""; // Proceed to the next server. We cannot draw anything else for this server. continue; } else { // For some unknown reason, we couldn't determine the base dn echo ""; // Proceed to the next server. We cannot draw anything else for this server. continue; } } flush(); // Is the root of the tree expanded already? if( isset( $tree[$server_id][$base_dn] ) && is_array( $tree[$server_id][$base_dn] ) ) { foreach( $tree[ $server_id ][ $base_dn ] as $child_dn ) draw_tree_html( $child_dn, $server_id, 0 ); if( ! is_server_read_only( $server_id ) ) { echo ''; echo ''; echo ''; } } } else { // end if( pla_ldap_connect( $ds ) ) // could not connect to LDAP server echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; if( $servers[ $server_id ][ 'auth_type' ] == 'form' ) { $logout_href = 'logout.php?server_id=' . $server_id; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } // Proceed to the next server in the list. We cannot do anything mroe here. continue; } } else { // end if have_auth_info( $server_id ) // We don't have enough information to login to this server // Draw the "login..." link $login_href = "login_form.php?server_id=$server_id"; echo ''; echo ''; echo ''; echo ''; } if( mass_delete_enabled( $server_id ) ) { echo "\n"; echo "\n"; echo "\n"; } } } ?>
server'; echo '' . htmlspecialchars( $server_name ) . '
" . $lang['logged_in_as'] . htmlspecialchars(get_logged_in_dn($server_id)) . "
" . "(" . $lang['read_only'] . ")
"; echo ""; echo "$base_dn
"; echo $lang['could_not_determine_root']; echo '
'; echo $lang['ldap_refuses_to_give_root']; echo '
'; echo $lang['please_specify_in_config']; echo "
"; echo $lang['could_not_determine_root']; echo '
'; echo $lang['please_specify_in_config']; echo "
' . $lang['create_new'] . '
" . $lang['could_not_connect'] . "
"; echo "" . $lang['logout'] . "
"; print_r( $tree ); ?> '; for( $i=0; $i<=$level; $i++ ) { echo '' . "\n"; } // Shall we draw the "mass-delete" checkbox? if( mass_delete_enabled( $server_id ) ) { echo " \n"; } // is this node expanded? (deciding whether to draw "+" or "-") if( isset( $tree[$server_id][$dn] ) ) { ?> plus (' . count( $tree[$server_id][$dn] ) . ')'; } else { ?> minus '; for( $i=0; $i<=$level; $i++ ) { echo ''; } echo ''; echo ''; echo '' . $lang['create_new'] . ''; } echo ''; } ?>