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/main.php

Annotated File View

hpdl
1
1 <?php
2 /*
hpdl
153
3   $Id: main.php 1845 2009-02-27 00:19:37Z hpdl $
hpdl
1
4
5   osCommerce, Open Source E-Commerce Solutions
6   http://www.oscommerce.com
7
hpdl
1384
8   Copyright (c) 2007 osCommerce
hpdl
1
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
1
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
1
17
hpdl
1016
18 <?php
19   if ($osC_MessageStack->size($osC_Template->getModule()) > 0) {
hpdl
1845
20     echo $osC_MessageStack->get($osC_Template->getModule());
hpdl
1016
21   }
22 ?>
23
hpdl
1475
24 <p align="right"><?php echo '<input type="button" value="' . $osC_Language->get('button_insert') . '" onclick="document.location.href=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&page=' . $_GET['page'] . '&action=save') . '\';" class="infoBoxButton" />'; ?></p>
hpdl
1133
25
26 <?php
27   $Qcc = $osC_Database->query('select id, credit_card_name, pattern, credit_card_status, sort_order from :table_credit_cards order by sort_order, credit_card_name');
28   $Qcc->bindTable(':table_credit_cards', TABLE_CREDIT_CARDS);
29   $Qcc->setBatchLimit($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS);
30   $Qcc->execute();
31 ?>
32
hpdl
1202
33 <table border="0" width="100%" cellspacing="0" cellpadding="2">
34   <tr>
hpdl
1475
35     <td><?php echo $Qcc->getBatchTotalPages($osC_Language->get('batch_results_number_of_entries')); ?></td>
hpdl
1384
36     <td align="right"><?php echo $Qcc->getBatchPageLinks('page', $osC_Template->getModule(), false); ?></td>
hpdl
1202
37   </tr>
38 </table>
39
40 <form name="batch" action="#" method="post">
41
42 <table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">
43   <thead>
hpdl
1133
44     <tr>
hpdl
1468
45       <th><?php echo $osC_Language->get('table_heading_credit_cards'); ?></th>
hpdl
1453
46       <th><?php echo $osC_Language->get('table_heading_sort_order'); ?></th>
47       <th width="150"><?php echo $osC_Language->get('table_heading_action'); ?></th>
hpdl
1202
48       <th align="center" width="20"><?php echo osc_draw_checkbox_field('batchFlag', null, null, 'onclick="flagCheckboxes(this);"'); ?></th>
hpdl
1133
49     </tr>
hpdl
1202
50   </thead>
51   <tfoot>
52     <tr>
hpdl
1475
53       <th align="right" colspan="3"><?php echo '<input type="image" src="' . osc_icon_raw('edit.png') . '" title="' . $osC_Language->get('icon_edit') . '" onclick="document.batch.action=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&page=' . $_GET['page'] . '&action=batchSave') . '\';" />&nbsp;<input type="image" src="' . osc_icon_raw('trash.png') . '" title="' . $osC_Language->get('icon_trash') . '" onclick="document.batch.action=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&page=' . $_GET['page'] . '&action=batchDelete') . '\';" />'; ?></th>
hpdl
1202
54       <th align="center" width="20"><?php echo osc_draw_checkbox_field('batchFlag', null, null, 'onclick="flagCheckboxes(this);"'); ?></th>
55     </tr>
56   </tfoot>
57   <tbody>
hpdl
1133
58
hpdl
1
59 <?php
60   while ($Qcc->next()) {
hpdl
1016
61 ?>
hpdl
1
62
hpdl
1202
63     <tr onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);" <?php echo (($Qcc->valueInt('credit_card_status') !== 1) ? 'class="deactivatedRow"' : '') ?>>
64       <td onclick="document.getElementById('batch<?php echo $Qcc->valueInt('id'); ?>').checked = !document.getElementById('batch<?php echo $Qcc->valueInt('id'); ?>').checked;"><?php echo $Qcc->valueProtected('credit_card_name'); ?></td>
65       <td><?php echo $Qcc->valueInt('sort_order'); ?></td>
66       <td align="right">
hpdl
1016
67
hpdl
1
68 <?php
hpdl
1475
69     echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&page=' . $_GET['page'] . '&ccID=' . $Qcc->valueInt('id') . '&action=save'), osc_icon('edit.png')) . '&nbsp;' .
70          osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&page=' . $_GET['page'] . '&ccID=' . $Qcc->valueInt('id') . '&action=delete'), osc_icon('trash.png'));
hpdl
1
71 ?>
hpdl
1016
72
hpdl
1202
73       </td>
74       <td align="center"><?php echo osc_draw_checkbox_field('batch[]', $Qcc->valueInt('id'), null, 'id="batch' . $Qcc->valueInt('id') . '"'); ?></td>
75     </tr>
hpdl
1016
76
hpdl
1
77 <?php
78   }
79 ?>
hpdl
1016
80
hpdl
1202
81   </tbody>
82 </table>
hpdl
1
83
hpdl
1202
84 </form>
hpdl
1133
85
hpdl
1202
86 <table border="0" width="100%" cellspacing="0" cellpadding="2">
87   <tr>
hpdl
1475
88     <td style="opacity: 0.5; filter: alpha(opacity=50);"><?php echo '<b>' . $osC_Language->get('table_action_legend') . '</b> ' . osc_icon('edit.png') . '&nbsp;' . $osC_Language->get('icon_edit') . '&nbsp;&nbsp;' . osc_icon('trash.png') . '&nbsp;' . $osC_Language->get('icon_trash'); ?></td>
hpdl
1384
89     <td align="right"><?php echo $Qcc->getBatchPagesPullDownMenu('page', $osC_Template->getModule()); ?></td>
hpdl
1202
90   </tr>
91 </table>