[ Index ]
 

Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/admin/ -> packingslip.php (source)

   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: packingslip.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    $orders = $db->Execute("select orders_id
  30                            from " . TABLE_ORDERS . "
  31                            where orders_id = '" . (int)$oID . "'");
  32  
  33    include(DIR_WS_CLASSES . 'order.php');
  34    $order = new order($oID);
  35  ?>
  36  <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  37  <html <?php echo HTML_PARAMS; ?>>
  38  <head>
  39  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  40  <title><?php echo TITLE; ?></title>
  41  <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
  42  <script language="javascript" src="includes/menu.js"></script>
  43  </head>
  44  <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
  45  <!-- body_text //-->
  46  <table border="0" width="100%" cellspacing="0" cellpadding="2">
  47    <tr>
  48      <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  49        <tr>
  50          <td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td>
  51          <td class="pageHeading" align="right"><?php echo zen_image(DIR_WS_IMAGES . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT); ?></td>
  52        </tr>
  53      </table></td>
  54    </tr>
  55    <tr>
  56      <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
  57        <tr>
  58          <td colspan="2"><?php echo zen_draw_separator(); ?></td>
  59        </tr>
  60  
  61  <?php
  62        $order_check = $db->Execute("select cc_cvv, customers_name, customers_company, customers_street_address,
  63                                      customers_suburb, customers_city, customers_postcode,
  64                                      customers_state, customers_country, customers_telephone,
  65                                      customers_email_address, customers_address_format_id, delivery_name,
  66                                      delivery_company, delivery_street_address, delivery_suburb,
  67                                      delivery_city, delivery_postcode, delivery_state, delivery_country,
  68                                      delivery_address_format_id, billing_name, billing_company,
  69                                      billing_street_address, billing_suburb, billing_city, billing_postcode,
  70                                      billing_state, billing_country, billing_address_format_id,
  71                                      payment_method, cc_type, cc_owner, cc_number, cc_expires, currency,
  72                                      currency_value, date_purchased, orders_status, last_modified
  73                               from " . TABLE_ORDERS . "
  74                               where orders_id = '" . (int)$oID . "'");
  75    $show_customer = 'false';
  76    if ($order_check->fields['billing_name'] != $order_check->fields['delivery_name']) {
  77      $show_customer = 'true';
  78    }
  79    if ($order_check->fields['billing_street_address'] != $order_check->fields['delivery_street_address']) {
  80      $show_customer = 'true';
  81    }
  82    if ($show_customer == 'true') {
  83  ?>
  84        <tr>
  85          <td class="main"><b><?php echo ENTRY_CUSTOMER; ?></b></td>
  86        </tr>
  87        <tr>
  88          <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td>
  89        </tr>
  90  <?php } ?>
  91        <tr>
  92          <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
  93           <tr>
  94              <td class="main"><b><?php echo ENTRY_SOLD_TO; ?></b></td>
  95            </tr>
  96            <tr>
  97              <td class="main"><?php echo zen_address_format($order->customer['format_id'], $order->billing, 1, '', '<br>'); ?></td>
  98            </tr>
  99            <tr>
 100              <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
 101            </tr>
 102            <tr>
 103              <td class="main"><?php echo $order->customer['telephone']; ?></td>
 104            </tr>
 105            <tr>
 106              <td class="main"><?php echo '<a href="mailto:' . $order->customer['email_address'] . '">' . $order->customer['email_address'] . '</a>'; ?></td>
 107            </tr>
 108          </table></td>
 109          <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
 110            <tr>
 111              <td class="main"><b><?php echo ENTRY_SHIP_TO; ?></b></td>
 112            </tr>
 113            <tr>
 114              <td class="main"><?php echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?></td>
 115            </tr>
 116          </table></td>
 117        </tr>
 118      </table></td>
 119    </tr>
 120    <tr>
 121      <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 122    </tr>
 123    <tr>
 124      <td class="main"><b><?php echo ENTRY_ORDER_ID . $oID; ?></b></td>
 125    </tr>
 126    <tr>
 127      <td><table border="0" cellspacing="0" cellpadding="2">
 128        <tr>
 129          <td class="main"><strong><?php echo ENTRY_DATE_PURCHASED; ?></strong></td>
 130          <td class="main"><?php echo zen_date_long($order->info['date_purchased']); ?></td>
 131        </tr>
 132        <tr>
 133          <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>
 134          <td class="main"><?php echo $order->info['payment_method']; ?></td>
 135        </tr>
 136      </table></td>
 137    </tr>
 138    <tr>
 139      <td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
 140    </tr>
 141    <tr>
 142      <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
 143        <tr class="dataTableHeadingRow">
 144          <td class="dataTableHeadingContent" colspan="2"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
 145          <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
 146        </tr>
 147  <?php
 148      for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
 149        echo '      <tr class="dataTableRow">' . "\n" .
 150             '        <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
 151             '        <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
 152  
 153        if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {
 154          for ($j=0, $k=sizeof($order->products[$i]['attributes']); $j<$k; $j++) {
 155            echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
 156            echo '</i></small></nobr>';
 157          }
 158        }
 159  
 160        echo '        </td>' . "\n" .
 161             '        <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n" .
 162             '      </tr>' . "\n";
 163      }
 164  ?>
 165      </table></td>
 166    </tr>
 167  </table>
 168  <!-- body_text_eof //-->
 169  <br>
 170  </body>
 171  </html>
 172  <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


Généré le : Mon Nov 26 16:45:43 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics