[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 // 3 // +----------------------------------------------------------------------+ 4 // |zen-cart Open Source E-commerce | 5 // +----------------------------------------------------------------------+ 6 // | Copyright (c) 2006 The zen-cart developers | 7 // | | 8 // | http://www.zen-cart.com/index.php | 9 // | | 10 // | Portions Copyright (c) 2003 osCommerce | 11 // +----------------------------------------------------------------------+ 12 // | This source file is subject to version 2.0 of the GPL license, | 13 // | that is bundled with this package in the file LICENSE, and is | 14 // | available through the world-wide-web at the following url: | 15 // | http://www.zen-cart.com/license/2_0.txt. | 16 // | If you did not receive a copy of the zen-cart license and are unable | 17 // | to obtain it through the world-wide-web, please send a note to | 18 // | license@zen-cart.com so we can mail you a copy immediately. | 19 // +----------------------------------------------------------------------+ 20 // $Id: invoice.php 6524 2007-06-25 21:27:46Z drbyte $ 21 // 22 23 require ('includes/application_top.php'); 24 25 require (DIR_WS_CLASSES . 'currencies.php'); 26 $currencies = new currencies(); 27 28 $oID = zen_db_prepare_input($_GET['oID']); 29 30 include(DIR_WS_CLASSES . 'order.php'); 31 $order = new order($oID); 32 ?> 33 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 34 <html <?php echo HTML_PARAMS; ?>> 35 <head> 36 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 37 <title><?php echo TITLE; ?></title> 38 <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> 39 <script language="javascript" src="includes/menu.js"></script> 40 <script language="javascript" type="text/javascript"><!-- 41 function couponpopupWindow(url) { 42 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,left=150') 43 } 44 //--></script> 45 </head> 46 <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> 47 48 <!-- body_text //--> 49 <table border="0" width="100%" cellspacing="0" cellpadding="2"> 50 <tr> 51 <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> 52 <tr> 53 <td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td> 54 <td class="pageHeading" align="right"><?php echo zen_image(DIR_WS_IMAGES . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT); ?></td> 55 </tr> 56 </table></td> 57 </tr> 58 <tr> 59 <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> 60 <tr> 61 <td colspan="2"><?php echo zen_draw_separator(); ?></td> 62 </tr> 63 64 <?php 65 $order_check = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address, 66 customers_suburb, customers_city, customers_postcode, 67 customers_state, customers_country, customers_telephone, 68 customers_email_address, customers_address_format_id, delivery_name, 69 delivery_company, delivery_street_address, delivery_suburb, 70 delivery_city, delivery_postcode, delivery_state, delivery_country, 71 delivery_address_format_id, billing_name, billing_company, 72 billing_street_address, billing_suburb, billing_city, billing_postcode, 73 billing_state, billing_country, billing_address_format_id, 74 payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, 75 currency_value, date_purchased, orders_status, last_modified 76 from " . TABLE_ORDERS . " 77 where orders_id = '" . (int)$oID . "'"); 78 $show_customer = 'false'; 79 if ($order_check->fields['billing_name'] != $order_check->fields['delivery_name']) { 80 $show_customer = 'true'; 81 } 82 if ($order_check->fields['billing_street_address'] != $order_check->fields['delivery_street_address']) { 83 $show_customer = 'true'; 84 } 85 if ($show_customer == 'true') { 86 ?> 87 <tr> 88 <td class="main"><b><?php echo ENTRY_CUSTOMER; ?></b></td> 89 </tr> 90 <tr> 91 <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td> 92 </tr> 93 <?php } ?> 94 <tr> 95 <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> 96 <tr> 97 <td class="main"><b><?php echo ENTRY_SOLD_TO; ?></b></td> 98 </tr> 99 <tr> 100 <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->billing, 1, '', '<br>'); ?></td> 101 </tr> 102 <tr> 103 <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '5'); ?></td> 104 </tr> 105 <tr> 106 <td class="main"><?php echo $order->customer['telephone']; ?></td> 107 </tr> 108 <tr> 109 <td class="main"><?php echo '<a href="mailto:' . $order->customer['email_address'] . '">' . $order->customer['email_address'] . '</a>'; ?></td> 110 </tr> 111 </table></td> 112 <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> 113 <tr> 114 <td class="main"><b><?php echo ENTRY_SHIP_TO; ?></b></td> 115 </tr> 116 <tr> 117 <td class="main"><?php echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?></td> 118 </tr> 119 </table></td> 120 </tr> 121 </table></td> 122 </tr> 123 <tr> 124 <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td> 125 </tr> 126 <tr> 127 <td class="main"><b><?php echo ENTRY_ORDER_ID . $oID; ?></b></td> 128 </tr> 129 <tr> 130 <td><table border="0" cellspacing="0" cellpadding="2"> 131 <tr> 132 <td class="main"><strong><?php echo ENTRY_DATE_PURCHASED; ?></strong></td> 133 <td class="main"><?php echo zen_date_long($order->info['date_purchased']); ?></td> 134 </tr> 135 <tr> 136 <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td> 137 <td class="main"><?php echo $order->info['payment_method']; ?></td> 138 </tr> 139 </table></td> 140 </tr> 141 <tr> 142 <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td> 143 </tr> 144 <tr> 145 <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> 146 <tr class="dataTableHeadingRow"> 147 <td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td> 148 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td> 149 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TAX; ?></td> 150 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_EXCLUDING_TAX; ?></td> 151 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PRICE_INCLUDING_TAX; ?></td> 152 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_EXCLUDING_TAX; ?></td> 153 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td> 154 </tr> 155 <?php 156 for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { 157 echo ' <tr class="dataTableRow">' . "\n" . 158 ' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . 159 ' <td class="dataTableContent" valign="top">' . $order->products[$i]['name']; 160 161 if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) { 162 for ($j = 0; $j < $k; $j++) { 163 echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])); 164 if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')'; 165 if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') echo TEXT_INFO_ATTRIBUTE_FREE; 166 echo '</i></small></nobr>'; 167 } 168 } 169 170 echo ' </td>' . "\n" . 171 ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n"; 172 echo ' <td class="dataTableContent" align="right" valign="top">' . zen_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . 173 ' <td class="dataTableContent" align="right" valign="top"><b>' . 174 $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . 175 ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') . 176 '</b></td>' . "\n" . 177 ' <td class="dataTableContent" align="right" valign="top"><b>' . 178 $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . 179 ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') . 180 '</b></td>' . "\n" . 181 ' <td class="dataTableContent" align="right" valign="top"><b>' . 182 $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . 183 ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') . 184 '</b></td>' . "\n" . 185 ' <td class="dataTableContent" align="right" valign="top"><b>' . 186 $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . 187 ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') . 188 '</b></td>' . "\n"; 189 echo ' </tr>' . "\n"; 190 } 191 ?> 192 <tr> 193 <td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2"> 194 <?php 195 for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) { 196 echo ' <tr>' . "\n" . 197 ' <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Text">' . $order->totals[$i]['title'] . '</td>' . "\n" . 198 ' <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $order->totals[$i]['text'] . '</td>' . "\n" . 199 ' </tr>' . "\n"; 200 } 201 ?> 202 </table></td> 203 </tr> 204 </table></td> 205 </tr> 206 </table> 207 <!-- body_text_eof //--> 208 209 <br> 210 </body> 211 </html> 212 <?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 16:45:43 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |