[TEP-COMMIT] [CVS admin] update to the template structure
anonymous-OfajU3CKLf1/[email protected] 22 Jul 2004 23:27:45 -0000
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit in admin/admin on MAIN
credit_cards.php +55 -204 1.1 -> 1.2
templates/pages/credit_cards.php +152 added 1.1
+207 -204
1 added + 1 modified, total 2 files
update to the template structure
----------
admin /admin
credit_cards.php 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- credit_cards.php 2004/05/12 19:31:25 1.1
+++ credit_cards.php 2004/07/22 23:27:42 1.2
@@ -12,234 +12,85 @@
require('includes/application_top.php');
- $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
+ $selected_box = 'configuration';
- if (tep_not_null($action)) {
- switch ($action) {
- case 'setflag':
- if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
- if (isset($HTTP_GET_VARS['ccID'])) {
- tep_set_credit_card_status($HTTP_GET_VARS['ccID'], $HTTP_GET_VARS['flag']);
- }
+ $action = (isset($_GET['action']) ? $_GET['action'] : '');
- osC_Cache::clear('credit-cards');
-
- }
+ if (!isset($_GET['page']) || (isset($_GET['page']) && !is_numeric($_GET['page']))) {
+ $_GET['page'] = 1;
+ }
- tep_redirect(tep_href_link(FILENAME_CREDIT_CARDS, 'ccID=' . $HTTP_GET_VARS['ccID']));
- break;
- case 'insert':
+ if (!empty($action)) {
+ switch ($action) {
case 'save':
- if (isset($HTTP_GET_VARS['ccID'])) $credit_card_id = tep_db_prepare_input($HTTP_GET_VARS['ccID']);
-
- $credit_card_name = tep_db_prepare_input($HTTP_POST_VARS['credit_card_name']);
- $credit_card_code = tep_db_prepare_input($HTTP_POST_VARS['credit_card_code']);
- $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']);
-
$error = false;
- if (!tep_not_null($credit_card_name)) {
- $messageStack->add_session(ERROR_CREDIT_CARD_NAME, 'error');
+ if (empty($_POST['credit_card_name'])) {
+ $messageStack->add(ERROR_CREDIT_CARD_NAME, 'error');
$error = true;
}
- if (!tep_not_null($credit_card_code)) {
- $messageStack->add_session(ERROR_CREDIT_CARD_CODE, 'error');
+ if (empty($_POST['credit_card_code'])) {
+ $messageStack->add(ERROR_CREDIT_CARD_CODE, 'error');
$error = true;
}
-
- if ($error == false) {
- $sql_data_array = array('credit_card_name' => $credit_card_name,
- 'credit_card_code' => $credit_card_code,
- 'sort_order' => $sort_order);
- if ($action == 'insert') {
- tep_db_perform(TABLE_CREDIT_CARDS, $sql_data_array);
- $credit_card_id = tep_db_insert_id();
- } elseif ($action == 'save') {
- tep_db_perform(TABLE_CREDIT_CARDS, $sql_data_array, 'update', "credit_card_id = '" . (int)$credit_card_id . "'");
+ if ($error === false) {
+ if (isset($_GET['ccID']) && is_numeric($_GET['ccID'])) {
+ $Qcc = $osC_Database->query('update :table_credit_cards set credit_card_name = :credit_card_name, credit_card_code = :credit_card_code, credit_card_status = :credit_card_status, sort_order = :sort_order where credit_card_id = :credit_card_id');
+ $Qcc->bindInt(':credit_card_id', $_GET['ccID']);
+ } else {
+ $Qcc = $osC_Database->query('insert into :table_credit_cards (credit_card_name, credit_card_code, credit_card_status, sort_order) values (:credit_card_name, :credit_card_code, :credit_card_status, :sort_order)');
}
-
- osC_Cache::clear('credit-cards');
+ $Qcc->bindTable(':table_credit_cards', TABLE_CREDIT_CARDS);
+ $Qcc->bindValue(':credit_card_name', $_POST['credit_card_name']);
+ $Qcc->bindValue(':credit_card_code', $_POST['credit_card_code']);
+ $Qcc->bindInt(':credit_card_status', (isset($_POST['credit_card_status']) && ($_POST['credit_card_status'] == '1') ? '1' : '0'));
+ $Qcc->bindInt(':sort_order', $_POST['sort_order']);
+ $Qcc->execute();
+
+ if ($Qcc->affectedRows()) {
+ osC_Cache::clear('credit-cards');
+
+ $messageStack->add_session(SUCCESS_DB_ROWS_UPDATED, 'success');
+ } else {
+ $messageStack->add_session(WARNING_DB_ROWS_NOT_UPDATED, 'warning');
+ }
- tep_redirect(tep_href_link(FILENAME_CREDIT_CARDS, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'ccID=' . $credit_card_id));
+ tep_redirect(tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $_GET['page'] . '&ccID=' . ((isset($_GET['ccID']) && is_numeric($_GET['ccID'])) ? $_GET['ccID'] : $osC_Database->nextID())));
} else {
- tep_redirect(tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $HTTP_GET_VARS['page']));
+ if ($action == 'insert') {
+ $action = 'new';
+ } else {
+ $action = 'configure';
+ }
}
break;
case 'deleteconfirm':
- $credit_card_id = tep_db_prepare_input($HTTP_GET_VARS['ccID']);
-
- tep_db_query("delete from " . TABLE_CREDIT_CARDS . " where credit_card_id = '" . (int)$credit_card_id . "'");
-
- osC_Cache::clear('credit-cards');
+ if (isset($_GET['ccID']) && is_numeric($_GET['ccID'])) {
+ $Qdel = $osC_Database->query('delete from :table_credit_cards where credit_card_id = :credit_card_id');
+ $Qdel->bindRaw(':table_credit_cards', TABLE_CREDIT_CARDS);
+ $Qdel->bindInt(':credit_card_id', $_GET['ccID']);
+ $Qdel->execute();
+
+ if ($Qdel->affectedRows()) {
+ osC_Cache::clear('credit-cards');
+
+ $messageStack->add_session(SUCCESS_DB_ROWS_UPDATED, 'success');
+ } else {
+ $messageStack->add_session(WARNING_DB_ROWS_NOT_UPDATED, 'warning');
+ }
+ }
- tep_redirect(tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $HTTP_GET_VARS['page']));
+ tep_redirect(tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $_GET['page']));
break;
}
}
-?>
-<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html <?php echo HTML_PARAMS; ?>>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
-<title><?php echo TITLE; ?></title>
-<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
-<script language="javascript" src="includes/general.js"></script>
-</head>
-<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
-<!-- header //-->
-<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
-<!-- header_eof //-->
-
-<!-- body //-->
-<table border="0" width="100%" cellspacing="2" cellpadding="2">
- <tr>
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
-<!-- left_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
-<!-- left_navigation_eof //-->
- </table></td>
-<!-- body_text //-->
- <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
- <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr class="dataTableHeadingRow">
- <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CREDIT_CARD_CODE; ?></td>
- <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CREDIT_CARD_NAME; ?></td>
- <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_SORT_ORDER; ?></td>
- <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CREDIT_CARD_STATUS; ?></td>
- <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>
- </tr>
-<?php
- $credit_card_query_raw = "select credit_card_id, credit_card_name, credit_card_code, credit_card_status, sort_order from " . TABLE_CREDIT_CARDS . " order by sort_order";
- $credit_card_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $credit_card_query_raw, $credit_card_query_numrows);
- $credit_card_query = tep_db_query($credit_card_query_raw);
- while ($credit_card = tep_db_fetch_array($credit_card_query)) {
- if ((!isset($HTTP_GET_VARS['ccID']) || (isset($HTTP_GET_VARS['ccID']) && ($HTTP_GET_VARS['ccID'] == $credit_card['credit_card_id']))) && !isset($ccInfo) && (substr($action, 0, 3) != 'new')) {
-
- $ccInfo = new objectInfo($credit_card);
- }
-
- if (isset($ccInfo) && is_object($ccInfo) && ($credit_card['credit_card_id'] == $ccInfo->credit_card_id)) {
- echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $HTTP_GET_VARS['page'] . '&ccID=' . $credit_card['credit_card_id'] . '&action=edit') . '\'">' . "\n";
- } else {
- echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $HTTP_GET_VARS['page'] . '&ccID=' . $credit_card['credit_card_id']) . '\'">' . "\n";
- }
-?>
- <td class="dataTableContent"><?php echo $credit_card['credit_card_code']; ?></td>
- <td class="dataTableContent"><?php echo $credit_card['credit_card_name']; ?></td>
- <td class="dataTableContent"><?php echo $credit_card['sort_order']; ?></td>
- <td class="dataTableContent" align="center">
-<?php
- if ($credit_card['credit_card_status'] == '1') {
- echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' <a href="' . tep_href_link(FILENAME_CREDIT_CARDS, 'action=setflag&flag=0&ccID=' . $credit_card['credit_card_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>';
- } else {
- echo '<a href="' . tep_href_link(FILENAME_CREDIT_CARDS, 'action=setflag&flag=1&ccID=' . $credit_card['credit_card_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a> ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);
- }
-?></td>
- <td class="dataTableContent" align="right"><?php if (isset($ccInfo) && is_object($ccInfo) && ($credit_card['credit_card_id'] == $ccInfo->credit_card_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $HTTP_GET_VARS['page'] . '&ccID=' . $manufacturers['manufacturers_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
- </tr>
-<?php
- }
-?>
- <tr>
- <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="smallText" valign="top"><?php echo $credit_card_split->display_count($credit_card_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_CREDIT_CARDS); ?></td>
- <td class="smallText" align="right"><?php echo $credit_card_split->display_links($credit_card_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?></td>
- </tr>
- </table></td>
- </tr>
-<?php
- if (empty($action)) {
-?>
- <tr>
- <td align="right" colspan="5" class="smallText"><?php echo '<a href="' . tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $HTTP_GET_VARS['page'] . '&ccID=' . $ccInfo->credit_card_id . '&action=new') . '">' . tep_image_button('button_insert.gif', IMAGE_INSERT) . '</a>'; ?></td>
- </tr>
-<?php
- }
-?>
- </table></td>
-<?php
- $heading = array();
- $contents = array();
-
- switch ($action) {
- case 'new':
- $heading[] = array('text' => '<b>' . TEXT_HEADING_NEW_CREDIT_CARD . '</b>');
-
- $contents = array('form' => tep_draw_form('credit_card', FILENAME_CREDIT_CARDS, 'page=' . $HTTP_GET_VARS['page'] . '&ccID=' . $ccInfo->credit_card_id . '&action=insert'));
- $contents[] = array('text' => TEXT_EDIT_INTRO);
- $contents[] = array('text' => '<br>' . TEXT_CREDIT_CARD_NAME . '<br>' . tep_draw_input_field('credit_card_name'));
- $contents[] = array('text' => '<br>' . TEXT_CREDIT_CARD_CODE . '<br>' . tep_draw_input_field('credit_card_code'));
- $contents[] = array('text' => '<br>' . TEXT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order'));
-
- $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $HTTP_GET_VARS['page'] . '&ccID=' . $ccInfo->credit_card_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
- break;
- case 'edit':
- $heading[] = array('text' => '<b>' . TEXT_HEADING_EDIT_CREDIT_CARD . '</b>');
-
- $contents = array('form' => tep_draw_form('credit_card', FILENAME_CREDIT_CARDS, 'page=' . $HTTP_GET_VARS['page'] . '&ccID=' . $ccInfo->credit_card_id . '&action=save'));
- $contents[] = array('text' => TEXT_EDIT_INTRO);
- $contents[] = array('text' => '<br>' . TEXT_CREDIT_CARD_NAME . '<br>' . tep_draw_input_field('credit_card_name', $ccInfo->credit_card_name));
- $contents[] = array('text' => '<br>' . TEXT_CREDIT_CARD_CODE . '<br>' . tep_draw_input_field('credit_card_code', $ccInfo->credit_card_code));
- $contents[] = array('text' => '<br>' . TEXT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', $ccInfo->sort_order));
-
- $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $HTTP_GET_VARS['page'] . '&ccID=' . $ccInfo->credit_card_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
- break;
- case 'delete':
- $heading[] = array('text' => '<b>' . TEXT_HEADING_DELETE_CREDIT_CARD . '</b>');
-
- $contents = array('form' => tep_draw_form('credit_card', FILENAME_CREDIT_CARDS, 'page=' . $HTTP_GET_VARS['page'] . '&ccID=' . $ccInfo->credit_card_id . '&action=deleteconfirm'));
- $contents[] = array('text' => TEXT_DELETE_INTRO);
- $contents[] = array('text' => '<br><b>' . $ccInfo->credit_card_name . '</b>');
-
- $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $HTTP_GET_VARS['page'] . '&ccID=' . $ccInfo->credit_card_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
- break;
- default:
- if (isset($ccInfo) && is_object($ccInfo)) {
- $heading[] = array('text' => '<b>' . $ccInfo->credit_card_name . '</b>');
- $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $HTTP_GET_VARS['page'] . '&ccID=' . $ccInfo->credit_card_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $HTTP_GET_VARS['page'] . '&ccID=' . $ccInfo->credit_card_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
- $contents[] = array('text' => '<br>' . TEXT_CREDIT_CARD_CODE . ' ' . $ccInfo->credit_card_code);
- $contents[] = array('text' => '<br>' . TEXT_SORT_ORDER . ' ' . $ccInfo->sort_order);
- }
- break;
- }
- if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
- echo ' <td width="25%" valign="top">' . "\n";
+ $page_contents = 'credit_cards.php';
- $box = new box;
- echo $box->infoBox($heading, $contents);
+ require('templates/default.php');
- echo ' </td>' . "\n";
- }
+ require('includes/application_bottom.php');
?>
- </tr>
- </table></td>
- </tr>
- </table></td>
-<!-- body_text_eof //-->
- </tr>
-</table>
-<!-- body_eof //-->
-
-<!-- footer //-->
-<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
-<!-- footer_eof //-->
-<br>
-</body>
-</html>
-<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
----------
admin /admin /templates /pages
credit_cards.php added at 1.1
diff -N credit_cards.php
--- /dev/null Fri Jul 23 01:27:41 2004
+++ /tmp/cvsAAAJYaGfd Fri Jul 23 01:27:43 2004
@@ -0,0 +1,152 @@
+<?php
+/*
+ $Id$
+
+ osCommerce, Open Source E-Commerce Solutions
+ http://www.oscommerce.com
+
+ Copyright (c) 2004 osCommerce
+
+ Released under the GNU General Public License
+*/
+?>
+
+<h1><?php echo HEADING_TITLE; ?></h1>
+
+<div id="infoBox_ccDefault" <?php if (!empty($action)) { echo 'style="display: none;"'; } ?>>
+ <table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">
+ <thead>
+ <tr>
+ <th><?php echo TABLE_HEADING_CREDIT_CARD_CODE; ?></th>
+ <th><?php echo TABLE_HEADING_CREDIT_CARD_NAME; ?></th>
+ <th><?php echo TABLE_HEADING_SORT_ORDER; ?></th>
+ <th><?php echo TABLE_HEADING_STATUS; ?></th>
+ <th><?php echo TABLE_HEADING_ACTION; ?></th>
+ </tr>
+ </thead>
+ <tbody>
+<?php
+ $Qcc = $osC_Database->query('select credit_card_id, credit_card_name, credit_card_code, credit_card_status, sort_order from :table_credit_cards order by sort_order');
+ $Qcc->bindTable(':table_credit_cards', TABLE_CREDIT_CARDS);
+ $Qcc->setBatchLimit($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS);
+ $Qcc->execute();
+
+ while ($Qcc->next()) {
+ if (!isset($ccInfo) && (!isset($_GET['ccID']) || (isset($_GET['ccID']) && ($_GET['ccID'] == $Qcc->valueInt('credit_card_id')))) && ($action != 'ccNew')) {
+ $ccInfo = new objectInfo($Qcc->toArray());
+ }
+
+ if (isset($ccInfo) && ($Qcc->valueInt('credit_card_id') == $ccInfo->credit_card_id)) {
+ echo ' <tr class="selected">' . "\n";
+ } else {
+ echo ' <tr onMouseOver="rowOverEffect(this);" onMouseOut="rowOutEffect(this);" onClick="document.location.href=\'' . tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $_GET['page'] . '&ccID=' . $Qcc->valueInt('credit_card_id')) . '\';">' . "\n";
+ }
+?>
+ <td><?php echo $Qcc->valueProtected('credit_card_code'); ?></td>
+ <td><?php echo $Qcc->valueProtected('credit_card_name'); ?></td>
+ <td><?php echo $Qcc->valueInt('sort_order'); ?></td>
+ <td align="center"><?php echo tep_image('templates/' . $template . '/images/icons/' . (($Qcc->valueInt('credit_card_status') === 1) ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif')); ?></td>
+ <td align="right">
+<?php
+ if (isset($ccInfo) && ($Qcc->valueInt('credit_card_id') == $ccInfo->credit_card_id)) {
+ echo '<a href="#" onClick="toggleInfoBox(\'ccEdit\');">' . tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . '</a> ' .
+ '<a href="#" onClick="toggleInfoBox(\'ccDelete\');">' . tep_image('templates/' . $template . '/images/icons/16x16/trash.png', IMAGE_DELETE, '16', '16') . '</a>';
+ } else {
+ echo '<a href="' . tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $_GET['page'] . '&ccID=' . $Qcc->valueInt('credit_card_id') . '&action=ccEdit') . '">' . tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . '</a> ' .
+ '<a href="' . tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $_GET['page'] . '&ccID=' . $Qcc->valueInt('credit_card_id') . '&action=ccDelete') . '">' . tep_image('templates/' . $template . '/images/icons/16x16/trash.png', IMAGE_DELETE, '16', '16') . '</a>';
+ }
+?>
+ </td>
+ </tr>
+<?php
+ }
+?>
+ </tbody>
+ </table>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText"><?php echo $Qcc->displayBatchLinksTotal(TEXT_DISPLAY_NUMBER_OF_CREDIT_CARDS); ?></td>
+ <td class="smallText" align="right"><?php echo $Qcc->displayBatchLinksPullDown(); ?></td>
+ </tr>
+ </table>
+
+ <p align="right"><?php echo '<input type="button" value="' . IMAGE_INSERT . '" onClick="toggleInfoBox(\'ccNew\');" class="infoBoxButton">'; ?></p>
+</div>
+
+<div id="infoBox_ccNew" <?php if ($action != 'ccNew') { echo 'style="display: none;"'; } ?>>
+ <div class="infoBoxHeading"><?php echo tep_image('templates/' . $template . '/images/icons/16x16/new.png', IMAGE_INSERT, '16', '16') . ' ' . TEXT_HEADING_NEW_CREDIT_CARD; ?></div>
+ <div class="infoBoxContent">
+ <?php echo tep_draw_form('ccNew', FILENAME_CREDIT_CARDS, 'action=save'); ?>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText" width="40%"><?php echo '<b>' . TEXT_CREDIT_CARD_NAME . '</b>'; ?></td>
+ <td class="smallText" width="60%"><?php echo osc_draw_input_field('credit_card_name', '', 'style="width: 100%"'); ?></td>
+ </tr>
+ <tr>
+ <td class="smallText" width="40%"><?php echo '<b>' . TEXT_CREDIT_CARD_CODE . '</b>'; ?></td>
+ <td class="smallText" width="60%"><?php echo osc_draw_input_field('credit_card_code', '', 'style="width: 100%"'); ?></td>
+ </tr>
+ <tr>
+ <td class="smallText" width="40%"><?php echo '<b>' . TEXT_SORT_ORDER . '</b>'; ?></td>
+ <td class="smallText" width="60%"><?php echo osc_draw_input_field('sort_order', '', 'style="width: 100%"'); ?></td>
+ </tr>
+ <tr>
+ <td class="smallText" width="40%"><?php echo '<b>' . TEXT_STATUS . '</b>'; ?></td>
+ <td class="smallText" width="60%"><?php echo osc_draw_checkbox_field('credit_card_status', '1'); ?></td>
+ </tr>
+ </table>
+
+ <p align="center"><?php echo '<input type="submit" value="' . IMAGE_SAVE . '" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onClick="toggleInfoBox(\'ccDefault\');" class="operationButton">'; ?></p>
+
+ </form>
+ </div>
+</div>
+
+<?php
+ if (isset($ccInfo)) {
+?>
+
+<div id="infoBox_ccEdit" <?php if ($action != 'ccEdit') { echo 'style="display: none;"'; } ?>>
+ <div class="infoBoxHeading"><?php echo tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . ' ' . $ccInfo->credit_card_name; ?></div>
+ <div class="infoBoxContent">
+ <?php echo tep_draw_form('ccEdit', FILENAME_CREDIT_CARDS, 'page=' . $_GET['page'] . '&ccID=' . $ccInfo->credit_card_id . '&action=save'); ?>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText" width="40%"><?php echo '<b>' . TEXT_CREDIT_CARD_NAME . '</b>'; ?></td>
+ <td class="smallText" width="60%"><?php echo osc_draw_input_field('credit_card_name', $ccInfo->credit_card_name, 'style="width: 100%"'); ?></td>
+ </tr>
+ <tr>
+ <td class="smallText" width="40%"><?php echo '<b>' . TEXT_CREDIT_CARD_CODE . '</b>'; ?></td>
+ <td class="smallText" width="60%"><?php echo osc_draw_input_field('credit_card_code', $ccInfo->credit_card_code, 'style="width: 100%"'); ?></td>
+ </tr>
+ <tr>
+ <td class="smallText" width="40%"><?php echo '<b>' . TEXT_SORT_ORDER . '</b>'; ?></td>
+ <td class="smallText" width="60%"><?php echo osc_draw_input_field('sort_order', $ccInfo->sort_order, 'style="width: 100%"'); ?></td>
+ </tr>
+ <tr>
+ <td class="smallText" width="40%"><?php echo '<b>' . TEXT_STATUS . '</b>'; ?></td>
+ <td class="smallText" width="60%"><?php echo osc_draw_checkbox_field('credit_card_status', '1', $ccInfo->credit_card_status); ?></td>
+ </tr>
+ </table>
+
+ <p align="center"><?php echo '<input type="submit" value="' . IMAGE_SAVE . '" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onClick="toggleInfoBox(\'ccDefault\');" class="operationButton">'; ?></p>
+
+ </form>
+ </div>
+</div>
+
+<div id="infoBox_ccDelete" <?php if ($action != 'ccDelete') { echo 'style="display: none;"'; } ?>>
+ <div class="infoBoxHeading"><?php echo tep_image('templates/' . $template . '/images/icons/16x16/trash.png', IMAGE_DELETE, '16', '16') . ' ' . $ccInfo->credit_card_name; ?></div>
+ <div class="infoBoxContent">
+ <p><?php echo TEXT_DELETE_INTRO; ?></p>
+ <p><?php echo '<b>' . $ccInfo->credit_card_name . '</b>'; ?></p>
+ <p align="center"><?php echo '<input type="button" value="' . IMAGE_DELETE . '" onClick="document.location.href=\'' . tep_href_link(FILENAME_CREDIT_CARDS, 'page=' . $_GET['page'] . '&ccID=' . $ccInfo->credit_card_id . '&action=deleteconfirm') . '\';" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onClick="toggleInfoBox(\'ccDefault\');" class="operationButton">'; ?></p>
+ </div>
+</div>
+
+<?php
+ }
+?>
CVSspam 0.2.8
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click