Quick Search:

View

Revision:

Diff

Diff from 1850 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/osCommerce/branches/hpdl/oscommerce/admin/includes/applications/administrators/pages/batch_delete.php

Annotated File View

hpdl
1125
1 <?php
2 /*
3   $Id: batch_delete.php 1850 2009-02-28 03:07:56Z hpdl $
4
5   osCommerce, Open Source E-Commerce Solutions
6   http://www.oscommerce.com
7
hpdl
1446
8   Copyright (c) 2007 osCommerce
hpdl
1125
9
hpdl
1497
10   This program is free software; you can redistribute it and/or modify
11   it under the terms of the GNU General Public License v2 (1991)
12   as published by the Free Software Foundation.
hpdl
1125
13 */
14 ?>
15
hpdl
1405
16 <h1><?php echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule()), $osC_Template->getPageTitle()); ?></h1>
hpdl
1125
17
18 <?php
19   if ($osC_MessageStack->size($osC_Template->getModule()) > 0) {
hpdl
1845
20     echo $osC_MessageStack->get($osC_Template->getModule());
hpdl
1125
21   }
22 ?>
23
hpdl
1475
24 <div class="infoBoxHeading"><?php echo osc_icon('trash.png') . ' ' . $osC_Language->get('action_heading_batch_delete_administrators'); ?></div>
hpdl
1125
25 <div class="infoBoxContent">
hpdl
1405
26   <form name="aDeleteBatch" action="<?php echo osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&page=' . $_GET['page'] . '&action=batchDelete'); ?>" method="post">
hpdl
1125
27
hpdl
1446
28   <p><?php echo $osC_Language->get('introduction_batch_delete_administrators'); ?></p>
hpdl
1125
29
30 <?php
31   $Qadmins = $osC_Database->query('select id, user_name from :table_administrators where id in (":id") order by user_name');
32   $Qadmins->bindTable(':table_administrators', TABLE_ADMINISTRATORS);
33   $Qadmins->bindRaw(':id', implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))));
34   $Qadmins->execute();
35
36   $names_string = '';
37
38   while ($Qadmins->next()) {
39     $names_string .= osc_draw_hidden_field('batch[]', $Qadmins->valueInt('id')) . '<b>' . $Qadmins->value('user_name') . '</b>, ';
40   }
41
42   if ( !empty($names_string) ) {
hpdl
1200
43     $names_string = substr($names_string, 0, -2);
hpdl
1125
44   }
45
46   echo '<p>' . $names_string . '</p>';
47 ?>
48
hpdl
1475
49   <p align="center"><?php echo osc_draw_hidden_field('subaction', 'confirm') . '<input type="submit" value="' . $osC_Language->get('button_delete') . '" class="operationButton" /> <input type="button" value="' . $osC_Language->get('button_cancel') . '" onclick="document.location.href=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&page=' . $_GET['page']) . '\';" class="operationButton" />'; ?></p>
hpdl
1125
50
51   </form>
52 </div>