2009-06-30 08:09:20 +00:00
|
|
|
<?php
|
2009-06-30 10:41:18 +00:00
|
|
|
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/expand.php,v 1.25 2006/10/28 11:42:10 wurley Exp $
|
2009-06-30 09:22:30 +00:00
|
|
|
|
2009-06-30 09:29:51 +00:00
|
|
|
/**
|
2009-06-30 08:05:37 +00:00
|
|
|
* This script alters the session variable 'tree', expanding it
|
2009-06-30 09:29:51 +00:00
|
|
|
* at the dn specified in the query string.
|
2009-06-30 08:05:37 +00:00
|
|
|
*
|
2009-06-30 09:29:51 +00:00
|
|
|
* Variables that come in via common.php
|
|
|
|
* - server_id
|
2009-06-30 08:05:37 +00:00
|
|
|
* Variables that come in as GET vars:
|
|
|
|
* - dn (rawurlencoded)
|
|
|
|
*
|
|
|
|
* Note: this script is equal and opposite to collapse.php
|
2009-06-30 09:29:51 +00:00
|
|
|
* @package phpLDAPadmin
|
|
|
|
* @see collapse.php
|
|
|
|
*/
|
|
|
|
/**
|
2009-06-30 08:05:37 +00:00
|
|
|
*/
|
|
|
|
|
2009-06-30 09:22:30 +00:00
|
|
|
require './common.php';
|
2009-06-30 10:26:08 +00:00
|
|
|
no_expire_header();
|
2009-06-30 08:05:37 +00:00
|
|
|
|
2009-06-30 09:29:51 +00:00
|
|
|
if (! $ldapserver->haveAuthInfo())
|
2009-06-30 10:26:08 +00:00
|
|
|
pla_error(_('Not enough information to login to server. Please check your configuration.'));
|
2009-06-30 08:05:37 +00:00
|
|
|
|
2009-06-30 09:29:51 +00:00
|
|
|
# This allows us to display large sub-trees without running out of time.
|
2009-06-30 10:26:08 +00:00
|
|
|
@set_time_limit(0);
|
2009-06-30 09:22:30 +00:00
|
|
|
|
2009-06-30 08:07:14 +00:00
|
|
|
$dn = $_GET['dn'];
|
2009-06-30 08:05:37 +00:00
|
|
|
|
2009-06-30 10:26:08 +00:00
|
|
|
# We dont need this result, as we'll use the SESSION value when we call tree.php
|
2009-06-30 10:41:18 +00:00
|
|
|
$ldapserver->getContainerContents($dn,0,$config->GetValue('appearance','tree_filter'),$config->GetValue('deref','tree'));
|
2009-06-30 09:22:30 +00:00
|
|
|
|
2009-06-30 10:26:08 +00:00
|
|
|
$tree = get_cached_item($ldapserver->server_id,'tree');
|
|
|
|
$tree['browser'][$dn]['open'] = true;
|
|
|
|
set_cached_item($ldapserver->server_id,'tree','null',$tree);
|
2009-06-30 08:07:14 +00:00
|
|
|
|
2009-06-30 10:26:08 +00:00
|
|
|
/* If cookies were disabled, build the url parameter for the session id.
|
|
|
|
It will be append to the url to be redirect */
|
|
|
|
$id_session_param = '';
|
|
|
|
if (SID != '')
|
|
|
|
$id_session_param = sprintf('&%s=%s',session_name(),session_id());
|
2009-06-30 08:09:20 +00:00
|
|
|
|
2009-06-30 10:41:18 +00:00
|
|
|
header(sprintf('Location:tree.php?foo=%s#%s_%s%s',random_junk(),$ldapserver->server_id,rawurlencode($dn),$id_session_param));
|
2009-06-30 08:05:37 +00:00
|
|
|
?>
|