[ Index ]
 

Code source de osCommerce 2.2ms2-060817

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/catalog/ -> account_history_info.php (source)

   1  <?php
   2  /*
   3    $Id: account_history_info.php,v 1.100 2003/06/09 23:03:52 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 (!tep_session_is_registered('customer_id')) {
  16      $navigation->set_snapshot();
  17      tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
  18    }
  19  
  20    if (!isset($HTTP_GET_VARS['order_id']) || (isset($HTTP_GET_VARS['order_id']) && !is_numeric($HTTP_GET_VARS['order_id']))) {
  21      tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
  22    }
  23    
  24    $customer_info_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'");
  25    $customer_info = tep_db_fetch_array($customer_info_query);
  26    if ($customer_info['customers_id'] != $customer_id) {
  27      tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
  28    }
  29  
  30    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT_HISTORY_INFO);
  31  
  32    $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
  33    $breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
  34    $breadcrumb->add(sprintf(NAVBAR_TITLE_3, $HTTP_GET_VARS['order_id']), tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $HTTP_GET_VARS['order_id'], 'SSL'));
  35  
  36    require(DIR_WS_CLASSES . 'order.php');
  37    $order = new order($HTTP_GET_VARS['order_id']);
  38  ?>
  39  <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  40  <html <?php echo HTML_PARAMS; ?>>
  41  <head>
  42  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  43  <title><?php echo TITLE; ?></title>
  44  <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
  45  <link rel="stylesheet" type="text/css" href="stylesheet.css">
  46  </head>
  47  <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
  48  <!-- header //-->
  49  <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
  50  <!-- header_eof //-->
  51  
  52  <!-- body //-->
  53  <table border="0" width="100%" cellspacing="3" cellpadding="3">
  54    <tr>
  55      <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
  56  <!-- left_navigation //-->
  57  <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
  58  <!-- left_navigation_eof //-->
  59      </table></td>
  60  <!-- body_text //-->
  61      <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  62        <tr>
  63          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  64            <tr>
  65              <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  66              <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_history.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
  67            </tr>
  68          </table></td>
  69        </tr>
  70        <tr>
  71          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  72        </tr>
  73        <tr>
  74          <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  75            <tr>
  76              <td class="main" colspan="2"><b><?php echo sprintf(HEADING_ORDER_NUMBER, $HTTP_GET_VARS['order_id']) . ' <small>(' . $order->info['orders_status'] . ')</small>'; ?></b></td>
  77            </tr>
  78            <tr>
  79              <td class="smallText"><?php echo HEADING_ORDER_DATE . ' ' . tep_date_long($order->info['date_purchased']); ?></td>
  80              <td class="smallText" align="right"><?php echo HEADING_ORDER_TOTAL . ' ' . $order->info['total']; ?></td>
  81            </tr>
  82          </table></td>
  83        </tr>
  84        <tr>
  85          <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
  86            <tr class="infoBoxContents">
  87  <?php
  88    if ($order->delivery != false) {
  89  ?>
  90              <td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  91                <tr>
  92                  <td class="main"><b><?php echo HEADING_DELIVERY_ADDRESS; ?></b></td>
  93                </tr>
  94                <tr>
  95                  <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); ?></td>
  96                </tr>
  97  <?php
  98      if (tep_not_null($order->info['shipping_method'])) {
  99  ?>
 100                <tr>
 101                  <td class="main"><b><?php echo HEADING_SHIPPING_METHOD; ?></b></td>
 102                </tr>
 103                <tr>
 104                  <td class="main"><?php echo $order->info['shipping_method']; ?></td>
 105                </tr>
 106  <?php
 107      }
 108  ?>
 109              </table></td>
 110  <?php
 111    }
 112  ?>
 113              <td width="<?php echo (($order->delivery != false) ? '70%' : '100%'); ?>" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
 114                <tr>
 115                  <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
 116  <?php
 117    if (sizeof($order->info['tax_groups']) > 1) {
 118  ?>
 119                    <tr>
 120                      <td class="main" colspan="2"><b><?php echo HEADING_PRODUCTS; ?></b></td>
 121                      <td class="smallText" align="right"><b><?php echo HEADING_TAX; ?></b></td>
 122                      <td class="smallText" align="right"><b><?php echo HEADING_TOTAL; ?></b></td>
 123                    </tr>
 124  <?php
 125    } else {
 126  ?>
 127                    <tr>
 128                      <td class="main" colspan="3"><b><?php echo HEADING_PRODUCTS; ?></b></td>
 129                    </tr>
 130  <?php
 131    }
 132  
 133    for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
 134      echo '          <tr>' . "\n" .
 135           '            <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
 136           '            <td class="main" valign="top">' . $order->products[$i]['name'];
 137  
 138      if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {
 139        for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
 140          echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';
 141        }
 142      }
 143  
 144      echo '</td>' . "\n";
 145  
 146      if (sizeof($order->info['tax_groups']) > 1) {
 147        echo '            <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n";
 148      }
 149  
 150      echo '            <td class="main" align="right" valign="top">' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</td>' . "\n" .
 151           '          </tr>' . "\n";
 152    }
 153  ?>
 154                  </table></td>
 155                </tr>
 156              </table></td>
 157            </tr>
 158          </table></td>
 159        </tr>
 160        <tr>
 161          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 162        </tr>
 163        <tr>
 164          <td class="main"><b><?php echo HEADING_BILLING_INFORMATION; ?></b></td>
 165        </tr>
 166        <tr>
 167          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 168        </tr>
 169        <tr>
 170          <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
 171            <tr class="infoBoxContents">
 172              <td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
 173                <tr>
 174                  <td class="main"><b><?php echo HEADING_BILLING_ADDRESS; ?></b></td>
 175                </tr>
 176                <tr>
 177                  <td class="main"><?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>'); ?></td>
 178                </tr>
 179                <tr>
 180                  <td class="main"><b><?php echo HEADING_PAYMENT_METHOD; ?></b></td>
 181                </tr>
 182                <tr>
 183                  <td class="main"><?php echo $order->info['payment_method']; ?></td>
 184                </tr>
 185              </table></td>
 186              <td width="70%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
 187  <?php
 188    for ($i=0, $n=sizeof($order->totals); $i<$n; $i++) {
 189      echo '              <tr>' . "\n" .
 190           '                <td class="main" align="right" width="100%">' . $order->totals[$i]['title'] . '</td>' . "\n" .
 191           '                <td class="main" align="right">' . $order->totals[$i]['text'] . '</td>' . "\n" .
 192           '              </tr>' . "\n";
 193    }
 194  ?>
 195              </table></td>
 196            </tr>
 197          </table></td>
 198        </tr>
 199        <tr>
 200          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 201        </tr>
 202        <tr>
 203          <td class="main"><b><?php echo HEADING_ORDER_HISTORY; ?></b></td>
 204        </tr>
 205        <tr>
 206          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 207        </tr>
 208        <tr>
 209          <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
 210            <tr class="infoBoxContents">
 211              <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
 212  <?php
 213    $statuses_query = tep_db_query("select os.orders_status_name, osh.date_added, osh.comments from " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh where osh.orders_id = '" . (int)$HTTP_GET_VARS['order_id'] . "' and osh.orders_status_id = os.orders_status_id and os.language_id = '" . (int)$languages_id . "' order by osh.date_added");
 214    while ($statuses = tep_db_fetch_array($statuses_query)) {
 215      echo '              <tr>' . "\n" .
 216           '                <td class="main" valign="top" width="70">' . tep_date_short($statuses['date_added']) . '</td>' . "\n" .
 217           '                <td class="main" valign="top" width="70">' . $statuses['orders_status_name'] . '</td>' . "\n" .
 218           '                <td class="main" valign="top">' . (empty($statuses['comments']) ? '&nbsp;' : nl2br(tep_output_string_protected($statuses['comments']))) . '</td>' . "\n" .
 219           '              </tr>' . "\n";
 220    }
 221  ?>
 222              </table></td>
 223            </tr>
 224          </table></td>
 225        </tr>
 226  <?php
 227    if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php');
 228  ?>
 229        <tr>
 230          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 231        </tr>
 232        <tr>
 233          <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
 234            <tr class="infoBoxContents">
 235              <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
 236                <tr>
 237                  <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
 238                  <td><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, tep_get_all_get_params(array('order_id')), 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
 239                  <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
 240                </tr>
 241              </table></td>
 242            </tr>
 243          </table></td>
 244        </tr>
 245      </table></td>
 246  <!-- body_text_eof //-->
 247      <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
 248  <!-- right_navigation //-->
 249  <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
 250  <!-- right_navigation_eof //-->
 251      </table></td>
 252    </tr>
 253  </table>
 254  <!-- body_eof //-->
 255  
 256  <!-- footer //-->
 257  <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
 258  <!-- footer_eof //-->
 259  <br>
 260  </body>
 261  </html>
 262  <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>


Généré le : Mon Nov 26 19:48:25 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics