~piersharding/udi/master-udi

« back to all changes in this revision

Viewing changes to htdocs/mass_delete.php

  • Committer: Piers Harding
  • Date: 2011-10-02 21:27:04 UTC
  • mfrom: (151.1.63)
  • Revision ID: git-v1:a3e8fccd857706bbe9f37a05061ddc2e2d0b8143
Merge branch 'master' into test-master-merge

Conflicts:
        lib/ds_ldap_pla.php
        lib/page.php

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
echo "\n";
47
47
 
48
48
echo '<center>';
49
 
echo '<table class="forminput" border=0>';
 
49
echo '<table class="forminput" border="0">';
50
50
 
51
51
if (count($request['parent']) == 1)
52
 
        printf('<tr><td colspan=4><b>%s</b></td></tr>',_('Are you sure you want to permanently delete this object?'));
 
52
        printf('<tr><td colspan="4"><b>%s</b></td></tr>',_('Are you sure you want to permanently delete this object?'));
53
53
else
54
 
        printf('<tr><td colspan=4><b>%s</b></td></tr>',_('Are you sure you want to permanently delete these objects?'));
 
54
        printf('<tr><td colspan="4"><b>%s</b></td></tr>',_('Are you sure you want to permanently delete these objects?'));
55
55
 
56
 
echo '<tr><td colspan=4>&nbsp;</td></tr>';
57
 
printf('<tr><td width=10%%>%s:</td><td colspan=3 width=75%%><b>%s</b></td></tr>',_('Server'),$app['server']->getName());
 
56
echo '<tr><td colspan="4">&nbsp;</td></tr>';
 
57
printf('<tr><td style="width: 10%%;">%s:</td><td colspan="3" style="width: 75%%;"><b>%s</b></td></tr>',_('Server'),$app['server']->getName());
58
58
 
59
59
foreach ($request['parent'] as $dn)
60
 
        printf('<tr><td width=10%%><acronym title="%s">%s</acronym></td><td colspan=3 width=75%%><b>%s</b></td></tr>',
 
60
        printf('<tr><td style="width: 10%%;"><acronym title="%s">%s</acronym></td><td colspan="3" style="width: 75%%;"><b>%s</b></td></tr>',
61
61
                _('Distinguished Name'),_('DN'),$dn);
62
62
 
63
 
echo '<tr><td colspan=4>&nbsp;</td></tr>';
 
63
echo '<tr><td colspan="4">&nbsp;</td></tr>';
64
64
 
65
65
$request['delete'] = $request['parent'];
66
66
 
67
67
if (count($request['children'])) {
68
 
        printf('<tr><td colspan=4><b>%s</b></td></tr>',_('Permanently delete all children also?'));
69
 
        echo '<tr><td colspan=4>&nbsp;</td></tr>';
 
68
        printf('<tr><td colspan="4"><b>%s</b></td></tr>',_('Permanently delete all children also?'));
 
69
        echo '<tr><td colspan="4">&nbsp;</td></tr>';
70
70
 
71
71
        # We need to see if the children have children
72
72
        $query = array();
85
85
                array_push($request['delete'],$value['dn']);
86
86
 
87
87
        echo '<tr>';
88
 
        echo '<td colspan=4>';
 
88
        echo '<td colspan="4">';
89
89
        printf(_('This request also includes %s children entries.'),count($request['children']));
90
90
        echo '</td></tr>';
91
91
 
92
 
        printf('<tr><td colspan=4>%s</td></tr>',
 
92
        printf('<tr><td colspan="4">%s</td></tr>',
93
93
                sprintf(_('phpLDAPadmin can also recursively delete all %s of the child entries. See below for a list of all the entries that this action will delete. Do you want to do this?'),count($request['children'])));
94
94
 
95
 
        echo '<tr><td colspan=4>&nbsp;</td></tr>';
 
95
        echo '<tr><td colspan="4">&nbsp;</td></tr>';
96
96
 
97
 
        printf('<tr><td colspan=4><small>%s</small></td></tr>',
 
97
        printf('<tr><td colspan="4"><small>%s</small></td></tr>',
98
98
                _('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.'));
99
99
        echo "\n";
100
100
 
101
 
        echo '<tr><td colspan=4>&nbsp;</td></tr>';
 
101
        echo '<tr><td colspan="4">&nbsp;</td></tr>';
102
102
 
103
103
        echo "\n";
104
104
 
105
 
        printf('<tr><td colspan=4><center><b>%s</b></center></td></tr>',_('List of entries to be deleted:'));
106
 
        echo '<tr><td colspan=4>&nbsp;</td></tr>';
 
105
        printf('<tr><td colspan="4"><center><b>%s</b></center></td></tr>',_('List of entries to be deleted:'));
 
106
        echo '<tr><td colspan="4">&nbsp;</td></tr>';
107
107
 
108
108
        $i = 0;
109
 
        echo '<tr><td colspan=4><center>';
 
109
        echo '<tr><td colspan="4"><center>';
110
110
        printf('<select size="%s" multiple disabled style="background:white; color:black;width:500px" >',min(10,count($request['delete'])));
111
111
        foreach ($request['delete'] as $key => $value)
112
112
                printf('<option>%s. %s</option>',++$i,htmlspecialchars(dn_unescape($value)));
114
114
        echo '</center></td></tr>';
115
115
        echo "\n";
116
116
 
117
 
        echo '<tr><td colspan=4>&nbsp;</td></tr>';
 
117
        echo '<tr><td colspan="4">&nbsp;</td></tr>';
118
118
}
119
119
 
120
120
echo '<tr>';
121
 
echo '<td width=50% colspan=2><center>';
 
121
echo '<td colspan="2" style="width: 50%; text-align: center;">';
122
122
echo '<form action="cmd.php" method="post">';
123
123
echo '<input type="hidden" name="cmd" value="rdelete" />';
124
124
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
128
128
echo '</form>';
129
129
echo '</center></td>';
130
130
 
131
 
echo '<td colspan=2 width=50%><center>';
 
131
echo '<td colspan="2" style="width: 50%; text-align: center;">';
132
132
 
133
133
echo '<form action="cmd.php" method="get">';
134
134
echo '<input type="hidden" name="cmd" value="template_engine" />';