[go: up one dir, main page]

Menu

[r19]: / returns_track.php  Maximize  Restore  History

Download this file

72 lines (49 with data), 2.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/*
Id: account.php,v 1.1.1.1 2004/03/04 23:37:52 ccwjr Exp
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
Copyright &copy; 2009-2010 zonealta / oscload europe e-commerce solution
Project manager oscload : Vincent NICOLAS (vinicolas)
http://www.oscteam.fr
http://www.zonealta.fr
*/
require('includes/application_top.php');
if (!tep_session_is_registered('customer_id')) {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}
if (!$HTTP_GET_VARS['action']){
$HTTP_GET_VARS['action'] = 'returns_track';
}
if ($HTTP_GET_VARS['action']) {
switch ($HTTP_GET_VARS['action']) {
case 'returns_show':
// first carry out a query on the database to see if there are any matching tickets
$database_returns_query = tep_db_query("SELECT returns_id, returns_status FROM " . TABLE_RETURNS . " where customers_id = '" . $customer_id . "' and rma_value = '" . $HTTP_POST_VARS['rma'] . "' or rma_value = '" . $HTTP_GET_VARS['rma'] . "'");
if (!tep_db_num_rows($database_returns_query)) {
tep_redirect(tep_href_link('returns_track.php?error=yes'));
} else {
$returns_query = tep_db_fetch_array($database_returns_query);
$returns_id = $returns_query['returns_id'];
$returns_status_id = $returns_query['returns_status'];
$returns_status_query = tep_db_query("SELECT returns_status_name FROM " . TABLE_RETURNS_STATUS . " where returns_status_id = " . $returns_status_id . " and language_id = '" . (int)$languages_id . "'");
$returns_status_array = tep_db_fetch_array($returns_status_query);
$returns_status = $returns_status_array['returns_status_name'];
$returned_products_query = tep_db_query("SELECT * FROM " . TABLE_RETURNS_PRODUCTS_DATA . " op, " . TABLE_RETURNS . " o where o.returns_id = op.returns_id and op.returns_id = '" . $returns_id . "'");
$returned_products = tep_db_fetch_array($returned_products_query);
require(DIR_WS_CLASSES . 'order.php');
$order = new order($returned_products['order_id']);
}
break;
}
}
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RETURNS_TRACK);
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_RETURNS_TRACK, '', 'NONSSL'));
$content = CONTENT_RETURN_TRACK;
$javascript = $content . '.js';
require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE);
require(DIR_WS_INCLUDES . 'application_bottom.php');
?>