[TEP-COMMIT] [CVS catalog] remove redundant files
hpdl-OfajU3CKLf1/[email protected] 30 Mar 2005 00:13:18 -0000
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>catalog/catalog</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><span id="removed">checkout_confirmation.php</span></tt></td><td></td><td></td><td nowrap="nowrap"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/checkout_confirmation.php?rev=1.146&content-type=text/vnd.viewcvs-markup">1.146</a> removed</td></tr>
<tr class="alt"><td><tt><span id="removed">checkout_payment.php</span></tt></td><td></td><td></td><td nowrap="nowrap"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/checkout_payment.php?rev=1.120&content-type=text/vnd.viewcvs-markup">1.120</a> removed</td></tr>
<tr><td><tt><span id="removed">checkout_payment_address.php</span></tt></td><td></td><td></td><td nowrap="nowrap"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/checkout_payment_address.php?rev=1.18&content-type=text/vnd.viewcvs-markup">1.18</a> removed</td></tr>
<tr class="alt"><td><tt><span id="removed">checkout_process.php</span></tt></td><td></td><td></td><td nowrap="nowrap"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/checkout_process.php?rev=1.132&content-type=text/vnd.viewcvs-markup">1.132</a> removed</td></tr>
<tr><td><tt><span id="removed">checkout_shipping.php</span></tt></td><td></td><td></td><td nowrap="nowrap"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/checkout_shipping.php?rev=1.25&content-type=text/vnd.viewcvs-markup">1.25</a> removed</td></tr>
<tr class="alt"><td><tt><span id="removed">checkout_shipping_address.php</span></tt></td><td></td><td></td><td nowrap="nowrap"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/checkout_shipping_address.php?rev=1.20&content-type=text/vnd.viewcvs-markup">1.20</a> removed</td></tr>
<tr><td><tt><span id="removed">checkout_success.php</span></tt></td><td></td><td></td><td nowrap="nowrap"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/checkout_success.php?rev=1.52&content-type=text/vnd.viewcvs-markup">1.52</a> removed</td></tr>
</table>
<small id="info">7 removed files</small><br />
<pre class="comment">
remove redundant files
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="removed"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a><br /></span>
<div class="fileheader" id="removed"><big><b>checkout_confirmation.php</b></big> <small id="info">removed after <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/checkout_confirmation.php?rev=1.146&content-type=text/vnd.viewcvs-markup">1.146</a></small></div>
<pre class="diff"><small id="info">diff -N checkout_confirmation.php
--- /tmp/cvsAAAx_aqMb Wed Mar 30 02:13:06 2005
+++ /dev/null Wed Mar 30 02:13:01 2005
@@ -1,396 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?php
-/*
- $Id$
-
- osCommerce, Open Source E-Commerce Solutions
- http://www.oscommerce.com
-
- Copyright (c) 2005 osCommerce
-
- Released under the GNU General Public License
-*/
-
- require('includes/application_top.php');
-
-// if the customer is not logged on, redirect them to the login page
- if ($osC_Customer->isLoggedOn() == false) {
- $navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT));
-
- tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
- }
-
-// if there is nothing in the customers cart, redirect them to the shopping cart page
- if ($cart->count_contents() < 1) {
- tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
- }
-
-// avoid hack attempts during the checkout procedure by checking the internal cartID
- if (isset($cart->cartID) && $osC_Session->exists('cartID')) {
- if ($cart->cartID != $osC_Session->value('cartID')) {
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
- }
- }
-
-// if no shipping method has been selected, redirect the customer to the shipping method selection page
- if ($osC_Session->exists('shipping') == false) {
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
- }
-
- if (isset($_POST['payment'])) {
- $osC_Session->set('payment', $_POST['payment']);
- }
- $payment =& $osC_Session->value('payment');
-
- if ( (isset($_POST['comments'])) && ($osC_Session->exists('comments')) && (empty($_POST['comments'])) ) {
- $osC_Session->remove('comments');
- } else if (tep_not_null($_POST['comments'])) {
- $osC_Session->set('comments', tep_sanitize_string($_POST['comments']));
- }
-
- if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
- if (!isset($_POST['conditions']) || ($_POST['conditions'] != '1')) {
- $messageStack->add_session('checkout_payment', ERROR_CONDITIONS_NOT_ACCEPTED, 'error');
- }
- }
-
-// load the selected payment module
- require(DIR_WS_CLASSES . 'payment.php');
- $payment_modules = new payment($osC_Session->value('payment'));
-
- require(DIR_WS_CLASSES . 'order.php');
- $order = new order;
-
- $payment_modules->update_status();
-
- if ( (is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !isset($$payment)) || (isset($$payment) && is_object($$payment) && ($$payment->enabled == false)) ) {
- $messageStack->add_session('checkout_payment', ERROR_NO_PAYMENT_MODULE_SELECTED, 'error');
- }
-
- if ($messageStack->size('checkout_payment') > 0) {
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
- }
-
- if (is_array($payment_modules->modules)) {
- $payment_modules->pre_confirmation_check();
- }
-
-// load the selected shipping module
- require(DIR_WS_CLASSES . 'shipping.php');
- $shipping_modules = new shipping($osC_Session->value('shipping'));
-
- require(DIR_WS_CLASSES . 'order_total.php');
- $order_total_modules = new order_total;
-
-// Stock Check
- $any_out_of_stock = false;
- if (STOCK_CHECK == 'true') {
- for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
- if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) {
- $any_out_of_stock = true;
- }
- }
- // Out of Stock
- if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) {
- tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
- }
- }
-
- require(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/' . FILENAME_CHECKOUT_CONFIRMATION);
-
- $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
- $breadcrumb->add(NAVBAR_TITLE_2);
-?>
-<!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>
-<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
-<link rel="stylesheet" type="text/css" href="stylesheet.css">
-</head>
-<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
-<!-- header //-->
-<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
-<!-- header_eof //-->
-
-<!-- body //-->
-<table border="0" width="100%" cellspacing="3" cellpadding="3">
- <tr>
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
-<!-- 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="0">
- <tr>
- <td><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_image(DIR_WS_IMAGES . 'table_background_confirmation.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
-<?php
- if ($osC_Session->value('sendto') != false) {
-?>
- <td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><?php echo '<b>' . HEADING_DELIVERY_ADDRESS . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
- </tr>
- <tr>
- <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); ?></td>
- </tr>
-<?php
- if ($order->info['shipping_method']) {
-?>
- <tr>
- <td class="main"><?php echo '<b>' . HEADING_SHIPPING_METHOD . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
- </tr>
- <tr>
- <td class="main"><?php echo $order->info['shipping_method']; ?></td>
- </tr>
-<?php
- }
-?>
- </table></td>
-<?php
- }
-?>
- <td width="<?php echo (($osC_Session->value('sendto') != false) ? '70%' : '100%'); ?>" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
-<?php
- if (sizeof($order->info['tax_groups']) > 1) {
-?>
- <tr>
- <td class="main" colspan="2"><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
- <td class="smallText" align="right"><b><?php echo HEADING_TAX; ?></b></td>
- <td class="smallText" align="right"><b><?php echo HEADING_TOTAL; ?></b></td>
- </tr>
-<?php
- } else {
-?>
- <tr>
- <td class="main" colspan="3"><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
- </tr>
-<?php
- }
-
- for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
- echo ' <tr>' . "\n" .
- ' <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
- ' <td class="main" valign="top">' . $order->products[$i]['name'];
-
- if (STOCK_CHECK == 'true') {
- echo tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty']);
- }
-
- if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {
- for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
- echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';
- }
- }
-
- echo '</td>' . "\n";
-
- if (sizeof($order->info['tax_groups']) > 1) echo ' <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n";
-
- echo ' <td class="main" align="right" valign="top">' . $osC_Currencies->displayPrice($order->products[$i]['final_price'], $order->products[$i]['tax_class_id'], $order->products[$i]['qty']) . '</td>' . "\n" .
- ' </tr>' . "\n";
- }
-?>
- </table></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td class="main"><b><?php echo HEADING_BILLING_INFORMATION; ?></b></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><?php echo '<b>' . HEADING_BILLING_ADDRESS . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
- </tr>
- <tr>
- <td class="main"><?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>'); ?></td>
- </tr>
- <tr>
- <td class="main"><?php echo '<b>' . HEADING_PAYMENT_METHOD . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
- </tr>
- <tr>
- <td class="main"><?php echo $order->info['payment_method']; ?></td>
- </tr>
- </table></td>
- <td width="70%" valign="top" align="right"><table border="0" cellspacing="0" cellpadding="2">
-<?php
- if (MODULE_ORDER_TOTAL_INSTALLED) {
- $order_total_modules->process();
- echo $order_total_modules->output();
- }
-?>
- </table></td>
- </tr>
- </table></td>
- </tr>
-<?php
- if (is_array($payment_modules->modules)) {
- if ($confirmation = $payment_modules->confirmation()) {
-?>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td class="main"><b><?php echo HEADING_PAYMENT_INFORMATION; ?></b></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main" colspan="4"><?php echo $confirmation['title']; ?></td>
- </tr>
-<?php
- for ($i=0, $n=sizeof($confirmation['fields']); $i<$n; $i++) {
-?>
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main"><?php echo $confirmation['fields'][$i]['title']; ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main"><?php echo $confirmation['fields'][$i]['field']; ?></td>
- </tr>
-<?php
- }
-?>
- </table></td>
- </tr>
- </table></td>
- </tr>
-<?php
- }
- }
-?>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- if (tep_not_null($order->info['comments'])) {
-?>
- <tr>
- <td class="main"><?php echo '<b>' . HEADING_ORDER_COMMENTS . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><?php echo nl2br(tep_output_string_protected($order->info['comments'])) . osc_draw_hidden_field('comments', $order->info['comments']); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- }
-?>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td align="right" class="main">
-<?php
- if (isset($$payment->form_action_url)) {
- $form_action_url = $$payment->form_action_url;
- } else {
- $form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
- }
-
- echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');
-
- if (is_array($payment_modules->modules)) {
- echo $payment_modules->process_button();
- }
-
- echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form>' . "\n";
-?>
- </td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- </tr>
- </table></td>
- <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- </tr>
- </table></td>
- <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>
- <td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_PAYMENT . '</a>'; ?></td>
- <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
- <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
-<!-- body_text_eof //-->
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
-<!-- right_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
-<!-- right_navigation_eof //-->
- </table></td>
- </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'); ?>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="removed"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a><br /></span>
<div class="fileheader" id="removed"><big><b>checkout_payment.php</b></big> <small id="info">removed after <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/checkout_payment.php?rev=1.120&content-type=text/vnd.viewcvs-markup">1.120</a></small></div>
<pre class="diff"><small id="info">diff -N checkout_payment.php
--- /tmp/cvsAAAJbayMb Wed Mar 30 02:13:06 2005
+++ /dev/null Wed Mar 30 02:13:01 2005
@@ -1,414 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?php
-/*
- $Id$
-
- osCommerce, Open Source E-Commerce Solutions
- http://www.oscommerce.com
-
- Copyright (c) 2005 osCommerce
-
- Released under the GNU General Public License
-*/
-
- require('includes/application_top.php');
-
-// if the customer is not logged on, redirect them to the login page
- if ($osC_Customer->isLoggedOn() == false) {
- $navigation->set_snapshot();
-
- tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
- }
-
-// if there is nothing in the customers cart, redirect them to the shopping cart page
- if ($cart->count_contents() < 1) {
- tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
- }
-
-// if no shipping method has been selected, redirect the customer to the shipping method selection page
- if ($osC_Session->exists('shipping') == false) {
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
- }
-
-// avoid hack attempts during the checkout procedure by checking the internal cartID
- if (isset($cart->cartID) && $osC_Session->exists('cartID')) {
- if ($cart->cartID != $osC_Session->value('cartID')) {
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
- }
- }
-
-// Stock Check
- if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {
- $products = $cart->get_products();
- for ($i=0, $n=sizeof($products); $i<$n; $i++) {
- if (tep_check_stock($products[$i]['id'], $products[$i]['quantity'])) {
- tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
- break;
- }
- }
- }
-
-// redirect to the billing address page when no default address exists
- if ($osC_Customer->hasDefaultAddress() === false) {
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL'));
- }
-
-// if no billing destination address was selected, use the customers own address as default
- if ($osC_Session->exists('billto') == false) {
- $osC_Session->set('billto', $osC_Customer->default_address_id);
- } else {
-// verify the selected billing address
- $Qcheck = $osC_Database->query('select count(*) as total from :table_address_book where customers_id = :customers_id and address_book_id = :address_book_id');
- $Qcheck->bindTable(':table_address_book', TABLE_ADDRESS_BOOK);
- $Qcheck->bindInt(':customers_id', $osC_Customer->id);
- $Qcheck->bindInt(':address_book_id', $osC_Session->value('billto'));
- $Qcheck->execute();
-
- if ($Qcheck->valueInt('total') != 1) {
- $osC_Session->set('billto', $osC_Customer->default_address_id);
-
- $osC_Session->remove('payment');
- }
- }
-
- require(DIR_WS_CLASSES . 'order.php');
- $order = new order;
-
- $total_weight = $cart->show_weight();
- $total_count = $cart->count_contents();
-
-// load all enabled payment modules
- require(DIR_WS_CLASSES . 'payment.php');
- $payment_modules = new payment;
-
- if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) {
- $messageStack->add('checkout_payment', $error['error'], 'error');
- }
-
- require(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/' . FILENAME_CHECKOUT_PAYMENT);
-
- $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
- $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
-?>
-<!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>
-<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
-<link rel="stylesheet" type="text/css" href="stylesheet.css">
-<script language="javascript"><!--
-var selected;
-
-function selectRowEffect(object, buttonSelect) {
- if (!selected) {
- if (document.getElementById) {
- selected = document.getElementById('defaultSelected');
- } else {
- selected = document.all['defaultSelected'];
- }
- }
-
- if (selected) selected.className = 'moduleRow';
- object.className = 'moduleRowSelected';
- selected = object;
-
-// one button is not an array
- if (document.checkout_payment.payment[0]) {
- document.checkout_payment.payment[buttonSelect].checked=true;
- } else {
- document.checkout_payment.payment.checked=true;
- }
-}
-
-function rowOverEffect(object) {
- if (object.className == 'moduleRow') object.className = 'moduleRowOver';
-}
-
-function rowOutEffect(object) {
- if (object.className == 'moduleRowOver') object.className = 'moduleRow';
-}
-//--></script>
-<?php echo $payment_modules->javascript_validation(); ?>
-</head>
-<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
-<!-- header //-->
-<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
-<!-- header_eof //-->
-
-<!-- body //-->
-<table border="0" width="100%" cellspacing="3" cellpadding="3">
- <tr>
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
-<!-- left_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
-<!-- left_navigation_eof //-->
- </table></td>
-<!-- body_text //-->
- <td width="100%" valign="top"><?php echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onsubmit="return check_form();"'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td><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_image(DIR_WS_IMAGES . 'table_background_payment.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- if ($messageStack->size('checkout_payment') > 0) {
-?>
- <tr>
- <td><?php echo $messageStack->output('checkout_payment'); ?></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- }
-
- if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
-?>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo TABLE_HEADING_CONDITIONS; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main"><?php echo TEXT_CONDITIONS_DESCRIPTION . '<br><br>' . osc_draw_checkbox_field('conditions', '1', false, 'id="conditions"') . '<label for="conditions">&nbsp;' . TEXT_CONDITIONS_CONFIRM . '</label>'; ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- }
-?>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo TABLE_HEADING_BILLING_ADDRESS; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" width="50%" valign="top"><?php echo TEXT_SELECTED_BILLING_DESTINATION; ?><br><br><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>
- <td align="right" width="50%" valign="top"><table border="0" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main" align="center" valign="top"><b><?php echo TITLE_BILLING_ADDRESS; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" valign="top"><?php echo tep_address_label($osC_Customer->id, $osC_Session->value('billto'), true, ' ', '<br>'); ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
-<?php
- $selection = $payment_modules->selection();
-
- if (sizeof($selection) > 1) {
-?>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" width="50%" valign="top"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></td>
- <td class="main" width="50%" valign="top" align="right"><b><?php echo TITLE_PLEASE_SELECT; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- } else {
-?>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_PAYMENT_INFORMATION; ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- }
-
- $radio_buttons = 0;
- for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
-?>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
-<?php
- if ( ($n == 1) || ($selection[$i]['id'] == $osC_Session->value('payment')) ) {
- echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
- } else {
- echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
- }
-?>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" colspan="3"><b><?php echo $selection[$i]['module']; ?></b></td>
- <td class="main" align="right"><?php echo osc_draw_radio_field('payment', $selection[$i]['id'], $osC_Session->value('payment')); ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- if (isset($selection[$i]['error'])) {
-?>
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" colspan="4"><?php echo $selection[$i]['error']; ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- } elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {
-?>
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td colspan="4"><table border="0" cellspacing="0" cellpadding="2">
-<?php
- for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {
-?>
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main"><?php echo $selection[$i]['fields'][$j]['title']; ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main"><?php echo $selection[$i]['fields'][$j]['field']; ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- }
-?>
- </table></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- }
-?>
- </table></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- $radio_buttons++;
- }
-?>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td><?php echo osc_draw_textarea_field('comments', ($osC_Session->exists('comments') ? $osC_Session->value('comments') : '')); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main"><b><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
- <td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- </tr>
- </table></td>
- <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- </tr>
- </table></td>
- <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>
- <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
- <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
- <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
- </tr>
- </table></td>
- </tr>
- </table></form></td>
-<!-- body_text_eof //-->
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
-<!-- right_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
-<!-- right_navigation_eof //-->
- </table></td>
- </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'); ?>
<hr /><a name="file3" /><div class="file">
<span class="pathname" id="removed"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a><br /></span>
<div class="fileheader" id="removed"><big><b>checkout_payment_address.php</b></big> <small id="info">removed after <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/checkout_payment_address.php?rev=1.18&content-type=text/vnd.viewcvs-markup">1.18</a></small></div>
<pre class="diff"><small id="info">diff -N checkout_payment_address.php
--- /tmp/cvsAAAbgaOMb Wed Mar 30 02:13:06 2005
+++ /dev/null Wed Mar 30 02:13:01 2005
@@ -1,526 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?php
-/*
- $Id$
-
- osCommerce, Open Source E-Commerce Solutions
- http://www.oscommerce.com
-
- Copyright (c) 2005 osCommerce
-
- Released under the GNU General Public License
-*/
-
- require('includes/application_top.php');
-
-// if the customer is not logged on, redirect them to the login page
- if ($osC_Customer->isLoggedOn() == false) {
- $navigation->set_snapshot();
-
- tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
- }
-
-// if there is nothing in the customers cart, redirect them to the shopping cart page
- if ($cart->count_contents() < 1) {
- tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
- }
-
-// needs to be included earlier to set the success message in the messageStack
- require(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/' . FILENAME_CHECKOUT_PAYMENT_ADDRESS);
-
- if (isset($_POST['action']) && ($_POST['action'] == 'submit')) {
-// process a new billing address
- if (($osC_Customer->hasDefaultAddress() === false) || (tep_not_null($_POST['firstname']) && tep_not_null($_POST['lastname']) && tep_not_null($_POST['street_address'])) ) {
- if (ACCOUNT_GENDER > 0) {
- if (!isset($_POST['gender']) || (($_POST['gender'] != 'm') && ($_POST['gender'] != 'f'))) {
- $messageStack->add('checkout_address', ENTRY_GENDER_ERROR);
- }
- }
-
- if (!isset($_POST['firstname']) || (strlen(trim($_POST['firstname'])) < ACCOUNT_FIRST_NAME)) {
- $messageStack->add('checkout_address', ENTRY_FIRST_NAME_ERROR);
- }
-
- if (!isset($_POST['lastname']) || (strlen(trim($_POST['lastname'])) < ACCOUNT_LAST_NAME)) {
- $messageStack->add('checkout_address', ENTRY_LAST_NAME_ERROR);
- }
-
- if (ACCOUNT_COMPANY > 0) {
- if (!isset($_POST['company']) || (strlen(trim($_POST['company'])) < ACCOUNT_COMPANY)) {
- $messageStack->add('checkout_address', ENTRY_COMPANY_ERROR);
- }
- }
-
- if (!isset($_POST['street_address']) || (strlen(trim($_POST['street_address'])) < ACCOUNT_STREET_ADDRESS)) {
- $messageStack->add('checkout_address', ENTRY_STREET_ADDRESS_ERROR);
- }
-
- if (ACCOUNT_SUBURB > 0) {
- if (!isset($_POST['suburb']) || (strlen(trim($_POST['suburb'])) < ACCOUNT_SUBURB)) {
- $messageStack->add('checkout_address', ENTRY_SUBURB_ERROR);
- }
- }
-
- if (!isset($_POST['postcode']) || (strlen(trim($_POST['postcode'])) < ACCOUNT_POST_CODE)) {
- $messageStack->add('checkout_address', ENTRY_POST_CODE_ERROR);
- }
-
- if (!isset($_POST['city']) || (strlen(trim($_POST['city'])) < ACCOUNT_CITY)) {
- $messageStack->add('checkout_address', ENTRY_CITY_ERROR);
- }
-
- if (ACCOUNT_STATE > 0) {
- $zone_id = 0;
-
- $Qcheck = $osC_Database->query('select zone_id from :table_zones where zone_country_id = :zone_country_id limit 1');
- $Qcheck->bindRaw(':table_zones', TABLE_ZONES);
- $Qcheck->bindValue(':zone_country_id', $_POST['country']);
- $Qcheck->execute();
-
- $entry_state_has_zones = ($Qcheck->numberOfRows() > 0);
-
- $Qcheck->freeResult();
-
- if ($entry_state_has_zones === true) {
- $Qzone = $osC_Database->query('select zone_id from :table_zones where zone_country_id = :zone_country_id and zone_code like :zone_code');
- $Qzone->bindRaw(':table_zones', TABLE_ZONES);
- $Qzone->bindValue(':zone_country_id', $_POST['country']);
- $Qzone->bindValue(':zone_code', trim($_POST['state']));
- $Qzone->execute();
-
- if ($Qzone->numberOfRows() === 1) {
- $zone_id = $Qzone->valueInt('zone_id');
- } else {
- $Qzone = $osC_Database->query('select zone_id from :table_zones where zone_country_id = :zone_country_id and zone_name like :zone_name');
- $Qzone->bindRaw(':table_zones', TABLE_ZONES);
- $Qzone->bindValue(':zone_country_id', $_POST['country']);
- $Qzone->bindValue(':zone_name', trim($_POST['state']) . '%');
- $Qzone->execute();
-
- if ($Qzone->numberOfRows() === 1) {
- $zone_id = $Qzone->valueInt('zone_id');
- } else {
- $messageStack->add('checkout_address', ENTRY_STATE_ERROR_SELECT);
- }
- }
-
- $Qzone->freeResult();
- } else {
- if (strlen(trim($_POST['state'])) < ACCOUNT_STATE) {
- $messageStack->add('checkout_address', ENTRY_STATE_ERROR);
- }
- }
- }
-
- if ( (is_numeric($_POST['country']) === false) || ($_POST['country'] < 1) ) {
- $messageStack->add('checkout_address', ENTRY_COUNTRY_ERROR);
- }
-
- if (ACCOUNT_TELEPHONE > 0) {
- if (!isset($_POST['telephone']) || (strlen(trim($_POST['telephone'])) < ACCOUNT_TELEPHONE)) {
- $messageStack->add('checkout_address', ENTRY_TELEPHONE_NUMBER_ERROR);
- }
- }
-
- if (ACCOUNT_FAX > 0) {
- if (!isset($_POST['fax']) || (strlen(trim($_POST['fax'])) < ACCOUNT_FAX)) {
- $messageStack->add('checkout_address', ENTRY_FAX_NUMBER_ERROR);
- }
- }
-
- if ($messageStack->size('checkout_address') === 0) {
- $Qab = $osC_Database->query('insert into :table_address_book (customers_id, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id, entry_telephone, entry_fax) values (:customers_id, :entry_gender, :entry_company, :entry_firstname, :entry_lastname, :entry_street_address, :entry_suburb, :entry_postcode, :entry_city, :entry_state, :entry_country_id, :entry_zone_id, :entry_telephone, :entry_fax)');
- $Qab->bindRaw(':table_address_book', TABLE_ADDRESS_BOOK);
- $Qab->bindInt(':customers_id', $osC_Customer->id);
- $Qab->bindValue(':entry_gender', (((ACCOUNT_GENDER > -1) && isset($_POST['gender']) && (($_POST['gender'] == 'm') || ($_POST['gender'] == 'f'))) ? $_POST['gender'] : ''));
- $Qab->bindValue(':entry_company', ((ACCOUNT_COMPANY > -1) ? trim($_POST['company']) : ''));
- $Qab->bindValue(':entry_firstname', trim($_POST['firstname']));
- $Qab->bindValue(':entry_lastname', trim($_POST['lastname']));
- $Qab->bindValue(':entry_street_address', trim($_POST['street_address']));
- $Qab->bindValue(':entry_suburb', ((ACCOUNT_SUBURB > -1) ? trim($_POST['suburb']) : ''));
- $Qab->bindValue(':entry_postcode', trim($_POST['postcode']));
- $Qab->bindValue(':entry_city', trim($_POST['city']));
- $Qab->bindValue(':entry_state', ((ACCOUNT_STATE > -1) ? (($zone_id > 0) ? '' : trim($_POST['state'])) : ''));
- $Qab->bindInt(':entry_country_id', $_POST['country']);
- $Qab->bindInt(':entry_zone_id', ((ACCOUNT_STATE > -1) ? (($zone_id > 0) ? $zone_id : 0) : ''));
- $Qab->bindValue(':entry_telephone', ((ACCOUNT_TELEPHONE > -1) ? trim($_POST['telephone']) : ''));
- $Qab->bindValue(':entry_fax', ((ACCOUNT_FAX > -1) ? trim($_POST['fax']) : ''));
- $Qab->execute();
-
- if ($Qab->affectedRows() === 1) {
- $address_book_id = $osC_Database->nextID();
-
- if ($osC_Customer->hasDefaultAddress() === false) {
- $Qcustomer = $osC_Database->query('update :table_customers set customers_default_address_id = :customers_default_address_id where customers_id = :customers_id');
- $Qcustomer->bindRaw(':table_customers', TABLE_CUSTOMERS);
- $Qcustomer->bindInt(':customers_default_address_id', $address_book_id);
- $Qcustomer->bindInt(':customers_id', $osC_Customer->id);
- $Qcustomer->execute();
-
- $osC_Customer->setCountryID($_POST['country']);
- $osC_Customer->setZoneID($zone_id);
- $osC_Customer->setDefaultAddressID($address_book_id);
- }
-
- $osC_Session->set('billto', $address_book_id);
- $osC_Session->remove('payment');
-
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
- } else {
- $messageStack->add('checkout_address', 'Error inserting into address book table.');
- }
- }
-// process the selected billing destination
- } elseif (isset($_POST['address'])) {
- $reset_payment = false;
- if ($osC_Session->exists('billto')) {
- if ($osC_Session->value('billto') != $_POST['address']) {
- if ($osC_Session->exists('payment')) {
- $reset_payment = true;
- }
- }
- }
-
- $osC_Session->set('billto', $_POST['address']);
-
- $Qcheck = $osC_Database->query('select count(*) as total from :table_address_book where customers_id = :customers_id and address_book_id = :address_book_id');
- $Qcheck->bindTable(':table_address_book', TABLE_ADDRESS_BOOK);
- $Qcheck->bindInt(':customers_id', $osC_Customer->id);
- $Qcheck->bindInt(':address_book_id', $osC_Session->value('billto'));
- $Qcheck->execute();
-
- if ($Qcheck->valueInt('total') == 1) {
- if ($reset_payment == true) {
- $osC_Session->remove('payment');
- }
-
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
- } else {
- $osC_Session->remove('billto');
- }
-// no addresses to select from - customer decided to keep the current assigned address
- } else {
- $osC_Session->set('billto', $osC_Customer->default_address_id);
-
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
- }
- }
-
-// if no billing destination address was selected, use their own address as default
- if ($osC_Session->exists('billto') == false) {
- $osC_Session->set('billto', $osC_Customer->default_address_id);
- }
-
- $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
- $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL'));
-
- $addresses_count = tep_count_customer_address_book_entries();
-?>
-<!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>
-<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
-<link rel="stylesheet" type="text/css" href="stylesheet.css">
-<script language="javascript"><!--
-var selected;
-
-function selectRowEffect(object, buttonSelect) {
- if (!selected) {
- if (document.getElementById) {
- selected = document.getElementById('defaultSelected');
- } else {
- selected = document.all['defaultSelected'];
- }
- }
-
- if (selected) selected.className = 'moduleRow';
- object.className = 'moduleRowSelected';
- selected = object;
-
-// one button is not an array
- if (document.checkout_address.address[0]) {
- document.checkout_address.address[buttonSelect].checked=true;
- } else {
- document.checkout_address.address.checked=true;
- }
-}
-
-function rowOverEffect(object) {
- if (object.className == 'moduleRow') object.className = 'moduleRowOver';
-}
-
-function rowOutEffect(object) {
- if (object.className == 'moduleRowOver') object.className = 'moduleRow';
-}
-
-function check_form_optional(form_name) {
- var form = form_name;
-
- var firstname = form.elements['firstname'].value;
- var lastname = form.elements['lastname'].value;
- var street_address = form.elements['street_address'].value;
-
- if (firstname == '' && lastname == '' && street_address == '') {
- return true;
- } else {
- return check_form(form_name);
- }
-}
-//--></script>
-<?php require(DIR_WS_INCLUDES . 'form_check.js.php'); ?>
-</head>
-<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
-<!-- header //-->
-<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
-<!-- header_eof //-->
-
-<!-- body //-->
-<table border="0" width="100%" cellspacing="3" cellpadding="3">
- <tr>
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
-<!-- left_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
-<!-- left_navigation_eof //-->
- </table></td>
-<!-- body_text //-->
- <td width="100%" valign="top"><?php echo tep_draw_form('checkout_address', tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL'), 'post', 'onSubmit="return check_form_optional(checkout_address);"'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td><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_image(DIR_WS_IMAGES . 'table_background_payment.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- if ($messageStack->size('checkout_address') > 0) {
-?>
- <tr>
- <td><?php echo $messageStack->output('checkout_address'); ?></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- }
-
- if (!isset($_POST['action'])) {
- if ($osC_Customer->hasDefaultAddress() === true) {
-?>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo TABLE_HEADING_PAYMENT_ADDRESS; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" width="50%" valign="top"><?php echo TEXT_SELECTED_PAYMENT_DESTINATION; ?></td>
- <td align="right" width="50%" valign="top"><table border="0" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main" align="center" valign="top"><?php echo '<b>' . TITLE_PAYMENT_ADDRESS . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" valign="top"><?php echo tep_address_label($osC_Customer->id, $osC_Session->value('billto'), true, ' ', '<br>'); ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- }
-
- if ($addresses_count > 1) {
-?>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo TABLE_HEADING_ADDRESS_BOOK_ENTRIES; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" width="50%" valign="top"><?php echo TEXT_SELECT_OTHER_PAYMENT_DESTINATION; ?></td>
- <td class="main" width="50%" valign="top" align="right"><?php echo '<b>' . TITLE_PLEASE_SELECT . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- $radio_buttons = 0;
-
- $Qaddresses = $osC_Database->query('select address_book_id, entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from :table_address_book where customers_id = :customers_id');
- $Qaddresses->bindTable(':table_address_book', TABLE_ADDRESS_BOOK);
- $Qaddresses->bindInt(':customers_id', $osC_Customer->id);
- $Qaddresses->execute();
-
- while ($Qaddresses->next()) {
- $format_id = tep_get_address_format_id($Qaddresses->valueInt('country_id'));
-?>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
-<?php
- if ($Qaddresses->valueInt('address_book_id') == $osC_Session->value('billto')) {
- echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
- } else {
- echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
- }
-?>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" colspan="2"><b><?php echo $Qaddresses->valueProtected('firstname') . ' ' . $Qaddresses->valueProtected('lastname'); ?></b></td>
- <td class="main" align="right"><?php echo osc_draw_radio_field('address', $Qaddresses->valueInt('address_book_id'), $osC_Session->value('billto')); ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td colspan="3"><table border="0" cellspacing="0" cellpadding="2">
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main"><?php echo tep_address_format($format_id, $Qaddresses->toArray(), true, ' ', ', '); ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- $radio_buttons++;
- }
-?>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- }
- }
-
- if ($addresses_count < MAX_ADDRESS_BOOK_ENTRIES) {
-?>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo TABLE_HEADING_NEW_PAYMENT_ADDRESS; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" width="100%" valign="top"><?php echo TEXT_CREATE_NEW_PAYMENT_ADDRESS; ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td><?php require(DIR_WS_MODULES . 'checkout_new_address.php'); ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
-<?php
- }
-?>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main"><?php echo '<b>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
- <td class="main" align="right"><?php echo osc_draw_hidden_field('action', 'submit') . tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- </tr>
- </table></td>
- <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- </tr>
- </table></td>
- <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>
- <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
- <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
- <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
- </tr>
- </table></td>
- </tr>
- </table></form></td>
-<!-- body_text_eof //-->
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
-<!-- right_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
-<!-- right_navigation_eof //-->
- </table></td>
- </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'); ?>
<hr /><a name="file4" /><div class="file">
<span class="pathname" id="removed"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a><br /></span>
<div class="fileheader" id="removed"><big><b>checkout_process.php</b></big> <small id="info">removed after <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/checkout_process.php?rev=1.132&content-type=text/vnd.viewcvs-markup">1.132</a></small></div>
<pre class="diff"><small id="info">diff -N checkout_process.php
--- /tmp/cvsAAAvkaWMb Wed Mar 30 02:13:07 2005
+++ /dev/null Wed Mar 30 02:13:01 2005
@@ -1,326 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?php
-/*
- $Id$
-
- osCommerce, Open Source E-Commerce Solutions
- http://www.oscommerce.com
-
- Copyright (c) 2005 osCommerce
-
- Released under the GNU General Public License
-*/
-
- include('includes/application_top.php');
-
-// if the customer is not logged on, redirect them to the login page
- if ($osC_Customer->isLoggedOn() == false) {
- $navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT));
-
- tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
- }
-
- if ($osC_Session->exists('sendto') == false) {
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
- }
-
- if (tep_not_null(MODULE_PAYMENT_INSTALLED) && ($osC_Session->exists('payment') == false)) {
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
- }
-
-// avoid hack attempts during the checkout procedure by checking the internal cartID
- if (isset($cart->cartID) && $osC_Session->exists('cartID') && ($cart->cartID != $osC_Session->value('cartID'))) {
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
- }
-
- include(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/' . FILENAME_CHECKOUT_PROCESS);
-
-// load selected payment module
- require(DIR_WS_CLASSES . 'payment.php');
- $payment_modules = new payment($osC_Session->value('payment'));
-
-// load the selected shipping module
- require(DIR_WS_CLASSES . 'shipping.php');
- $shipping_modules = new shipping($osC_Session->value('shipping'));
-
- require(DIR_WS_CLASSES . 'order.php');
- $order = new order;
-
-// load the before_process function from the payment modules
- $payment_modules->before_process();
-
- require(DIR_WS_CLASSES . 'order_total.php');
- $order_total_modules = new order_total;
-
- $order_totals = $order_total_modules->process();
-
- $Qorder = $osC_Database->query('insert into :table_orders (customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, customers_ip_address, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, date_purchased, orders_status, currency, currency_value) values (:customers_id, :customers_name, :customers_company, :customers_street_address, :customers_suburb, :customers_city, :c
ustomers_postcode, :customers_state, :customers_country, :customers_telephone, :customers_
email_address,<strong class="error">[...]</strong>
- $Qorder->bindTable(':table_orders', TABLE_ORDERS);
- $Qorder->bindInt(':customers_id', $osC_Customer->id);
- $Qorder->bindValue(':customers_name', $order->customer['firstname'] . ' ' . $order->customer['lastname']);
- $Qorder->bindValue(':customers_company', $order->customer['company']);
- $Qorder->bindValue(':customers_street_address', $order->customer['street_address']);
- $Qorder->bindValue(':customers_suburb', $order->customer['suburb']);
- $Qorder->bindValue(':customers_city', $order->customer['city']);
- $Qorder->bindValue(':customers_postcode', $order->customer['postcode']);
- $Qorder->bindValue(':customers_state', $order->customer['state']);
- $Qorder->bindValue(':customers_country', $order->customer['country']['title']);
- $Qorder->bindValue(':customers_telephone', $order->customer['telephone']);
- $Qorder->bindValue(':customers_email_address', $order->customer['email_address']);
- $Qorder->bindInt(':customers_address_format_id', $order->customer['format_id']);
- $Qorder->bindValue(':customers_ip_address', tep_get_ip_address());
- $Qorder->bindValue(':delivery_name', $order->delivery['firstname'] . ' ' . $order->delivery['lastname']);
- $Qorder->bindValue(':delivery_company', $order->delivery['company']);
- $Qorder->bindValue(':delivery_street_address', $order->delivery['street_address']);
- $Qorder->bindValue(':delivery_suburb', $order->delivery['suburb']);
- $Qorder->bindValue(':delivery_city', $order->delivery['city']);
- $Qorder->bindValue(':delivery_postcode', $order->delivery['postcode']);
- $Qorder->bindValue(':delivery_state', $order->delivery['state']);
- $Qorder->bindValue(':delivery_country', $order->delivery['country']['title']);
- $Qorder->bindInt(':delivery_address_format_id', $order->delivery['format_id']);
- $Qorder->bindValue(':billing_name', $order->billing['firstname'] . ' ' . $order->billing['lastname']);
- $Qorder->bindValue(':billing_company', $order->billing['company']);
- $Qorder->bindValue(':billing_street_address', $order->billing['street_address']);
- $Qorder->bindValue(':billing_suburb', $order->billing['suburb']);
- $Qorder->bindValue(':billing_city', $order->billing['city']);
- $Qorder->bindValue(':billing_postcode', $order->billing['postcode']);
- $Qorder->bindValue(':billing_state', $order->billing['state']);
- $Qorder->bindValue(':billing_country', $order->billing['country']['title']);
- $Qorder->bindInt(':billing_address_format_id', $order->billing['format_id']);
- $Qorder->bindValue(':payment_method', $order->info['payment_method']);
- $Qorder->bindValue(':cc_type', $order->info['cc_type']);
- $Qorder->bindValue(':cc_owner', $order->info['cc_owner']);
- $Qorder->bindValue(':cc_number', $order->info['cc_number']);
- $Qorder->bindValue(':cc_expires', $order->info['cc_expires']);
- $Qorder->bindRaw(':date_purchased', 'now()');
- $Qorder->bindValue(':orders_status', $order->info['order_status']);
- $Qorder->bindValue(':currency', $order->info['currency']);
- $Qorder->bindValue(':currency_value', $order->info['currency_value']);
- $Qorder->execute();
-
- $insert_id = $osC_Database->nextID();
-
- for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
- $Qtotals = $osC_Database->query('insert into :table_orders_total (orders_id, title, text, value, class, sort_order) values (:orders_id, :title, :text, :value, :class, :sort_order)');
- $Qtotals->bindTable(':table_orders_total', TABLE_ORDERS_TOTAL);
- $Qtotals->bindInt(':orders_id', $insert_id);
- $Qtotals->bindValue(':title', $order_totals[$i]['title']);
- $Qtotals->bindValue(':text', $order_totals[$i]['text']);
- $Qtotals->bindValue(':value', $order_totals[$i]['value']);
- $Qtotals->bindValue(':class', $order_totals[$i]['code']);
- $Qtotals->bindInt(':sort_order', $order_totals[$i]['sort_order']);
- $Qtotals->execute();
- }
-
- $Qstatus = $osC_Database->query('insert into :table_orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values (:orders_id, :orders_status_id, :date_added, :customer_notified, :comments)');
- $Qstatus->bindTable(':table_orders_status_history', TABLE_ORDERS_STATUS_HISTORY);
- $Qstatus->bindInt(':orders_id', $insert_id);
- $Qstatus->bindInt(':orders_status_id', $order->info['order_status']);
- $Qstatus->bindRaw(':date_added', 'now()');
- $Qstatus->bindInt(':customer_notified', (SEND_EMAILS == 'true') ? '1' : '0');
- $Qstatus->bindValue(':comments', $order->info['comments']);
- $Qstatus->execute();
-
-// initialized for the email confirmation
- $products_ordered = '';
- $subtotal = 0;
- $total_tax = 0;
- $total_weight = 0;
- $total_cost = 0;
-
- for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
-// Stock Update - Joao Correia
- if (STOCK_LIMITED == 'true') {
- if (DOWNLOAD_ENABLED == 'true') {
- $Qstock = $osC_Database->query('select products_quantity, pad.products_attributes_filename from :table_products p left join :table_products_attributes pa on (p.products_id = pa.products_id) left join :table_products_attributes_download pad on (pa.products_attributes_id = pad.products_attributes_id) where p.products_id = :products_id');
- $Qstock->bindTable(':table_products', TABLE_PRODUCTS);
- $Qstock->bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES);
- $Qstock->bindTable(':table_products_attributes_download', TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD);
- $Qstock->bindInt(':products_id', tep_get_prid($order->products[$i]['id']));
-
-// Will work with only one option for downloadable products otherwise, we have to build the query dynamically with a loop
- $products_attributes = $order->products[$i]['attributes'];
-
- if (is_array($products_attributes)) {
- $Qstock->appendQuery('and pa.options_id = :options_id and pa.options_values_id = :options_values_id');
- $Qstock->bindInt(':options_id', $products_attributes[0]['option_id']);
- $Qstock->bindInt(':options_values_id', $products_attributes[0]['value_id']);
- }
- } else {
- $Qstock = $osC_Database->query('select products_quantity from :table_products where products_id = :products_id');
- $Qstock->bindTable(':table_products', TABLE_PRODUCTS);
- $Qstock->bindInt(':products_id', tep_get_prid($order->products[$i]['id']));
- }
-
- $Qstock->execute();
-
- if ($Qstock->numberOfRows() > 0) {
- $stock_left = $Qstock->valueInt('products_quantity');
-
-// do not decrement quantities if products_attributes_filename exists
- if ((DOWNLOAD_ENABLED != 'true') || ((DOWNLOAD_ENABLED == 'true') && (strlen($Qstock->value('products_attributes_filename')) < 1))) {
- $stock_left = $stock_left - $order->products[$i]['qty'];
-
- $Qupdate = $osC_Database->query('update :table_products set products_quantity = :products_quantity where products_id = :products_id');
- $Qupdate->bindTable(':table_products', TABLE_PRODUCTS);
- $Qupdate->bindInt(':products_quantity', $stock_left);
- $Qupdate->bindInt(':products_id', tep_get_prid($order->products[$i]['id']));
- $Qupdate->execute();
- }
-
- if ((STOCK_ALLOW_CHECKOUT == 'false') && ($stock_left < 1)) {
- $Qupdate = $osC_Database->query('update :table_products set products_status = :products_status where products_id = :products_id');
- $Qupdate->bindTable(':table_products', TABLE_PRODUCTS);
- $Qupdate->bindInt(':products_status', 0);
- $Qupdate->bindInt(':products_id', tep_get_prid($order->products[$i]['id']));
- $Qupdate->execute();
- }
- }
- }
-
-// Update products_ordered (for bestsellers list)
- $Qupdate = $osC_Database->query('update :table_products set products_ordered = products_ordered + :products_ordered where products_id = :products_id');
- $Qupdate->bindTable(':table_products', TABLE_PRODUCTS);
- $Qupdate->bindInt(':products_ordered', $order->products[$i]['qty']);
- $Qupdate->bindInt(':products_id', tep_get_prid($order->products[$i]['id']));
- $Qupdate->execute();
-
- $Qproducts = $osC_Database->query('insert into :table_orders_products (orders_id, products_id, products_model, products_name, products_price, final_price, products_tax, products_quantity) values (:orders_id, :products_id, :products_model, :products_name, :products_price, :final_price, :products_tax, :products_quantity)');
- $Qproducts->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
- $Qproducts->bindInt(':orders_id', $insert_id);
- $Qproducts->bindInt(':products_id', tep_get_prid($order->products[$i]['id']));
- $Qproducts->bindValue(':products_model', $order->products[$i]['model']);
- $Qproducts->bindValue(':products_name', $order->products[$i]['name']);
- $Qproducts->bindValue(':products_price', $order->products[$i]['price']);
- $Qproducts->bindValue(':final_price', $order->products[$i]['final_price']);
- $Qproducts->bindValue(':products_tax', $order->products[$i]['tax']);
- $Qproducts->bindInt(':products_quantity', $order->products[$i]['qty']);
- $Qproducts->execute();
-
- $order_products_id = $osC_Database->nextID();
-
-//------insert customer choosen option to order--------
- $attributes_exist = '0';
- $products_ordered_attributes = '';
-
- if (isset($order->products[$i]['attributes'])) {
- $attributes_exist = '1';
-
- for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
- if (DOWNLOAD_ENABLED == 'true') {
- $Qattributes = $osC_Database->query('select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount, pad.products_attributes_filename from :table_products_options popt, :table_products_options_values poval, :table_products_attributes pa left join :table_products_attributes_download pad on (pa.products_attributes_id = pad.products_attributes_id) where pa.products_id = :products_id and pa.options_id = :options_id and pa.options_id = popt.products_options_id and pa.options_values_id = :options_values_id and pa.options_values_id = poval.products_options_values_id and popt.language_id = :popt_language_id and poval.language_id = :poval_language_id');
- $Qattributes->bindTable(':table_products_options', TABLE_PRODUCTS_OPTIONS);
- $Qattributes->bindTable(':table_products_options_values', TABLE_PRODUCTS_OPTIONS_VALUES);
- $Qattributes->bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES);
- $Qattributes->bindTable(':table_products_attributes_download', TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD);
- $Qattributes->bindInt(':products_id', $order->products[$i]['id']);
- $Qattributes->bindInt(':options_id', $order->products[$i]['attributes'][$j]['option_id']);
- $Qattributes->bindInt(':options_values_id', $order->products[$i]['attributes'][$j]['value_id']);
- $Qattributes->bindInt(':popt_language_id', $osC_Session->value('languages_id'));
- $Qattributes->bindInt(':poval_language_id', $osC_Session->value('languages_id'));
- } else {
- $Qattributes = $osC_Database->query('select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from :table_products_options popt, :table_products_options_values poval, :table_products_attributes pa where pa.products_id = :products_id and pa.options_id = :options_id and pa.options_id = popt.products_options_id and pa.options_values_id = :options_values_id and pa.options_values_id = poval.products_options_values_id and popt.language_id = :popt_language_id and poval.language_id = :poval_language_id');
- $Qattributes->bindTable(':table_products_options', TABLE_PRODUCTS_OPTIONS);
- $Qattributes->bindTable(':table_products_options_values', TABLE_PRODUCTS_OPTIONS_VALUES);
- $Qattributes->bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES);
- $Qattributes->bindInt(':products_id', $order->products[$i]['id']);
- $Qattributes->bindInt(':options_id', $order->products[$i]['attributes'][$j]['option_id']);
- $Qattributes->bindInt(':options_values_id', $order->products[$i]['attributes'][$j]['value_id']);
- $Qattributes->bindInt(':popt_language_id', $osC_Session->value('languages_id'));
- $Qattributes->bindInt(':poval_language_id', $osC_Session->value('languages_id'));
- }
- $Qattributes->execute();
-
- $Qopa = $osC_Database->query('insert into :table_orders_products_attributes (orders_id, orders_products_id, products_options, products_options_values, options_values_price, price_prefix) values (:orders_id, :orders_products_id, :products_options, :products_options_values, :options_values_price, :price_prefix)');
- $Qopa->bindTable(':table_orders_products_attributes', TABLE_ORDERS_PRODUCTS_ATTRIBUTES);
- $Qopa->bindInt(':orders_id', $insert_id);
- $Qopa->bindInt(':orders_products_id', $order_products_id);
- $Qopa->bindValue(':products_options', $attributes_values['products_options_name']);
- $Qopa->bindValue(':products_options_values', $attributes_values['products_options_values_name']);
- $Qopa->bindValue(':options_values_price', $attributes_values['options_values_price']);
- $Qopa->bindValue(':price_prefix', $attributes_values['price_prefix']);
- $Qopa->execute();
-
- if ((DOWNLOAD_ENABLED == 'true') && (strlen($Qattributes->value('products_attributes_filename')) > 0)) {
- $Qopd = $osC_Database->query('insert into :table_orders_products_download (orders_id, orders_products_id, orders_products_filename, download_maxdays, download_count) values (:orders_id, :orders_products_id, :orders_products_filename, :download_maxdays, :download_count)');
- $Qopd->bindTable(':table_orders_products_download', TABLE_ORDERS_PRODUCTS_DOWNLOAD);
- $Qopd->bindInt(':orders_id', $insert_id);
- $Qopd->bindInt(':orders_products_id', $order_products_id);
- $Qopd->bindValue(':orders_products_filename', $Qattributes->value('products_attributes_filename'));
- $Qopd->bindValue(':download_maxdays', $Qattributes->value('products_attributes_maxdays'));
- $Qopd->bindValue(':download_count', $Qattributes->value('products_attributes_maxcount'));
- $Qopd->execute();
- }
-
- $products_ordered_attributes .= "\n\t" . $Qattributes->value('products_options_name') . ' ' . $Qattributes->value('products_options_values_name');
- }
- }
-//------insert customer choosen option eof ----
- $total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);
- $total_tax += tep_calculate_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'];
- $total_cost += $order->products[$i]['final_price'];
-
- $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $osC_Currencies->displayPrice($order->products[$i]['final_price'], $order->products[$i]['tax_class_id'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
- }
-
-// lets start with the email confirmation
- $email_order = STORE_NAME . "\n" .
- EMAIL_SEPARATOR . "\n" .
- EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
- EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_id, 'SSL', false) . "\n" .
- EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
- if ($order->info['comments']) {
- $email_order .= tep_output_string_protected($order->info['comments']) . "\n\n";
- }
- $email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
- EMAIL_SEPARATOR . "\n" .
- $products_ordered .
- EMAIL_SEPARATOR . "\n";
-
- for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
- $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
- }
-
- if ($order->content_type != 'virtual') {
- $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .
- EMAIL_SEPARATOR . "\n" .
- tep_address_label($osC_Customer->id, $osC_Session->value('sendto'), 0, '', "\n") . "\n";
- }
-
- $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
- EMAIL_SEPARATOR . "\n" .
- tep_address_label($osC_Customer->id, $osC_Session->value('billto'), 0, '', "\n") . "\n\n";
-
- $payment =& $osC_Session->value('payment');
-
- if (is_object($$payment)) {
- $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .
- EMAIL_SEPARATOR . "\n";
- $payment_class = $$payment;
- $email_order .= $payment_class->title . "\n\n";
- if (isset($payment_class->email_footer)) {
- $email_order .= $payment_class->email_footer . "\n\n";
- }
- }
- tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
-
-// send emails to other people
- if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
- tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
- }
-
-// load the after_process function from the payment modules
- $payment_modules->after_process();
-
- $cart->reset(true);
-
-// unregister session variables used during checkout
- $osC_Session->remove('sendto');
- $osC_Session->remove('billto');
- $osC_Session->remove('shipping');
- $osC_Session->remove('payment');
- $osC_Session->remove('comments');
-
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));
-
- require(DIR_WS_INCLUDES . 'application_bottom.php');
-?>
<hr /><a name="file5" /><div class="file">
<span class="pathname" id="removed"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a><br /></span>
<div class="fileheader" id="removed"><big><b>checkout_shipping.php</b></big> <small id="info">removed after <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/checkout_shipping.php?rev=1.25&content-type=text/vnd.viewcvs-markup">1.25</a></small></div>
<pre class="diff"><small id="info">diff -N checkout_shipping.php
--- /tmp/cvsAAAqla4Mb Wed Mar 30 02:13:07 2005
+++ /dev/null Wed Mar 30 02:13:01 2005
@@ -1,462 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?php
-/*
- $Id$
-
- osCommerce, Open Source E-Commerce Solutions
- http://www.oscommerce.com
-
- Copyright (c) 2005 osCommerce
-
- Released under the GNU General Public License
-*/
-
- require('includes/application_top.php');
- require('includes/classes/http_client.php');
-
-// if the customer is not logged on, redirect them to the login page
- if ($osC_Customer->isLoggedOn() == false) {
- $navigation->set_snapshot();
-
- tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
- }
-
-// if there is nothing in the customers cart, redirect them to the shopping cart page
- if ($cart->count_contents() < 1) {
- tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
- }
-
-// redirect to the shipping address page when no default address exists
- if ($osC_Customer->hasDefaultAddress() === false) {
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL'));
- }
-
-// if no shipping destination address was selected, use the customers own address as default
- if ($osC_Session->exists('sendto') == false) {
- $osC_Session->set('sendto', $osC_Customer->default_address_id);
- } else {
-// verify the selected shipping address
- $Qcheck = $osC_Database->query('select count(*) as total from :table_address_book where customers_id = :customers_id and address_book_id = :address_book_id');
- $Qcheck->bindTable(':table_address_book', TABLE_ADDRESS_BOOK);
- $Qcheck->bindInt(':customers_id', $osC_Customer->id);
- $Qcheck->bindInt(':address_book_id', $osC_Session->value('sendto'));
- $Qcheck->execute();
-
- if ($Qcheck->valueInt('total') != 1) {
- $osC_Session->set('sendto', $osC_Customer->default_address_id);
-
- $osC_Session->remove('shipping');
- }
- }
-
- require(DIR_WS_CLASSES . 'order.php');
- $order = new order;
-
-// register a random ID in the session to check throughout the checkout procedure
-// against alterations in the shopping cart contents
- $osC_Session->set('cartID', $cart->cartID);
-
-// if the order contains only virtual products, forward the customer to the billing page as
-// a shipping address is not needed
- if ($order->content_type == 'virtual') {
-
- $false = false;
-
- $osC_Session->set('shipping', $false);
- $osC_Session->set('sendto', $false);
-
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
- }
-
- $total_weight = $cart->show_weight();
- $total_count = $cart->count_contents();
-
-// load all enabled shipping modules
- require(DIR_WS_CLASSES . 'shipping.php');
- $shipping_modules = new shipping;
-
- if (defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true')) {
- $pass = false;
-
- switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
- case 'national':
- if ($order->delivery['country_id'] == STORE_COUNTRY) {
- $pass = true;
- }
- break;
- case 'international':
- if ($order->delivery['country_id'] != STORE_COUNTRY) {
- $pass = true;
- }
- break;
- case 'both':
- $pass = true;
- break;
- }
-
- $free_shipping = false;
- if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
- $free_shipping = true;
-
- include(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/modules/order_total/ot_shipping.php');
- }
- } else {
- $free_shipping = false;
- }
-
-// process the selected shipping method
- if (isset($_POST['action']) && ($_POST['action'] == 'process')) {
- if (tep_not_null($_POST['comments'])) {
- $osC_Session->set('comments', tep_sanitize_string($_POST['comments']));
- }
-
- if ( (tep_count_shipping_modules() > 0) || ($free_shipping == true) ) {
- if (isset($_POST['shipping']) && strpos($_POST['shipping'], '_')) {
- $osC_Session->set('shipping', $_POST['shipping']);
-
- list($module, $method) = explode('_', $osC_Session->value('shipping'));
- if (is_object($$module) || ($osC_Session->value('shipping') == 'free_free')) {
- if ($osC_Session->value('shipping') == 'free_free') {
- $quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
- $quote[0]['methods'][0]['cost'] = '0';
- } else {
- $quote = $shipping_modules->quote($method, $module);
- }
-
- if (isset($quote['error'])) {
- $osC_Session->remove('shipping');
- } else {
- if (isset($quote[0]['methods'][0]['title']) && isset($quote[0]['methods'][0]['cost'])) {
- $shipping = array('id' => $osC_Session->value('shipping'),
- 'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
- 'cost' => $quote[0]['methods'][0]['cost']);
-
- $osC_Session->set('shipping', $shipping);
-
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
- }
- }
- } else {
- $osC_Session->remove('shipping');
- }
- }
- } else {
- $osC_Session->set('shipping', false);
-
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
- }
- }
-
-// get all available shipping quotes
- $quotes = $shipping_modules->quote();
-
-// if no shipping method has been selected, automatically select the cheapest method.
-// if the modules status was changed when none were available, to save on implementing
-// a javascript force-selection method, also automatically select the cheapest shipping
-// method if more than one module is now enabled
- if ( ($osC_Session->exists('shipping') == false) || ($osC_Session->exists('shipping') && ($osC_Session->value('shipping') == false) && (tep_count_shipping_modules() > 1)) ) {
- $osC_Session->set('shipping', $shipping_modules->cheapest());
- }
-
- require(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/' . FILENAME_CHECKOUT_SHIPPING);
-
- $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
- $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
-?>
-<!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>
-<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
-<link rel="stylesheet" type="text/css" href="stylesheet.css">
-<script language="javascript"><!--
-var selected;
-
-function selectRowEffect(object, buttonSelect) {
- if (!selected) {
- if (document.getElementById) {
- selected = document.getElementById('defaultSelected');
- } else {
- selected = document.all['defaultSelected'];
- }
- }
-
- if (selected) selected.className = 'moduleRow';
- object.className = 'moduleRowSelected';
- selected = object;
-
-// one button is not an array
- if (document.checkout_address.shipping[0]) {
- document.checkout_address.shipping[buttonSelect].checked=true;
- } else {
- document.checkout_address.shipping.checked=true;
- }
-}
-
-function rowOverEffect(object) {
- if (object.className == 'moduleRow') object.className = 'moduleRowOver';
-}
-
-function rowOutEffect(object) {
- if (object.className == 'moduleRowOver') object.className = 'moduleRow';
-}
-//--></script>
-</head>
-<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
-<!-- header //-->
-<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
-<!-- header_eof //-->
-
-<!-- body //-->
-<table border="0" width="100%" cellspacing="3" cellpadding="3">
- <tr>
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
-<!-- left_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
-<!-- left_navigation_eof //-->
- </table></td>
-<!-- body_text //-->
- <td width="100%" valign="top"><?php echo tep_draw_form('checkout_address', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) . osc_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td><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_image(DIR_WS_IMAGES . 'table_background_delivery.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo TABLE_HEADING_SHIPPING_ADDRESS; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br><a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>
- <td align="right" width="50%" valign="top"><table border="0" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main" align="center" valign="top"><?php echo '<b>' . TITLE_SHIPPING_ADDRESS . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" valign="top"><?php echo tep_address_label($osC_Customer->id, $osC_Session->value('sendto'), true, ' ', '<br>'); ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- if (tep_count_shipping_modules() > 0) {
-?>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
-<?php
- if ( (sizeof($quotes) > 1) && (sizeof($quotes[0]) > 1) ) {
-?>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_METHOD; ?></td>
- <td class="main" width="50%" valign="top" align="right"><?php echo '<b>' . TITLE_PLEASE_SELECT . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- } elseif ($free_shipping == false) {
-?>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_SHIPPING_INFORMATION; ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- }
-
- if ($free_shipping == true) {
-?>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td colspan="2" width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" colspan="3"><b><?php echo FREE_SHIPPING_TITLE; ?></b>&nbsp;<?php echo $quotes[$i]['icon']; ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, 0)">
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" width="100%"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $osC_Currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . osc_draw_hidden_field('shipping', 'free_free'); ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- } else {
- $radio_buttons = 0;
- for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
-?>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" colspan="3"><b><?php echo $quotes[$i]['module']; ?></b>&nbsp;<?php if (isset($quotes[$i]['icon']) && tep_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- if (isset($quotes[$i]['error'])) {
-?>
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" colspan="3"><?php echo $quotes[$i]['error']; ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- } else {
- for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
- if ( (($n == 1) && ($n2 == 1)) || ($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $osC_Session->value('shipping')) ) {
- echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
- } else {
- echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
- }
-?>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" width="75%"><?php echo $quotes[$i]['methods'][$j]['title']; ?></td>
-<?php
- if ( ($n > 1) || ($n2 > 1) ) {
-?>
- <td class="main"><?php echo $osC_Currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></td>
- <td class="main" align="right"><?php echo osc_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $osC_Session->value('shipping')); ?></td>
-<?php
- } else {
-?>
- <td class="main" align="right" colspan="2"><?php echo $osC_Currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . osc_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></td>
-<?php
- }
-?>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- $radio_buttons++;
- }
- }
-?>
- </table></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- }
- }
-?>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- }
-?>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td><?php echo osc_draw_textarea_field('comments', ($osC_Session->exists('comments') ? $osC_Session->value('comments') : '')); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main"><?php echo '<b>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
- <td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="50%" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- </tr>
- </table></td>
- <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>
- <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
- <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
- <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
- </tr>
- </table></td>
- </tr>
- </table></form></td>
-<!-- body_text_eof //-->
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
-<!-- right_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
-<!-- right_navigation_eof //-->
- </table></td>
- </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'); ?>
<hr /><a name="file6" /><div class="file">
<span class="pathname" id="removed"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a><br /></span>
<div class="fileheader" id="removed"><big><b>checkout_shipping_address.php</b></big> <small id="info">removed after <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/checkout_shipping_address.php?rev=1.20&content-type=text/vnd.viewcvs-markup">1.20</a></small></div>
<pre class="diff"><small id="info">diff -N checkout_shipping_address.php
--- /tmp/cvsAAARraONb Wed Mar 30 02:13:07 2005
+++ /dev/null Wed Mar 30 02:13:01 2005
@@ -1,531 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?php
-/*
- $Id$
-
- osCommerce, Open Source E-Commerce Solutions
- http://www.oscommerce.com
-
- Copyright (c) 2005 osCommerce
-
- Released under the GNU General Public License
-*/
-
- require('includes/application_top.php');
-
-// if the customer is not logged on, redirect them to the login page
- if ($osC_Customer->isLoggedOn() == false) {
- $navigation->set_snapshot();
-
- tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
- }
-
-// if there is nothing in the customers cart, redirect them to the shopping cart page
- if ($cart->count_contents() < 1) {
- tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
- }
-
-// needs to be included earlier to set the success message in the messageStack
- require(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/' . FILENAME_CHECKOUT_SHIPPING_ADDRESS);
-
- require(DIR_WS_CLASSES . 'order.php');
- $order = new order;
-
-// if the order contains only virtual products, forward the customer to the billing page as
-// a shipping address is not needed
- if ($order->content_type == 'virtual') {
- $osC_Session->set('shipping'. false);
- $osC_Session->set('sendto', false);
-
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
- }
-
- if (isset($_POST['action']) && ($_POST['action'] == 'submit')) {
-// process a new shipping address
- if (($osC_Customer->hasDefaultAddress() === false) || (tep_not_null($_POST['firstname']) && tep_not_null($_POST['lastname']) && tep_not_null($_POST['street_address'])) ) {
- if (ACCOUNT_GENDER > 0) {
- if (!isset($_POST['gender']) || (($_POST['gender'] != 'm') && ($_POST['gender'] != 'f'))) {
- $messageStack->add('checkout_address', ENTRY_GENDER_ERROR);
- }
- }
-
- if (!isset($_POST['firstname']) || (strlen(trim($_POST['firstname'])) < ACCOUNT_FIRST_NAME)) {
- $messageStack->add('checkout_address', ENTRY_FIRST_NAME_ERROR);
- }
-
- if (!isset($_POST['lastname']) || (strlen(trim($_POST['lastname'])) < ACCOUNT_LAST_NAME)) {
- $messageStack->add('checkout_address', ENTRY_LAST_NAME_ERROR);
- }
-
- if (ACCOUNT_COMPANY > 0) {
- if (!isset($_POST['company']) || (strlen(trim($_POST['company'])) < ACCOUNT_COMPANY)) {
- $messageStack->add('checkout_address', ENTRY_COMPANY_ERROR);
- }
- }
-
- if (!isset($_POST['street_address']) || (strlen(trim($_POST['street_address'])) < ACCOUNT_STREET_ADDRESS)) {
- $messageStack->add('checkout_address', ENTRY_STREET_ADDRESS_ERROR);
- }
-
- if (ACCOUNT_SUBURB > 0) {
- if (!isset($_POST['suburb']) || (strlen(trim($_POST['suburb'])) < ACCOUNT_SUBURB)) {
- $messageStack->add('checkout_address', ENTRY_SUBURB_ERROR);
- }
- }
-
- if (!isset($_POST['postcode']) || (strlen(trim($_POST['postcode'])) < ACCOUNT_POST_CODE)) {
- $messageStack->add('checkout_address', ENTRY_POST_CODE_ERROR);
- }
-
- if (!isset($_POST['city']) || (strlen(trim($_POST['city'])) < ACCOUNT_CITY)) {
- $messageStack->add('checkout_address', ENTRY_CITY_ERROR);
- }
-
- if (ACCOUNT_STATE > 0) {
- $zone_id = 0;
-
- $Qcheck = $osC_Database->query('select zone_id from :table_zones where zone_country_id = :zone_country_id limit 1');
- $Qcheck->bindRaw(':table_zones', TABLE_ZONES);
- $Qcheck->bindValue(':zone_country_id', $_POST['country']);
- $Qcheck->execute();
-
- $entry_state_has_zones = ($Qcheck->numberOfRows() > 0);
-
- $Qcheck->freeResult();
-
- if ($entry_state_has_zones === true) {
- $Qzone = $osC_Database->query('select zone_id from :table_zones where zone_country_id = :zone_country_id and zone_code like :zone_code');
- $Qzone->bindRaw(':table_zones', TABLE_ZONES);
- $Qzone->bindValue(':zone_country_id', $_POST['country']);
- $Qzone->bindValue(':zone_code', trim($_POST['state']));
- $Qzone->execute();
-
- if ($Qzone->numberOfRows() === 1) {
- $zone_id = $Qzone->valueInt('zone_id');
- } else {
- $Qzone = $osC_Database->query('select zone_id from :table_zones where zone_country_id = :zone_country_id and zone_name like :zone_name');
- $Qzone->bindRaw(':table_zones', TABLE_ZONES);
- $Qzone->bindValue(':zone_country_id', $_POST['country']);
- $Qzone->bindValue(':zone_name', trim($_POST['state']) . '%');
- $Qzone->execute();
-
- if ($Qzone->numberOfRows() === 1) {
- $zone_id = $Qzone->valueInt('zone_id');
- } else {
- $messageStack->add('checkout_address', ENTRY_STATE_ERROR_SELECT);
- }
- }
-
- $Qzone->freeResult();
- } else {
- if (strlen(trim($_POST['state'])) < ACCOUNT_STATE) {
- $messageStack->add('checkout_address', ENTRY_STATE_ERROR);
- }
- }
- }
-
- if ( (is_numeric($_POST['country']) === false) || ($_POST['country'] < 1) ) {
- $messageStack->add('checkout_address', ENTRY_COUNTRY_ERROR);
- }
-
- if (ACCOUNT_TELEPHONE > 0) {
- if (!isset($_POST['telephone']) || (strlen(trim($_POST['telephone'])) < ACCOUNT_TELEPHONE)) {
- $messageStack->add('checkout_address', ENTRY_TELEPHONE_NUMBER_ERROR);
- }
- }
-
- if (ACCOUNT_FAX > 0) {
- if (!isset($_POST['fax']) || (strlen(trim($_POST['fax'])) < ACCOUNT_FAX)) {
- $messageStack->add('checkout_address', ENTRY_FAX_NUMBER_ERROR);
- }
- }
-
- if ($messageStack->size('checkout_address') === 0) {
- $Qab = $osC_Database->query('insert into :table_address_book (customers_id, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id, entry_telephone, entry_fax) values (:customers_id, :entry_gender, :entry_company, :entry_firstname, :entry_lastname, :entry_street_address, :entry_suburb, :entry_postcode, :entry_city, :entry_state, :entry_country_id, :entry_zone_id, :entry_telephone, :entry_fax)');
- $Qab->bindRaw(':table_address_book', TABLE_ADDRESS_BOOK);
- $Qab->bindInt(':customers_id', $osC_Customer->id);
- $Qab->bindValue(':entry_gender', (((ACCOUNT_GENDER > -1) && isset($_POST['gender']) && (($_POST['gender'] == 'm') || ($_POST['gender'] == 'f'))) ? $_POST['gender'] : ''));
- $Qab->bindValue(':entry_company', ((ACCOUNT_COMPANY > -1) ? trim($_POST['company']) : ''));
- $Qab->bindValue(':entry_firstname', trim($_POST['firstname']));
- $Qab->bindValue(':entry_lastname', trim($_POST['lastname']));
- $Qab->bindValue(':entry_street_address', trim($_POST['street_address']));
- $Qab->bindValue(':entry_suburb', ((ACCOUNT_SUBURB > -1) ? trim($_POST['suburb']) : ''));
- $Qab->bindValue(':entry_postcode', trim($_POST['postcode']));
- $Qab->bindValue(':entry_city', trim($_POST['city']));
- $Qab->bindValue(':entry_state', ((ACCOUNT_STATE > -1) ? (($zone_id > 0) ? '' : trim($_POST['state'])) : ''));
- $Qab->bindInt(':entry_country_id', $_POST['country']);
- $Qab->bindInt(':entry_zone_id', ((ACCOUNT_STATE > -1) ? (($zone_id > 0) ? $zone_id : 0) : ''));
- $Qab->bindValue(':entry_telephone', ((ACCOUNT_TELEPHONE > -1) ? trim($_POST['telephone']) : ''));
- $Qab->bindValue(':entry_fax', ((ACCOUNT_FAX > -1) ? trim($_POST['fax']) : ''));
- $Qab->execute();
-
- if ($Qab->affectedRows() === 1) {
- $address_book_id = $osC_Database->nextID();
-
- if ($osC_Customer->hasDefaultAddress() === false) {
- $Qcustomer = $osC_Database->query('update :table_customers set customers_default_address_id = :customers_default_address_id where customers_id = :customers_id');
- $Qcustomer->bindRaw(':table_customers', TABLE_CUSTOMERS);
- $Qcustomer->bindInt(':customers_default_address_id', $address_book_id);
- $Qcustomer->bindInt(':customers_id', $osC_Customer->id);
- $Qcustomer->execute();
-
- $osC_Customer->setCountryID($_POST['country']);
- $osC_Customer->setZoneID($zone_id);
- $osC_Customer->setDefaultAddressID($address_book_id);
- }
-
- $osC_Session->set('sendto', $address_book_id);
- $osC_Session->remove('shipping');
-
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
- } else {
- $messageStack->add('checkout_address', 'Error inserting into address book table.');
- }
- }
-// process the selected shipping destination
- } elseif (isset($_POST['address'])) {
- $reset_shipping = false;
- if ($osC_Session->exists('sendto')) {
- if ($osC_Session->value('sendto') != $_POST['address']) {
- if ($osC_Session->exists('shipping')) {
- $reset_shipping = true;
- }
- }
- }
-
- $osC_Session->set('sendto', $_POST['address']);
-
- $Qcheck = $osC_Database->query('select count(*) as total from :table_address_book where customers_id = :customers_id and address_book_id = :address_book_id');
- $Qcheck->bindTable(':table_address_book', TABLE_ADDRESS_BOOK);
- $Qcheck->bindInt(':customers_id', $osC_Customer->id);
- $Qcheck->bindInt(':address_book_id', $osC_Session->value('sendto'));
- $Qcheck->execute();
-
- if ($Qcheck->valueInt('total') == 1) {
- if ($reset_shipping == true) {
- $osC_Session->remove('shipping');
- }
-
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
- } else {
- $osC_Session->remove('sendto');
- }
- } else {
- $osC_Session->set('sendto', $osC_Customer->default_address_id);
-
- tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
- }
- }
-
-// if no shipping destination address was selected, use their own address as default
- if ($osC_Session->exists('sendto') == false) {
- $osC_Session->set('sendto', $osC_Customer->default_address_id);
- }
-
- $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
- $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL'));
-
- $addresses_count = tep_count_customer_address_book_entries();
-?>
-<!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>
-<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
-<link rel="stylesheet" type="text/css" href="stylesheet.css">
-<script language="javascript"><!--
-var selected;
-
-function selectRowEffect(object, buttonSelect) {
- if (!selected) {
- if (document.getElementById) {
- selected = document.getElementById('defaultSelected');
- } else {
- selected = document.all['defaultSelected'];
- }
- }
-
- if (selected) selected.className = 'moduleRow';
- object.className = 'moduleRowSelected';
- selected = object;
-
-// one button is not an array
- if (document.checkout_address.address[0]) {
- document.checkout_address.address[buttonSelect].checked=true;
- } else {
- document.checkout_address.address.checked=true;
- }
-}
-
-function rowOverEffect(object) {
- if (object.className == 'moduleRow') object.className = 'moduleRowOver';
-}
-
-function rowOutEffect(object) {
- if (object.className == 'moduleRowOver') object.className = 'moduleRow';
-}
-
-function check_form_optional(form_name) {
- var form = form_name;
-
- var firstname = form.elements['firstname'].value;
- var lastname = form.elements['lastname'].value;
- var street_address = form.elements['street_address'].value;
-
- if (firstname == '' && lastname == '' && street_address == '') {
- return true;
- } else {
- return check_form(form_name);
- }
-}
-//--></script>
-<?php require(DIR_WS_INCLUDES . 'form_check.js.php'); ?>
-</head>
-<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
-<!-- header //-->
-<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
-<!-- header_eof //-->
-
-<!-- body //-->
-<table border="0" width="100%" cellspacing="3" cellpadding="3">
- <tr>
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
-<!-- left_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
-<!-- left_navigation_eof //-->
- </table></td>
-<!-- body_text //-->
- <td width="100%" valign="top"><?php echo tep_draw_form('checkout_address', tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL'), 'post', 'onSubmit="return check_form_optional(checkout_address);"'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td><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_image(DIR_WS_IMAGES . 'table_background_delivery.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- if ($messageStack->size('checkout_address') > 0) {
-?>
- <tr>
- <td><?php echo $messageStack->output('checkout_address'); ?></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- }
-
- if (!isset($_POST['action'])) {
- if ($osC_Customer->hasDefaultAddress() === true) {
-?>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo TABLE_HEADING_SHIPPING_ADDRESS; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" width="50%" valign="top"><?php echo TEXT_SELECTED_SHIPPING_DESTINATION; ?></td>
- <td align="right" width="50%" valign="top"><table border="0" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main" align="center" valign="top"><?php echo '<b>' . TITLE_SHIPPING_ADDRESS . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" valign="top"><?php echo tep_address_label($osC_Customer->id, $osC_Session->value('sendto'), true, ' ', '<br>'); ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- }
-
- if ($addresses_count > 1) {
-?>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo TABLE_HEADING_ADDRESS_BOOK_ENTRIES; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" width="50%" valign="top"><?php echo TEXT_SELECT_OTHER_SHIPPING_DESTINATION; ?></td>
- <td class="main" width="50%" valign="top" align="right"><?php echo '<b>' . TITLE_PLEASE_SELECT . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- $radio_buttons = 0;
-
- $Qaddresses = $osC_Database->query('select address_book_id, entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from :table_address_book where customers_id = :customers_id');
- $Qaddresses->bindTable(':table_address_book', TABLE_ADDRESS_BOOK);
- $Qaddresses->bindInt(':customers_id', $osC_Customer->id);
- $Qaddresses->execute();
-
- while ($Qaddresses->next()) {
- $format_id = tep_get_address_format_id($Qaddresses->valueInt('country_id'));
-?>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
-<?php
- if ($Qaddresses->valueInt('address_book_id') == $osC_Session->value('sendto')) {
- echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
- } else {
- echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
- }
-?>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" colspan="2"><b><?php echo $Qaddresses->valueProtected('firstname') . ' ' . $Qaddresses->valueProtected('lastname'); ?></b></td>
- <td class="main" align="right"><?php echo osc_draw_radio_field('address', $Qaddresses->valueInt('address_book_id'), $osC_Session->value('sendto')); ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td colspan="3"><table border="0" cellspacing="0" cellpadding="2">
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main"><?php echo tep_address_format($format_id, $Qaddresses->toArray(), true, ' ', ', '); ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
-<?php
- $radio_buttons++;
- }
-?>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
-<?php
- }
- }
-
- if ($addresses_count < MAX_ADDRESS_BOOK_ENTRIES) {
-?>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><b><?php echo TABLE_HEADING_NEW_SHIPPING_ADDRESS; ?></b></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main" width="100%" valign="top"><?php echo TEXT_CREATE_NEW_SHIPPING_ADDRESS; ?></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td><?php require(DIR_WS_MODULES . 'checkout_new_address.php'); ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
-<?php
- }
-?>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
- <tr class="infoBoxContents">
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- <td class="main"><?php echo '<b>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
- <td class="main" align="right"><?php echo osc_draw_hidden_field('action', 'submit') . tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
- <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="50%" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- </tr>
- </table></td>
- <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>
- <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
- <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
- <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
- </tr>
- </table></td>
- </tr>
- </table></form></td>
-<!-- body_text_eof //-->
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
-<!-- right_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
-<!-- right_navigation_eof //-->
- </table></td>
- </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'); ?>
<hr /><a name="file7" /><div class="file">
<span class="pathname" id="removed"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a><br /></span>
<div class="fileheader" id="removed"><big><b>checkout_success.php</b></big> <small id="info">removed after <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/checkout_success.php?rev=1.52&content-type=text/vnd.viewcvs-markup">1.52</a></small></div>
<pre class="diff"><small id="info">diff -N checkout_success.php
--- /tmp/cvsAAA.va4Nb Wed Mar 30 02:13:07 2005
+++ /dev/null Wed Mar 30 02:13:01 2005
@@ -1,162 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?php
-/*
- $Id$
-
- osCommerce, Open Source E-Commerce Solutions
- http://www.oscommerce.com
-
- Copyright (c) 2005 osCommerce
-
- Released under the GNU General Public License
-*/
-
- require('includes/application_top.php');
-
-// if the customer is not logged on, redirect them to the shopping cart page
- if ($osC_Customer->isLoggedOn() == false) {
- tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
- }
-
- if (isset($_GET['action']) && ($_GET['action'] == 'update')) {
- $notify_string = 'action=notify&';
- $notify = (isset($_POST['notify']) ? $_POST['notify'] : array());
- if (!is_array($notify)) $notify = array($notify);
- for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
- $notify_string .= 'notify[]=' . $notify[$i] . '&';
- }
- if (strlen($notify_string) > 0) $notify_string = substr($notify_string, 0, -1);
-
- tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));
- }
-
- require(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/' . FILENAME_CHECKOUT_SUCCESS);
-
- $breadcrumb->add(NAVBAR_TITLE_1);
- $breadcrumb->add(NAVBAR_TITLE_2);
-
- $Qglobal = $osC_Database->query('select global_product_notifications from :table_customers_info where customers_info_id =:customers_info_id');
- $Qglobal->bindTable(':table_customers_info', TABLE_CUSTOMERS_INFO);
- $Qglobal->bindInt(':customers_info_id', $osC_Customer->id);
- $Qglobal->execute();
-
- if ($Qglobal->valueInt('global_product_notifications') !== 1) {
- $Qorder = $osC_Database->query('select orders_id from :table_orders where customers_id = :customers_id order by date_purchased desc limit 1');
- $Qorder->bindTable(':table_orders', TABLE_ORDERS);
- $Qorder->bindInt(':customers_id', $osC_Customer->id);
- $Qorder->execute();
-
- $Qproducts = $osC_Database->query('select products_id, products_name from :table_orders_products where orders_id = :orders_id order by products_name');
- $Qproducts->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
- $Qproducts->bindInt(':orders_id', $Qorder->valueInt('orders_id'));
- $Qproducts->execute();
-
- $products_array = array();
- while ($Qproducts->next()) {
- $products_array[] = array('id' => $Qproducts->valueInt('products_id'),
- 'text' => $Qproducts->value('products_name'));
- }
- }
-?>
-<!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>
-<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
-<link rel="stylesheet" type="text/css" href="stylesheet.css">
-</head>
-<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
-<!-- header //-->
-<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
-<!-- header_eof //-->
-
-<!-- body //-->
-<table border="0" width="100%" cellspacing="3" cellpadding="3">
- <tr>
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
-<!-- left_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
-<!-- left_navigation_eof //-->
- </table></td>
-<!-- body_text //-->
- <td width="100%" valign="top"><?php echo tep_draw_form('order', tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td><table border="0" width="100%" cellspacing="4" cellpadding="2">
- <tr>
- <td valign="top"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE); ?></td>
- <td valign="top" class="main"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?><div align="center" class="pageHeading"><?php echo HEADING_TITLE; ?></div><br><?php echo TEXT_SUCCESS; ?><br><br>
-<?php
- if ($global['global_product_notifications'] != '1') {
- echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">';
-
- $products_displayed = array();
- for ($i=0, $n=sizeof($products_array); $i<$n; $i++) {
- if (!in_array($products_array[$i]['id'], $products_displayed)) {
- echo osc_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>';
- $products_displayed[] = $products_array[$i]['id'];
- }
- }
-
- echo '</p>';
- } else {
- echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER;
- }
-?>
- <h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td align="right" class="main"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
- </tr>
- <tr>
- <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- </tr>
- </table></td>
- <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
- <td width="50%"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>
- <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
- <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
- <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
- </tr>
- </table></td>
- </tr>
-<?php if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php'); ?>
- </table></form></td>
-<!-- body_text_eof //-->
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
-<!-- right_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
-<!-- right_navigation_eof //-->
- </table></td>
- </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'); ?>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.9</small></center>
</body></html>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click