RELEASE 0.9.8.3
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/delete_form.php,v 1.20.4.5 2005/12/11 08:21:03 wurley Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/delete_form.php,v 1.20.4.6 2006/04/29 04:05:14 wurley Exp $
|
||||
|
||||
/**
|
||||
* delete_form.php
|
||||
@@ -31,118 +31,123 @@ include './header.php';
|
||||
echo '<body>';
|
||||
printf('<h3 class="title">'._('Delete %s').'</h3>',htmlspecialchars(get_rdn($dn)));
|
||||
printf('<h3 class="subtitle">%s: <b>%s</b> %s: <b>%s</b></h3>',
|
||||
_('Server'),$ldapserver->name,_('Distinguished Name'),htmlspecialchars(($dn)));
|
||||
_('Server'),$ldapserver->name,_('Distinguished Name'),htmlspecialchars($dn));
|
||||
echo "\n";
|
||||
|
||||
echo '<center>';
|
||||
|
||||
if ($has_children) {
|
||||
echo '<center>';
|
||||
printf('<b>%s</b><br /><br />',_('Permanently delete all children also?'));
|
||||
flush();
|
||||
|
||||
# get the total number of child objects (whole sub-tree)
|
||||
$s = $ldapserver->search(null,dn_escape($dn),'objectClass=*',array('dn'));
|
||||
$sub_tree_count = count($s);
|
||||
?>
|
||||
|
||||
<table class="delete_confirm">
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<?php printf(_('This entry is the root of a sub-tree containing %s entries.'),$sub_tree_count); ?>
|
||||
<small>(<a href="search.php?search=true&server_id=<?php echo $ldapserver->server_id; ?>&filter=<?php echo rawurlencode('objectClass=*'); ?>&base_dn=<?php echo rawurlencode($dn); ?>&form=advanced&scope=sub"><?php echo _('view entries'); ?></a>)</small>
|
||||
<br />
|
||||
<br />
|
||||
echo '<table class="delete_confirm">';
|
||||
echo '<tr>';
|
||||
echo '<td><p>';
|
||||
printf(_('This entry is the root of a sub-tree containing %s entries.'),$sub_tree_count);
|
||||
printf('<small>(<a href="search.php?search=true&server_id=%s&filter=%s&base_dn=%s&form=advanced&scope=sub">%s</a>)</small>',
|
||||
$ldapserver->server_id,rawurlencode('objectClass=*'),rawurlencode($dn),_('view entries'));
|
||||
echo '<br /><br />';
|
||||
|
||||
<?php printf(_('phpLDAPadmin can recursively delete this entry and all %s of its children. See below for a list of all the entries that this action will delete. Do you want to do this?'),($sub_tree_count-1)); ?><br />
|
||||
<br />
|
||||
<small><?php echo _('Note: this is potentially very dangerous and you do this at your own risk. This operation cannot be undone. Take into consideration aliases, referrals, and other things that may cause problems.'); ?></small>
|
||||
printf(_('phpLDAPadmin can recursively delete this entry and all %s of its children. See below for a list of all the entries that this action will delete. Do you want to do this?'),($sub_tree_count-1));
|
||||
echo '<br /><br />';
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<center>
|
||||
<form action="rdelete.php" method="post">
|
||||
<input type="hidden" name="dn" value="<?php echo $dn; ?>" />
|
||||
<input type="hidden" name="server_id" value="<?php echo $ldapserver->server_id; ?>" />
|
||||
<input type="submit" class="scary" value="<?php printf(_('Delete all %s objects'),$sub_tree_count); ?>" />
|
||||
</form>
|
||||
</center>
|
||||
</td>
|
||||
printf('<small>%s</small>',
|
||||
_('Note: this is potentially very dangerous and you do this at your own risk. This operation cannot be undone. Take into consideration aliases, referrals, and other things that may cause problems.'));
|
||||
echo '<br /><br />';
|
||||
echo "\n";
|
||||
|
||||
<td>
|
||||
<center>
|
||||
<form action="template_engine.php" method="get">
|
||||
<input type="hidden" name="dn" value="<?php echo htmlspecialchars($dn); ?>" />
|
||||
<input type="hidden" name="server_id" value="<?php echo $ldapserver->server_id; ?>" />
|
||||
<input type="submit" name="submit" value="<?php echo _('Cancel'); ?>" class="cancel" />
|
||||
</form>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
echo '<table width="100%">';
|
||||
echo '<tr>';
|
||||
echo '<td><center>';
|
||||
echo '<form action="rdelete.php" method="post">';
|
||||
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($dn));
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
|
||||
printf('<input type="submit" class="scary" value="%s" />',sprintf(_('Delete all %s objects'),$sub_tree_count));
|
||||
echo '</form>';
|
||||
echo '</center></td>';
|
||||
|
||||
<?php flush(); ?>
|
||||
<br />
|
||||
<br />
|
||||
<?php echo _('List of entries to be deleted:'); ?><br />
|
||||
echo '<td><center>';
|
||||
echo '<form action="template_engine.php" method="get">';
|
||||
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($dn));
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
|
||||
printf('<input type="submit" name="submit" value="%s" class="cancel" />',_('Cancel'));
|
||||
echo '</form>';
|
||||
echo '</center></td>';
|
||||
echo '</tr>';
|
||||
echo '</table>';
|
||||
echo "\n";
|
||||
|
||||
<select size="<?php echo min(10,$sub_tree_count);?>" multiple disabled style="background:white; color:black;width:500px" >
|
||||
<?php $i=0;
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
echo '</table>';
|
||||
echo "\n";
|
||||
|
||||
flush();
|
||||
|
||||
echo '<br /><br />';
|
||||
echo _('List of entries to be deleted:');
|
||||
echo '<br />';
|
||||
|
||||
printf('<select size="%s" multiple disabled style="background:white; color:black;width:500px" >',min(10,$sub_tree_count));
|
||||
$i=0;
|
||||
foreach ($s as $dn => $junk) {
|
||||
$i++; ?>
|
||||
$i++;
|
||||
printf('<option>%s. %s</option>',$i,htmlspecialchars(dn_unescape($dn)));
|
||||
}
|
||||
echo '</select>';
|
||||
echo "\n";
|
||||
|
||||
<option><?php echo $i; ?>. <?php echo htmlspecialchars((dn_unescape($dn))); ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</center>
|
||||
} else {
|
||||
echo '<table class="delete_confirm">';
|
||||
echo '<tr>';
|
||||
|
||||
<br />
|
||||
echo '<td nowrap>';
|
||||
echo _('Are you sure you want to permanently delete this object?');
|
||||
echo '<br /><br />';
|
||||
|
||||
<?php } else { ?>
|
||||
printf('<acronym title="%s">%s</acronym>: <b>%s</b>',_('Distinguished Name'),_('DN'),pretty_print_dn($dn));
|
||||
echo '<br />';
|
||||
printf('%s: <b>%s</b>',_('Server'),htmlspecialchars($ldapserver->name));
|
||||
echo '<br /><br />';
|
||||
echo "\n";
|
||||
|
||||
<center>
|
||||
<table class="delete_confirm">
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo _('Are you sure you want to permanently delete this object?'); ?><br />
|
||||
<br />
|
||||
<nobr><acronym title="<?php echo _('Distinguished Name'); ?>"><?php echo _('DN'); ?></acronym>: <b><?php echo pretty_print_dn($dn); ?></b></nobr><br />
|
||||
<nobr><?php echo _('Server'); ?>: <b><?php echo htmlspecialchars($ldapserver->name); ?></b></nobr><br />
|
||||
<br />
|
||||
echo '<table width="100%">';
|
||||
echo '<tr>';
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<center>
|
||||
<form action="delete.php" method="post">
|
||||
<input type="hidden" name="dn" value="<?php echo htmlspecialchars($dn); ?>" />
|
||||
<input type="hidden" name="server_id" value="<?php echo $ldapserver->server_id; ?>" />
|
||||
<input type="submit" name="submit" value="<?php echo _('Delete'); ?>" class="scary" />
|
||||
</form>
|
||||
</center>
|
||||
</td>
|
||||
echo '<td><center>';
|
||||
echo '<form action="delete.php" method="post">';
|
||||
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($dn));
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
|
||||
printf('<input type="submit" name="submit" value="%s" class="scary" />',_('Delete'));
|
||||
echo '</form>';
|
||||
|
||||
<td>
|
||||
<center>
|
||||
<form action="template_engine.php" method="get">
|
||||
<input type="hidden" name="dn" value="<?php echo $dn; ?>" />
|
||||
<input type="hidden" name="server_id" value="<?php echo $ldapserver->server_id; ?>" />
|
||||
<input type="submit" name="submit" value="<?php echo _('Cancel'); ?>" class="cancel" />
|
||||
</form>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
echo '</center></td>';
|
||||
|
||||
<?php } ?>
|
||||
echo '<td><center>';
|
||||
echo '<form action="template_engine.php" method="get">';
|
||||
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($dn));
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
|
||||
printf('<input type="submit" name="submit" value="%s" class="cancel" />',_('Cancel'));
|
||||
echo '</form>';
|
||||
|
||||
</body>
|
||||
</html>
|
||||
echo '</center></td>';
|
||||
echo '</tr>';
|
||||
echo '</table>';
|
||||
echo "\n";
|
||||
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
echo '</table>';
|
||||
echo "\n";
|
||||
|
||||
}
|
||||
|
||||
echo '</center>';
|
||||
echo '<br />';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
?>
|
||||
|
Reference in New Issue
Block a user