[TEP-COMMIT] [CVS catalog] the new orders pages based on a CSS layout, and a new account orders module

hpdl-OfajU3CKLf1/[email protected] 29 Mar 2005 23:36:49 -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/includes</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>content/pages/<a href="#file1"><span id="added">account_history.php</span></a></tt></td><td align="right" id="added">+90</td><td></td><td nowrap="nowrap" align="right">added <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/content/pages/account_history.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a></td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file2"><span id="added">account_history_info.php</span></a></tt></td><td align="right" id="added">+164</td><td></td><td nowrap="nowrap" align="right">added <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/content/pages/account_history_info.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a></td></tr>
<tr><td><tt>modules/account/<a href="#file3"><span id="added">orders.php</span></a></tt></td><td align="right" id="added">+70</td><td></td><td nowrap="nowrap" align="right">added <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/account/orders.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a></td></tr>
<tr><td></td><td align="right" id="added">+324</td><td></td><td></td></tr>
</table>
<small id="info">3 added files</small><br />
<pre class="comment">
the new orders pages based on a CSS layout, and a new account orders module
to handle the processing logic
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="added"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/content">content</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/content/pages">pages</a><br /></span>
<div class="fileheader" id="added"><big><b>account_history.php</b></big> <small id="info">added at <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/content/pages/account_history.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a></small></div>
<pre class="diff"><small id="info">diff -N account_history.php
--- /dev/null	Wed Mar 30 01:36:34 2005
+++ /tmp/cvsAAAchayrB	Wed Mar 30 01:36:43 2005
@@ -0,0 +1,90 @@
</small></pre><pre class="diff" id="added">+&lt;?php
+/*
+  $Id$
+
+  osCommerce, Open Source E-Commerce Solutions
+  http://www.oscommerce.com
+
+  Copyright (c) 2005 osCommerce
+
+  Released under the GNU General Public License
+*/
+?&gt;
+
+&lt;div class="pageHeading"&gt;
+  &lt;span class="pageHeadingImage"&gt;&lt;?php echo tep_image(DIR_WS_IMAGES . 'table_background_history.gif', HEADING_TITLE_ORDERS, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?&gt;&lt;/span&gt;
+
+  &lt;h1&gt;&lt;?php echo HEADING_TITLE_ORDERS; ?&gt;&lt;/h1&gt;
+&lt;/div&gt;
+
+&lt;?php
+  if (tep_count_customer_orders() &gt; 0) {
+    $Qhistory = $osC_Database-&gt;query('select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total, s.orders_status_name from :table_orders o, :table_orders_total ot, :table_orders_status s where o.customers_id = :customers_id and o.orders_id = ot.orders_id and ot.class = "ot_total" and o.orders_status = s.orders_status_id and s.language_id = :language_id order by orders_id desc');
+    $Qhistory-&gt;bindTable(':table_orders', TABLE_ORDERS);
+    $Qhistory-&gt;bindTable(':table_orders_total', TABLE_ORDERS_TOTAL);
+    $Qhistory-&gt;bindTable(':table_orders_status', TABLE_ORDERS_STATUS);
+    $Qhistory-&gt;bindInt(':customers_id', $osC_Customer-&gt;id);
+    $Qhistory-&gt;bindInt(':language_id', $osC_Session-&gt;value('languages_id'));
+    $Qhistory-&gt;setBatchLimit((isset($_GET['page']) ? $_GET['page'] : 1), MAX_DISPLAY_ORDER_HISTORY);
+    $Qhistory-&gt;execute();
+
+    while ($Qhistory-&gt;next()) {
+      $Qproducts = $osC_Database-&gt;query('select count(*) as count from :table_orders_products where orders_id = :orders_id');
+      $Qproducts-&gt;bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
+      $Qproducts-&gt;bindInt(':orders_id', $Qhistory-&gt;valueInt('orders_id'));
+      $Qproducts-&gt;execute();
+
+      if (tep_not_null($Qhistory-&gt;value('delivery_name'))) {
+        $order_type = TEXT_ORDER_SHIPPED_TO;
+        $order_name = $Qhistory-&gt;value('delivery_name');
+      } else {
+        $order_type = TEXT_ORDER_BILLED_TO;
+        $order_name = $Qhistory-&gt;value('billing_name');
+      }
+?&gt;
+
+&lt;div class="moduleBox"&gt;
+  &lt;div class="outsideHeading"&gt;
+    &lt;span style="float: right; text-align: right;"&gt;&lt;?php echo TEXT_ORDER_STATUS . ' ' . $Qhistory-&gt;value('orders_status_name'); ?&gt;&lt;/span&gt;
+
+    &lt;?php echo TEXT_ORDER_NUMBER . ' ' . $Qhistory-&gt;valueInt('orders_id'); ?&gt;
+  &lt;/div&gt;
+
+  &lt;div class="content"&gt;
+    &lt;table border="0" width="100%" cellspacing="2" cellpadding="4"&gt;
+      &lt;tr&gt;
+        &lt;td width="50%" valign="top"&gt;&lt;?php echo '&lt;b&gt;' . TEXT_ORDER_DATE . '&lt;/b&gt; ' . tep_date_long($Qhistory-&gt;value('date_purchased')) . '&lt;br&gt;&lt;b&gt;' . $order_type . '&lt;/b&gt; ' . tep_output_string_protected($order_name); ?&gt;&lt;/td&gt;
+        &lt;td width="30%" valign="top"&gt;&lt;?php echo '&lt;b&gt;' . TEXT_ORDER_PRODUCTS . '&lt;/b&gt; ' . $Qproducts-&gt;valueInt('count') . '&lt;br&gt;&lt;b&gt;' . TEXT_ORDER_COST . '&lt;/b&gt; ' . strip_tags($Qhistory-&gt;value('order_total')); ?&gt;&lt;/td&gt;
+        &lt;td width="20%"&gt;&lt;?php echo '&lt;a href="' . tep_href_link(FILENAME_ACCOUNT, 'orders=' . $Qhistory-&gt;valueInt('orders_id') . (isset($_GET['page']) ? '&amp;page=' . $_GET['page'] : ''), 'SSL') . '"&gt;' . tep_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW) . '&lt;/a&gt;'; ?&gt;&lt;/td&gt;
+      &lt;/tr&gt;
+    &lt;/table&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;?php
+    }
+?&gt;
+
+&lt;div class="listingPageLinks"&gt;
+  &lt;span style="float: right;"&gt;&lt;?php echo $Qhistory-&gt;displayBatchLinksPullDown(); ?&gt;&lt;/span&gt;
+
+  &lt;?php echo $Qhistory-&gt;displayBatchLinksTotal(TEXT_DISPLAY_NUMBER_OF_ORDERS); ?&gt;
+&lt;/div&gt;
+
+&lt;?php
+  } else {
+?&gt;
+
+&lt;div class="moduleBox"&gt;
+  &lt;div class="content"&gt;
+    &lt;?php echo TEXT_NO_PURCHASES; ?&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;?php
+  }
+?&gt;
+
+&lt;div class="submitFormButtons"&gt;
+  &lt;?php echo '&lt;a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '"&gt;' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '&lt;/a&gt;'; ?&gt;
+&lt;/div&gt;
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="added"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/content">content</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/content/pages">pages</a><br /></span>
<div class="fileheader" id="added"><big><b>account_history_info.php</b></big> <small id="info">added at <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/content/pages/account_history_info.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a></small></div>
<pre class="diff"><small id="info">diff -N account_history_info.php
--- /dev/null	Wed Mar 30 01:36:34 2005
+++ /tmp/cvsAAAlmaisB	Wed Mar 30 01:36:44 2005
@@ -0,0 +1,164 @@
</small></pre><pre class="diff" id="added">+&lt;?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/classes/order.php');
+  $order = new order($_GET['orders']);
+?&gt;
+
+&lt;div class="pageHeading"&gt;
+  &lt;span class="pageHeadingImage"&gt;&lt;?php echo tep_image(DIR_WS_IMAGES . 'table_background_history.gif', sprintf(NAVBAR_TITLE_ORDER_INFORMATION, $_GET['orders']), HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?&gt;&lt;/span&gt;
+
+  &lt;h1&gt;&lt;?php echo sprintf(NAVBAR_TITLE_ORDER_INFORMATION, $_GET['orders']); ?&gt;&lt;/h1&gt;
+&lt;/div&gt;
+
+&lt;div class="moduleBox"&gt;
+  &lt;div class="outsideHeading"&gt;
+    &lt;span style="float: right;"&gt;&amp;nbsp;&lt;br&gt;&lt;?php echo HEADING_ORDER_TOTAL . ' ' . $order-&gt;info['total']; ?&gt;&lt;/span&gt;
+
+    &lt;?php echo sprintf(HEADING_ORDER_NUMBER, $_GET['orders']) . ' &lt;small&gt;(' . $order-&gt;info['orders_status'] . ')&lt;/small&gt;&lt;br&gt;' . HEADING_ORDER_DATE . ' ' . tep_date_long($order-&gt;info['date_purchased']); ?&gt;
+  &lt;/div&gt;
+
+  &lt;div class="content"&gt;
+    &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
+      &lt;tr&gt;
+        &lt;td width="30%" valign="top"&gt;
+
+&lt;?php
+  if ($order-&gt;delivery != false) {
+?&gt;
+          &lt;p&gt;&lt;b&gt;&lt;?php echo HEADING_DELIVERY_ADDRESS; ?&gt;&lt;/b&gt;&lt;/p&gt;
+          &lt;p&gt;&lt;?php echo tep_address_format($order-&gt;delivery['format_id'], $order-&gt;delivery, 1, ' ', '&lt;br&gt;'); ?&gt;&lt;/p&gt;
+
+&lt;?php
+    if (tep_not_null($order-&gt;info['shipping_method'])) {
+?&gt;
+
+          &lt;p&gt;&lt;b&gt;&lt;?php echo HEADING_SHIPPING_METHOD; ?&gt;&lt;/b&gt;&lt;/p&gt;
+          &lt;p&gt;&lt;?php echo $order-&gt;info['shipping_method']; ?&gt;&lt;/p&gt;
+
+&lt;?php
+    }
+  }
+?&gt;
+
+          &lt;p&gt;&lt;b&gt;&lt;?php echo HEADING_BILLING_ADDRESS; ?&gt;&lt;/b&gt;&lt;/p&gt;
+          &lt;p&gt;&lt;?php echo tep_address_format($order-&gt;billing['format_id'], $order-&gt;billing, 1, ' ', '&lt;br&gt;'); ?&gt;&lt;/p&gt;
+
+          &lt;p&gt;&lt;b&gt;&lt;?php echo HEADING_PAYMENT_METHOD; ?&gt;&lt;/b&gt;&lt;/p&gt;
+          &lt;p&gt;&lt;?php echo $order-&gt;info['payment_method']; ?&gt;&lt;/p&gt;
+        &lt;/td&gt;
+        &lt;td width="70%" valign="top"&gt;
+          &lt;div style="border: 1px; border-style: solid; border-color: #CCCCCC; background-color: #FBFBFB; padding: 5px;"&gt;
+            &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
+&lt;?php
+  if (sizeof($order-&gt;info['tax_groups']) &gt; 1) {
+?&gt;
+              &lt;tr&gt;
+                &lt;td colspan="2"&gt;&lt;b&gt;&lt;?php echo HEADING_PRODUCTS; ?&gt;&lt;/b&gt;&lt;/td&gt;
+                &lt;td align="right"&gt;&lt;b&gt;&lt;?php echo HEADING_TAX; ?&gt;&lt;/b&gt;&lt;/td&gt;
+                &lt;td align="right"&gt;&lt;b&gt;&lt;?php echo HEADING_TOTAL; ?&gt;&lt;/b&gt;&lt;/td&gt;
+              &lt;/tr&gt;
+&lt;?php
+  } else {
+?&gt;
+              &lt;tr&gt;
+                &lt;td colspan="3"&gt;&lt;b&gt;&lt;?php echo HEADING_PRODUCTS; ?&gt;&lt;/b&gt;&lt;/td&gt;
+              &lt;/tr&gt;
+&lt;?php
+  }
+
+  for ($i=0, $n=sizeof($order-&gt;products); $i&lt;$n; $i++) {
+    echo '              &lt;tr&gt;' . "\n" .
+         '                &lt;td align="right" valign="top" width="30"&gt;' . $order-&gt;products[$i]['qty'] . '&amp;nbsp;x&lt;/td&gt;' . "\n" .
+         '                &lt;td valign="top"&gt;' . $order-&gt;products[$i]['name'];
+
+    if ( (isset($order-&gt;products[$i]['attributes'])) &amp;&amp; (sizeof($order-&gt;products[$i]['attributes']) &gt; 0) ) {
+      for ($j=0, $n2=sizeof($order-&gt;products[$i]['attributes']); $j&lt;$n2; $j++) {
+        echo '&lt;br&gt;&lt;nobr&gt;&lt;small&gt;&amp;nbsp;&lt;i&gt; - ' . $order-&gt;products[$i]['attributes'][$j]['option'] . ': ' . $order-&gt;products[$i]['attributes'][$j]['value'] . '&lt;/i&gt;&lt;/small&gt;&lt;/nobr&gt;';
+      }
+    }
+
+    echo '&lt;/td&gt;' . "\n";
+
+    if (sizeof($order-&gt;info['tax_groups']) &gt; 1) {
+      echo '                &lt;td valign="top" align="right"&gt;' . tep_display_tax_value($order-&gt;products[$i]['tax']) . '%&lt;/td&gt;' . "\n";
+    }
+
+    echo '                &lt;td align="right" valign="top"&gt;' . $osC_Currencies-&gt;format(tep_add_tax($order-&gt;products[$i]['final_price'], $order-&gt;products[$i]['tax']) * $order-&gt;products[$i]['qty'], $order-&gt;info['currency'], $order-&gt;info['currency_value']) . '&lt;/td&gt;' . "\n" .
+         '              &lt;/tr&gt;' . "\n";
+  }
+?&gt;
+
+            &lt;/table&gt;
+
+            &lt;p&gt;&amp;nbsp;&lt;/p&gt;
+
+            &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
+
+&lt;?php
+  for ($i=0, $n=sizeof($order-&gt;totals); $i&lt;$n; $i++) {
+    echo '              &lt;tr&gt;' . "\n" .
+         '                &lt;td align="right" width="100%"&gt;' . $order-&gt;totals[$i]['title'] . '&lt;/td&gt;' . "\n" .
+         '                &lt;td&gt;&amp;nbsp;&amp;nbsp;&lt;/td&gt;' . "\n" .
+         '                &lt;td align="right"&gt;' . $order-&gt;totals[$i]['text'] . '&lt;/td&gt;' . "\n" .
+         '              &lt;/tr&gt;' . "\n";
+  }
+?&gt;
+            &lt;/table&gt;
+          &lt;/div&gt;
+        &lt;/td&gt;
+      &lt;/tr&gt;
+    &lt;/table&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;?php
+  $Qstatus = $osC_Database-&gt;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 = :orders_id and osh.orders_status_id = os.orders_status_id and os.language_id = :language_id order by osh.date_added');
+  $Qstatus-&gt;bindTable(':table_orders_status', TABLE_ORDERS_STATUS);
+  $Qstatus-&gt;bindTable(':table_orders_status_history', TABLE_ORDERS_STATUS_HISTORY);
+  $Qstatus-&gt;bindInt(':orders_id', $_GET['orders']);
+  $Qstatus-&gt;bindInt(':language_id', $osC_Session-&gt;value('languages_id'));
+  $Qstatus-&gt;execute();
+
+  if ($Qstatus-&gt;numberOfRows() &gt; 0) {
+?&gt;
+
+&lt;div class="moduleBox"&gt;
+  &lt;div class="outsideHeading"&gt;&lt;?php echo HEADING_ORDER_HISTORY; ?&gt;&lt;/div&gt;
+
+  &lt;div class="content"&gt;
+    &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
+&lt;?php
+  while ($Qstatus-&gt;next()) {
+    echo '    &lt;tr&gt;' . "\n" .
+         '      &lt;td valign="top" width="70"&gt;' . tep_date_short($Qstatus-&gt;value('date_added')) . '&lt;/td&gt;' . "\n" .
+         '      &lt;td valign="top" width="70"&gt;' . $Qstatus-&gt;value('orders_status_name') . '&lt;/td&gt;' . "\n" .
+         '      &lt;td valign="top"&gt;' . (tep_not_null($Qstatus-&gt;valueProtected('comments')) ? nl2br($Qstatus-&gt;valueProtected('comments')) : '&amp;nbsp;') . '&lt;/td&gt;' . "\n" .
+         '    &lt;/tr&gt;' . "\n";
+  }
+?&gt;
+    &lt;/table&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;?php
+  }
+
+  if (DOWNLOAD_ENABLED == 'true') {
+    include('includes/modules/downloads.php');
+  }
+?&gt;
+
+
+&lt;div class="submitFormButtons"&gt;
+  &lt;?php echo '&lt;a href="' . tep_href_link(FILENAME_ACCOUNT, 'orders' . (isset($_GET['page']) ? '&amp;page=' . $_GET['page'] : ''), 'SSL') . '"&gt;' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '&lt;/a&gt;'; ?&gt;
+&lt;/div&gt;
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname" id="added"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/account">account</a><br /></span>
<div class="fileheader" id="added"><big><b>orders.php</b></big> <small id="info">added at <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/account/orders.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a></small></div>
<pre class="diff"><small id="info">diff -N orders.php
--- /dev/null	Wed Mar 30 01:36:34 2005
+++ /tmp/cvsAAAGxaWsB	Wed Mar 30 01:36:44 2005
@@ -0,0 +1,70 @@
</small></pre><pre class="diff" id="added">+&lt;?php
+/*
+  $Id$
+
+  osCommerce, Open Source E-Commerce Solutions
+  http://www.oscommerce.com
+
+  Copyright (c) 2005 osCommerce
+
+  Released under the GNU General Public License
+*/
+
+  class osC_Account_Orders {
+
+/* Public variables */
+
+    var $page_contents = 'account_history.php';
+
+/* Private variables */
+
+    var $_module = 'orders';
+
+/* Class constructor */
+
+    function osC_Account_Orders() {
+      global $osC_Services, $breadcrumb;
+
+      if ($osC_Services-&gt;isStarted('breadcrumb')) {
+        $breadcrumb-&gt;add(NAVBAR_TITLE_MY_ORDERS, tep_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
+
+        if (is_numeric($_GET[$this-&gt;_module])) {
+          $breadcrumb-&gt;add(sprintf(NAVBAR_TITLE_ORDER_INFORMATION, $_GET[$this-&gt;_module]), tep_href_link(FILENAME_ACCOUNT, $this-&gt;_module . '=' . $_GET[$this-&gt;_module], 'SSL'));
+        }
+      }
+
+      if (is_numeric($_GET[$this-&gt;_module])) {
+        $this-&gt;page_contents = 'account_history_info.php';
+      }
+
+      if (tep_not_null($_GET[$this-&gt;_module])) {
+        $this-&gt;_process();
+      }
+    }
+
+/* Public methods */
+
+    function getPageContentsFile() {
+      return $this-&gt;page_contents;
+    }
+
+/* Private methods */
+
+    function _process() {
+      global $osC_Database, $osC_Customer;
+
+      if (is_numeric($_GET[$this-&gt;_module]) === false) {
+        tep_redirect(tep_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
+      }
+
+      $Qcheck = $osC_Database-&gt;query('select customers_id from :table_orders where orders_id = :orders_id');
+      $Qcheck-&gt;bindTable(':table_orders', TABLE_ORDERS);
+      $Qcheck-&gt;bindInt(':orders_id', $_GET[$this-&gt;_module]);
+      $Qcheck-&gt;execute();
+
+      if ($Qcheck-&gt;valueInt('customers_id') != $osC_Customer-&gt;id) {
+        tep_redirect(tep_href_link(FILENAME_ACCOUNT, $this-&gt;_module, 'SSL'));
+      }
+    }
+  }
+?&gt;
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -&gt; 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