RELEASE 0.9.5

This commit is contained in:
Deon George
2009-06-30 19:22:30 +10:00
parent 0a07abd27a
commit d12096bbd3
341 changed files with 22846 additions and 4908 deletions

View File

@@ -1,4 +1,6 @@
<?php
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/delete_form.php,v 1.17 2004/10/21 00:14:48 uugdave Exp $
/*
* delete_form.php
@@ -9,7 +11,7 @@
* - server_id
*/
require 'common.php';
require './common.php';
$dn = $_GET['dn'];
$encoded_dn = rawurlencode( $dn );
@@ -19,34 +21,24 @@ $rdn = $rdn[0];
$server_name = $servers[$server_id]['name'];
if( is_server_read_only( $server_id ) )
pla_error( "You cannot perform updates while server is in read-only mode" );
pla_error( $lang['no_updates_in_read_only_mode'] );
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
check_server_id( $server_id ) or pla_error( $lang['bad_server_id'] );
have_auth_info( $server_id ) or pla_error( $lang['not_enough_login_info'] );
$children = get_container_contents( $server_id, $dn );
$children = get_container_contents( $server_id, $dn,0,'(objectClass=*)',LDAP_DEREF_NEVER );
$has_children = count($children)>0 ? true : false;
include 'header.php'; ?>
include './header.php'; ?>
<body>
<h3 class="title">Delete <b><?php echo htmlspecialchars( ( $rdn ) ); ?></b></h3>
<h3 class="subtitle">Server: <b><?php echo $server_name; ?></b> &nbsp;&nbsp;&nbsp; Distinguished Name: <b><?php echo htmlspecialchars( ( $dn ) ); ?></b></h3>
<?php if( 0 == strcasecmp( $dn, $servers[$server_id]['base'] ) ) { ?>
<center><b>You cannot delete the base <acronym title="Distinguished Name">DN</acronym> entry of the LDAP server.</b></center>
</body>
</html>
<?php exit; ?>
<?php } ?>
<h3 class="title"><?php echo sprintf( $lang['delete_dn'], htmlspecialchars( $rdn ) ); ?></b></h3>
<h3 class="subtitle"><?php echo $lang['server']; ?>: <b><?php echo $server_name; ?></b> &nbsp;&nbsp;&nbsp; <?php echo $lang['distinguished_name']; ?>: <b><?php echo htmlspecialchars( ( $dn ) ); ?></b></h3>
<?php if( $has_children ) { ?>
<center><b>Permanently delete all children also?</b><br /><br />
<center><b><?php echo $lang['permanently_delete_children']; ?></b><br /><br />
<?php
flush(); // so the user can get something on their screen while we figure out how many children this object has
@@ -60,13 +52,16 @@ if( $has_children ) {
<table class="delete_confirm">
<td>
<p>This object is the root of a sub-tree containing <a href="search.php?search=true&amp;server_id=<?php echo $server_id; ?>&amp;filter=<?php echo rawurlencode('objectClass=*'); ?>&amp;base_dn=<?php echo $encoded_dn; ?>&amp;form=advanced&amp;scope=sub"><?php echo ($sub_tree_count); ?> objects</a>
phpLDAPadmin can recursively delete this object and all <?php echo ($sub_tree_count-1); ?> of its children. See below for a list of DNs
that this will delete. Do you want to do this?<br />
<p>
<?php echo sprintf( $lang['entry_is_root_sub_tree'], $sub_tree_count ); ?>
<small>(<a href="search.php?search=true&amp;server_id=<?php echo $server_id; ?>&amp;filter=<?php echo rawurlencode('objectClass=*'); ?>&amp;base_dn=<?php echo $encoded_dn; ?>&amp;form=advanced&amp;scope=sub"><?php echo $lang['view_entries']; ?></a>)</small>
<br />
<small>Note: This is potentially very dangerous and you do this at your own risk. This operation cannot be undone.
Take into consideration aliases and other such things that may cause problems.</small>
<br />
<?php echo sprintf( $lang['confirm_recursive_delete'], ($sub_tree_count-1) ); ?><br />
<br />
<small><?php echo $lang['confirm_recursive_delete_note']; ?></small>
<br />
<br />
<table width="100%">
@@ -76,16 +71,16 @@ Take into consideration aliases and other such things that may cause problems.</
<form action="rdelete.php" method="post">
<input type="hidden" name="dn" value="<?php echo $dn; ?>" />
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
<input type="submit" class="scary" value="Delete all <?php echo ($sub_tree_count); ?> objects" />
<input type="submit" class="scary" value="<?php echo sprintf( $lang['delete_all_x_objects'], $sub_tree_count ); ?>" />
</form>
</td>
<td>
<center>
<form action="edit.php" method="get">
<input type="hidden" name="dn" value="<?php echo $dn; ?>" />
<input type="hidden" name="dn" value="<?php echo htmlspecialchars($dn); ?>" />
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
<input type="submit" name="submit" value="Cancel" class="cancel" />
<input type="submit" name="submit" value="<?php echo $lang['cancel']; ?>" class="cancel" />
</form>
</center>
</td>
@@ -96,7 +91,7 @@ Take into consideration aliases and other such things that may cause problems.</
<?php flush(); ?>
<br />
<br />
A list of all the <?php echo ($sub_tree_count); ?> <acronym title="Distinguished Name">DN</acronym>s that this action will delete:<br />
<?php echo $lang['list_of_entries_to_be_deleted']; ?><br />
<select size="<?php echo min( 10, $sub_tree_count );?>" multiple disabled style="background:white; color:black;width:500px" >
<?php $i=0; ?>
<?php foreach( $s as $dn => $junk ) { ?>
@@ -115,19 +110,19 @@ A list of all the <?php echo ($sub_tree_count); ?> <acronym title="Distinguished
<table class="delete_confirm">
<td>
Are you sure you want to permanently delete this object?<br />
<?php echo $lang['sure_permanent_delete_object']; ?><br />
<br />
<nobr><acronym title="Distinguished Name">DN</acronym>: <b><?php echo htmlspecialchars(($dn)); ?></b><nobr><br />
<nobr>Server: <b><?php echo htmlspecialchars($server_name); ?></b></nobr><br />
<nobr><acronym title="<?php echo $lang['distinguished_name']; ?>"><?php echo $lang['dn']; ?></acronym>: <b><?php echo pretty_print_dn( $dn ); ?></b><nobr><br />
<nobr><?php echo $lang['server']; ?>: <b><?php echo htmlspecialchars($server_name); ?></b></nobr><br />
<br />
<table width="100%">
<tr>
<td>
<center>
<form action="delete.php" method="post">
<input type="hidden" name="dn" value="<?php echo $dn; ?>" />
<input type="hidden" name="dn" value="<?php echo htmlspecialchars($dn); ?>" />
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
<input type="submit" name="submit" value="Delete It" class="scary" />
<input type="submit" name="submit" value="<?php echo $lang['delete']; ?>" class="scary" />
</center>
</form>
</td>
@@ -137,7 +132,7 @@ Are you sure you want to permanently delete this object?<br />
<form action="edit.php" method="get">
<input type="hidden" name="dn" value="<?php echo $dn; ?>" />
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
<input type="submit" name="submit" value="Cancel" class="cancel" />
<input type="submit" name="submit" value="<?php echo $lang['cancel']; ?>" class="cancel" />
</form>
</center>
</td>
@@ -154,5 +149,3 @@ Are you sure you want to permanently delete this object?<br />
</body>
</html>