  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: account_history_info.php,v 1.100 2003/06/09 23:03:52 hpdl Exp $ |
| |
| 3 | + | $Id: account_history_info.php 1739 2007-12-20 00:52:16Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
7 | 7 | | |
  |
8 | | - | Copyright (c) 2003 osCommerce |
| |
| 8 | + | Copyright (c) 2007 osCommerce |
|
9 | 9 | | |
| |
10 | 10 | | Released under the GNU General Public License |
| |
11 | 11 | | */ |
| |
|
|
 |
… |
|
21 | 21 | | tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL')); |
| |
22 | 22 | | } |
| |
23 | 23 | | |
  |
24 | | - | $customer_info_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'"); |
| |
| 24 | + | $customer_info_query = tep_db_query("select o.customers_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_STATUS . " s where o.orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.public_flag = '1'"); |
|
25 | 25 | | $customer_info = tep_db_fetch_array($customer_info_query); |
| |
26 | 26 | | if ($customer_info['customers_id'] != $customer_id) { |
| |
27 | 27 | | tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL')); |
| |
|
|
 |
… |
|
210 | 210 | | <tr class="infoBoxContents"> |
| |
211 | 211 | | <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> |
| |
212 | 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"); |
| |
| 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 . "' and os.public_flag = '1' order by osh.date_added"); |
  |
214 | 214 | | while ($statuses = tep_db_fetch_array($statuses_query)) { |
| |
215 | 215 | | echo ' <tr>' . "\n" . |
| |
216 | 216 | | ' <td class="main" valign="top" width="70">' . tep_date_short($statuses['date_added']) . '</td>' . "\n" . |