[ Index ] |
|
Code source de osCommerce 2.2ms2-060817 |
1 <?php 2 /* 3 $Id: checkout_success.php,v 1.49 2003/06/09 23:03:53 hpdl Exp $ 4 5 osCommerce, Open Source E-Commerce Solutions 6 http://www.oscommerce.com 7 8 Copyright (c) 2003 osCommerce 9 10 Released under the GNU General Public License 11 */ 12 13 require ('includes/application_top.php'); 14 15 // if the customer is not logged on, redirect them to the shopping cart page 16 if (!tep_session_is_registered('customer_id')) { 17 tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); 18 } 19 20 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'update')) { 21 $notify_string = 'action=notify&'; 22 $notify = $HTTP_POST_VARS['notify']; 23 if (!is_array($notify)) $notify = array($notify); 24 for ($i=0, $n=sizeof($notify); $i<$n; $i++) { 25 $notify_string .= 'notify[]=' . $notify[$i] . '&'; 26 } 27 if (strlen($notify_string) > 0) $notify_string = substr($notify_string, 0, -1); 28 29 tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string)); 30 } 31 32 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SUCCESS); 33 34 $breadcrumb->add(NAVBAR_TITLE_1); 35 $breadcrumb->add(NAVBAR_TITLE_2); 36 37 $global_query = tep_db_query("select global_product_notifications from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "'"); 38 $global = tep_db_fetch_array($global_query); 39 40 if ($global['global_product_notifications'] != '1') { 41 $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . (int)$customer_id . "' order by date_purchased desc limit 1"); 42 $orders = tep_db_fetch_array($orders_query); 43 44 $products_array = array(); 45 $products_query = tep_db_query("select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$orders['orders_id'] . "' order by products_name"); 46 while ($products = tep_db_fetch_array($products_query)) { 47 $products_array[] = array('id' => $products['products_id'], 48 'text' => $products['products_name']); 49 } 50 } 51 ?> 52 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 53 <html <?php echo HTML_PARAMS; ?>> 54 <head> 55 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 56 <title><?php echo TITLE; ?></title> 57 <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> 58 <link rel="stylesheet" type="text/css" href="stylesheet.css"> 59 </head> 60 <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> 61 <!-- header //--> 62 <?php require(DIR_WS_INCLUDES . 'header.php'); ?> 63 <!-- header_eof //--> 64 65 <!-- body //--> 66 <table border="0" width="100%" cellspacing="3" cellpadding="3"> 67 <tr> 68 <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> 69 <!-- left_navigation //--> 70 <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> 71 <!-- left_navigation_eof //--> 72 </table></td> 73 <!-- body_text //--> 74 <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"> 75 <tr> 76 <td><table border="0" width="100%" cellspacing="4" cellpadding="2"> 77 <tr> 78 <td valign="top"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE); ?></td> 79 <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> 80 <?php 81 if ($global['global_product_notifications'] != '1') { 82 echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">'; 83 84 $products_displayed = array(); 85 for ($i=0, $n=sizeof($products_array); $i<$n; $i++) { 86 if (!in_array($products_array[$i]['id'], $products_displayed)) { 87 echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>'; 88 $products_displayed[] = $products_array[$i]['id']; 89 } 90 } 91 92 echo '</p>'; 93 } else { 94 echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER; 95 } 96 ?> 97 <h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3></td> 98 </tr> 99 </table></td> 100 </tr> 101 <tr> 102 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> 103 </tr> 104 <tr> 105 <td align="right" class="main"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> 106 </tr> 107 <tr> 108 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> 109 </tr> 110 <tr> 111 <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> 112 <tr> 113 <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> 114 <tr> 115 <td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td> 116 <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> 117 </tr> 118 </table></td> 119 <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> 120 <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> 121 <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> 122 <tr> 123 <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> 124 <td width="50%"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td> 125 </tr> 126 </table></td> 127 </tr> 128 <tr> 129 <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_DELIVERY; ?></td> 130 <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_PAYMENT; ?></td> 131 <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td> 132 <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_FINISHED; ?></td> 133 </tr> 134 </table></td> 135 </tr> 136 <?php if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php'); ?> 137 </table></form></td> 138 <!-- body_text_eof //--> 139 <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> 140 <!-- right_navigation //--> 141 <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> 142 <!-- right_navigation_eof //--> 143 </table></td> 144 </tr> 145 </table> 146 <!-- body_eof //--> 147 148 <!-- footer //--> 149 <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> 150 <!-- footer_eof //--> 151 <br> 152 </body> 153 </html> 154 <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 19:48:25 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |