32
32
printf('<h3 class="title">'._('Delete %s').'</h3>',htmlspecialchars(get_rdn($dn)));
33
33
printf('<h3 class="subtitle">%s: <b>%s</b> %s: <b>%s</b></h3>',
34
_('Server'),$ldapserver->name,_('Distinguished Name'),htmlspecialchars(($dn)));
34
_('Server'),$ldapserver->name,_('Distinguished Name'),htmlspecialchars($dn));
36
39
if ($has_children) {
38
40
printf('<b>%s</b><br /><br />',_('Permanently delete all children also?'));
41
43
# get the total number of child objects (whole sub-tree)
42
44
$s = $ldapserver->search(null,dn_escape($dn),'objectClass=*',array('dn'));
43
45
$sub_tree_count = count($s);
47
echo '<table class="delete_confirm">';
50
printf(_('This entry is the root of a sub-tree containing %s entries.'),$sub_tree_count);
51
printf('<small>(<a href="search.php?search=true&server_id=%s&filter=%s&base_dn=%s&form=advanced&scope=sub">%s</a>)</small>',
52
$ldapserver->server_id,rawurlencode('objectClass=*'),rawurlencode($dn),_('view entries'));
55
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));
58
printf('<small>%s</small>',
59
_('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.'));
63
echo '<table width="100%">';
66
echo '<form action="rdelete.php" method="post">';
67
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($dn));
68
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
69
printf('<input type="submit" class="scary" value="%s" />',sprintf(_('Delete all %s objects'),$sub_tree_count));
71
echo '</center></td>';
74
echo '<form action="template_engine.php" method="get">';
75
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($dn));
76
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
77
printf('<input type="submit" name="submit" value="%s" class="cancel" />',_('Cancel'));
79
echo '</center></td>';
92
echo _('List of entries to be deleted:');
95
printf('<select size="%s" multiple disabled style="background:white; color:black;width:500px" >',min(10,$sub_tree_count));
97
foreach ($s as $dn => $junk) {
99
printf('<option>%s. %s</option>',$i,htmlspecialchars(dn_unescape($dn)));
105
echo '<table class="delete_confirm">';
109
echo _('Are you sure you want to permanently delete this object?');
112
printf('<acronym title="%s">%s</acronym>: <b>%s</b>',_('Distinguished Name'),_('DN'),pretty_print_dn($dn));
114
printf('%s: <b>%s</b>',_('Server'),htmlspecialchars($ldapserver->name));
118
echo '<table width="100%">';
122
echo '<form action="delete.php" method="post">';
123
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($dn));
124
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
125
printf('<input type="submit" name="submit" value="%s" class="scary" />',_('Delete'));
128
echo '</center></td>';
131
echo '<form action="template_engine.php" method="get">';
132
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($dn));
133
printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
134
printf('<input type="submit" name="submit" value="%s" class="cancel" />',_('Cancel'));
137
echo '</center></td>';
46
<table class="delete_confirm">
50
<?php printf(_('This entry is the root of a sub-tree containing %s entries.'),$sub_tree_count); ?>
51
<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>
55
<?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 />
57
<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>
65
<form action="rdelete.php" method="post">
66
<input type="hidden" name="dn" value="<?php echo $dn; ?>" />
67
<input type="hidden" name="server_id" value="<?php echo $ldapserver->server_id; ?>" />
68
<input type="submit" class="scary" value="<?php printf(_('Delete all %s objects'),$sub_tree_count); ?>" />
75
<form action="template_engine.php" method="get">
76
<input type="hidden" name="dn" value="<?php echo htmlspecialchars($dn); ?>" />
77
<input type="hidden" name="server_id" value="<?php echo $ldapserver->server_id; ?>" />
78
<input type="submit" name="submit" value="<?php echo _('Cancel'); ?>" class="cancel" />
91
<?php echo _('List of entries to be deleted:'); ?><br />
93
<select size="<?php echo min(10,$sub_tree_count);?>" multiple disabled style="background:white; color:black;width:500px" >
95
foreach ($s as $dn => $junk) {
98
<option><?php echo $i; ?>. <?php echo htmlspecialchars((dn_unescape($dn))); ?></option>
108
<table class="delete_confirm">
111
<?php echo _('Are you sure you want to permanently delete this object?'); ?><br />
113
<nobr><acronym title="<?php echo _('Distinguished Name'); ?>"><?php echo _('DN'); ?></acronym>: <b><?php echo pretty_print_dn($dn); ?></b></nobr><br />
114
<nobr><?php echo _('Server'); ?>: <b><?php echo htmlspecialchars($ldapserver->name); ?></b></nobr><br />
121
<form action="delete.php" method="post">
122
<input type="hidden" name="dn" value="<?php echo htmlspecialchars($dn); ?>" />
123
<input type="hidden" name="server_id" value="<?php echo $ldapserver->server_id; ?>" />
124
<input type="submit" name="submit" value="<?php echo _('Delete'); ?>" class="scary" />
131
<form action="template_engine.php" method="get">
132
<input type="hidden" name="dn" value="<?php echo $dn; ?>" />
133
<input type="hidden" name="server_id" value="<?php echo $ldapserver->server_id; ?>" />
134
<input type="submit" name="submit" value="<?php echo _('Cancel'); ?>" class="cancel" />