LDAP Account Manager\n"; echo "\n"; echo "\n"; echo ""; $dn = $_POST['dn']; $encoded_dn = rawurlencode( $dn ); $ds = $_SESSION['ldap']->server(); $del_result = @ldap_delete( $ds, $dn ); if( $del_result ) { // kill the DN from the tree browser session variable and // refresh the tree viewer frame (left_frame) if( array_key_exists( 'tree', $_SESSION ) ) { $tree = $_SESSION['tree']; if( isset( $tree ) && is_array( $tree ) ) { // does it have children? (it shouldn't, but hey, you never know) if( isset( $tree[$dn] ) ) unset( $tree[$dn] ); // search and destroy foreach( $tree as $tree_dn => $subtree ) foreach( $subtree as $key => $sub_tree_dn ) if( 0 == strcasecmp( $sub_tree_dn, $dn ) ) unset( $tree[$tree_dn][$key] ); $_SESSION['tree'] = $tree; } } ?>

";