Quick Search:

View

Revision:

Diff

Diff from 1845 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/osCommerce/branches/hpdl/oscommerce/admin/templates/pages/credit_cards/batch_edit.php

Annotated File View

hpdl
1133
1 <?php
2 /*
3   $Id: $
4
5   osCommerce, Open Source E-Commerce Solutions
6   http://www.oscommerce.com
7
hpdl
1453
8   Copyright (c) 2007 osCommerce
hpdl
1133
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
1133
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
1133
17
18 <?php
19   if ($osC_MessageStack->size($osC_Template->getModule()) > 0) {
hpdl
1845
20     echo $osC_MessageStack->get($osC_Template->getModule());
hpdl
1133
21   }
22 ?>
23
hpdl
1475
24 <div class="infoBoxHeading"><?php echo osc_icon('edit.png') . ' ' . $osC_Language->get('action_heading_batch_edit_cards'); ?></div>
hpdl
1133
25 <div class="infoBoxContent">
hpdl
1405
26   <form name="ccEditBatch" action="<?php echo osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&page=' . $_GET['page'] . '&action=batchSave'); ?>" method="post">
hpdl
1133
27
hpdl
1453
28   <p><?php echo $osC_Language->get('introduction_batch_edit_cards'); ?></p>
hpdl
1133
29
30 <?php
31   $Qcc = $osC_Database->query('select id, credit_card_name from :table_credit_cards where id in (":id") order by credit_card_name');
32   $Qcc->bindTable(':table_credit_cards', TABLE_CREDIT_CARDS);
33   $Qcc->bindRaw(':id', implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))));
34   $Qcc->execute();
35
36   $names_string = '';
37
38   while ($Qcc->next()) {
39     $names_string .= osc_draw_hidden_field('batch[]', $Qcc->valueInt('id')) . '<b>' . $Qcc->valueProtected('credit_card_name') . '</b>, ';
40   }
41
42   if ( !empty($names_string) ) {
43     $names_string = substr($names_string, 0, -2) . osc_draw_hidden_field('subaction', 'confirm');
44   }
45
46   echo '<p>' . $names_string . '</p>';
47
hpdl
1453
48   echo '<p>' . osc_draw_radio_field('type', array(array('id' => 'activate', 'text' => $osC_Language->get('activate')), array('id' => 'deactivate', 'text' => $osC_Language->get('deactivate'))), 'activate') . '</p>';
hpdl
1133
49 ?>
50
hpdl
1475
51   <p align="center"><?php echo '<input type="submit" value="' . $osC_Language->get('button_save') . '" 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
1133
52
53   </form>
54 </div>