diff --git a/catalog/admin/action_recorder.php b/catalog/admin/action_recorder.php
index 767be0a66..cde45af65 100644
--- a/catalog/admin/action_recorder.php
+++ b/catalog/admin/action_recorder.php
@@ -52,18 +52,18 @@
'text' => (is_object(${$modules['module']}) ? ${$modules['module']}->title : $modules['module']));
}
- $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
+ $action = (isset($_GET['action']) ? $_GET['action'] : '');
if (tep_not_null($action)) {
switch ($action) {
case 'expire':
$expired_entries = 0;
- if (isset($HTTP_GET_VARS['module']) && in_array($HTTP_GET_VARS['module'], $modules_array)) {
- if (is_object(${$HTTP_GET_VARS['module']})) {
- $expired_entries += ${$HTTP_GET_VARS['module']}->expireEntries();
+ if (isset($_GET['module']) && in_array($_GET['module'], $modules_array)) {
+ if (is_object(${$_GET['module']})) {
+ $expired_entries += ${$_GET['module']}->expireEntries();
} else {
- $delete_query = tep_db_query("delete from " . TABLE_ACTION_RECORDER . " where module = '" . tep_db_input($HTTP_GET_VARS['module']) . "'");
+ $delete_query = tep_db_query("delete from " . TABLE_ACTION_RECORDER . " where module = '" . tep_db_input($_GET['module']) . "'");
$expired_entries += tep_db_affected_rows();
}
} else {
@@ -110,7 +110,7 @@
-
@@ -128,16 +128,16 @@
title;
}
- if ((!isset($HTTP_GET_VARS['aID']) || (isset($HTTP_GET_VARS['aID']) && ($HTTP_GET_VARS['aID'] == $actions['id']))) && !isset($aInfo)) {
+ if ((!isset($_GET['aID']) || (isset($_GET['aID']) && ($_GET['aID'] == $actions['id']))) && !isset($aInfo)) {
$actions_extra_query = tep_db_query("select identifier from " . TABLE_ACTION_RECORDER . " where id = '" . (int)$actions['id'] . "'");
$actions_extra = tep_db_fetch_array($actions_extra_query);
@@ -173,8 +173,8 @@
diff --git a/catalog/admin/administrators.php b/catalog/admin/administrators.php
index a399ddbd3..e7b1fba18 100644
--- a/catalog/admin/administrators.php
+++ b/catalog/admin/administrators.php
@@ -14,7 +14,7 @@
$htaccess_array = null;
$htpasswd_array = null;
- $is_iis = stripos($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'iis');
+ $is_iis = stripos($_SERVER['SERVER_SOFTWARE'], 'iis');
$authuserfile_array = array('##### OSCOMMERCE ADMIN PROTECTION - BEGIN #####',
'AuthType Basic',
@@ -44,15 +44,15 @@
}
}
- $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
+ $action = (isset($_GET['action']) ? $_GET['action'] : '');
if (tep_not_null($action)) {
switch ($action) {
case 'insert':
require('includes/functions/password_funcs.php');
- $username = tep_db_prepare_input($HTTP_POST_VARS['username']);
- $password = tep_db_prepare_input($HTTP_POST_VARS['password']);
+ $username = tep_db_prepare_input($_POST['username']);
+ $password = tep_db_prepare_input($_POST['password']);
$check_query = tep_db_query("select id from " . TABLE_ADMINISTRATORS . " where user_name = '" . tep_db_input($username) . "' limit 1");
@@ -68,7 +68,7 @@
}
}
- if (isset($HTTP_POST_VARS['htaccess']) && ($HTTP_POST_VARS['htaccess'] == 'true')) {
+ if (isset($_POST['htaccess']) && ($_POST['htaccess'] == 'true')) {
$htpasswd_array[] = $username . ':' . tep_crypt_apr_md5($password);
}
@@ -99,10 +99,10 @@
case 'save':
require('includes/functions/password_funcs.php');
- $username = tep_db_prepare_input($HTTP_POST_VARS['username']);
- $password = tep_db_prepare_input($HTTP_POST_VARS['password']);
+ $username = tep_db_prepare_input($_POST['username']);
+ $password = tep_db_prepare_input($_POST['password']);
- $check_query = tep_db_query("select id, user_name from " . TABLE_ADMINISTRATORS . " where id = '" . (int)$HTTP_GET_VARS['aID'] . "'");
+ $check_query = tep_db_query("select id, user_name from " . TABLE_ADMINISTRATORS . " where id = '" . (int)$_GET['aID'] . "'");
$check = tep_db_fetch_array($check_query);
// update username in current session if changed
@@ -121,7 +121,7 @@
}
}
- tep_db_query("update " . TABLE_ADMINISTRATORS . " set user_name = '" . tep_db_input($username) . "' where id = '" . (int)$HTTP_GET_VARS['aID'] . "'");
+ tep_db_query("update " . TABLE_ADMINISTRATORS . " set user_name = '" . tep_db_input($username) . "' where id = '" . (int)$_GET['aID'] . "'");
if (tep_not_null($password)) {
// update password in htpasswd
@@ -134,13 +134,13 @@
}
}
- if (isset($HTTP_POST_VARS['htaccess']) && ($HTTP_POST_VARS['htaccess'] == 'true')) {
+ if (isset($_POST['htaccess']) && ($_POST['htaccess'] == 'true')) {
$htpasswd_array[] = $username . ':' . tep_crypt_apr_md5($password);
}
}
- tep_db_query("update " . TABLE_ADMINISTRATORS . " set user_password = '" . tep_db_input(tep_encrypt_password($password)) . "' where id = '" . (int)$HTTP_GET_VARS['aID'] . "'");
- } elseif (!isset($HTTP_POST_VARS['htaccess']) || ($HTTP_POST_VARS['htaccess'] != 'true')) {
+ tep_db_query("update " . TABLE_ADMINISTRATORS . " set user_password = '" . tep_db_input(tep_encrypt_password($password)) . "' where id = '" . (int)$_GET['aID'] . "'");
+ } elseif (!isset($_POST['htaccess']) || ($_POST['htaccess'] != 'true')) {
if (is_array($htpasswd_array)) {
for ($i=0, $n=sizeof($htpasswd_array); $i<$n; $i++) {
list($ht_username, $ht_password) = explode(':', $htpasswd_array[$i], 2);
@@ -173,10 +173,10 @@
fclose($fp);
}
- tep_redirect(tep_href_link(FILENAME_ADMINISTRATORS, 'aID=' . (int)$HTTP_GET_VARS['aID']));
+ tep_redirect(tep_href_link(FILENAME_ADMINISTRATORS, 'aID=' . (int)$_GET['aID']));
break;
case 'deleteconfirm':
- $id = tep_db_prepare_input($HTTP_GET_VARS['aID']);
+ $id = tep_db_prepare_input($_GET['aID']);
$check_query = tep_db_query("select id, user_name from " . TABLE_ADMINISTRATORS . " where id = '" . (int)$id . "'");
$check = tep_db_fetch_array($check_query);
@@ -261,7 +261,7 @@
$info ) {
$schema .= ',' . "\n";
$columns = implode($info['columns'], ', ');
@@ -105,8 +105,7 @@
while ($rows = tep_db_fetch_array($rows_query)) {
$schema = 'insert into ' . $table . ' (' . implode(', ', $table_list) . ') values (';
- reset($table_list);
- while (list(,$i) = each($table_list)) {
+ foreach ( $table_list as $i ) {
if (!isset($rows[$i])) {
$schema .= 'NULL, ';
} elseif (tep_not_null($rows[$i])) {
@@ -127,8 +126,8 @@
fclose($fp);
- if (isset($HTTP_POST_VARS['download']) && ($HTTP_POST_VARS['download'] == 'yes')) {
- switch ($HTTP_POST_VARS['compress']) {
+ if (isset($_POST['download']) && ($_POST['download'] == 'yes')) {
+ switch ($_POST['compress']) {
case 'gzip':
exec(LOCAL_EXE_GZIP . ' ' . DIR_FS_BACKUP . $backup_file);
$backup_file .= '.gz';
@@ -146,7 +145,7 @@
exit;
} else {
- switch ($HTTP_POST_VARS['compress']) {
+ switch ($_POST['compress']) {
case 'gzip':
exec(LOCAL_EXE_GZIP . ' ' . DIR_FS_BACKUP . $backup_file);
break;
@@ -165,11 +164,11 @@
tep_set_time_limit(0);
if ($action == 'restorenow') {
- $read_from = $HTTP_GET_VARS['file'];
+ $read_from = $_GET['file'];
- if (file_exists(DIR_FS_BACKUP . $HTTP_GET_VARS['file'])) {
- $restore_file = DIR_FS_BACKUP . $HTTP_GET_VARS['file'];
- $extension = substr($HTTP_GET_VARS['file'], -3);
+ if (file_exists(DIR_FS_BACKUP . $_GET['file'])) {
+ $restore_file = DIR_FS_BACKUP . $_GET['file'];
+ $extension = substr($_GET['file'], -3);
if ( ($extension == 'sql') || ($extension == '.gz') || ($extension == 'zip') ) {
switch ($extension) {
@@ -264,7 +263,7 @@
tep_db_query($sql_array[$i]);
}
- tep_session_close();
+ session_write_close();
tep_db_query("delete from " . TABLE_WHOS_ONLINE);
tep_db_query("delete from " . TABLE_SESSIONS);
@@ -282,15 +281,15 @@
tep_redirect(tep_href_link(FILENAME_BACKUP));
break;
case 'download':
- $extension = substr($HTTP_GET_VARS['file'], -3);
+ $extension = substr($_GET['file'], -3);
if ( ($extension == 'zip') || ($extension == '.gz') || ($extension == 'sql') ) {
- if ($fp = fopen(DIR_FS_BACKUP . $HTTP_GET_VARS['file'], 'rb')) {
- $buffer = fread($fp, filesize(DIR_FS_BACKUP . $HTTP_GET_VARS['file']));
+ if ($fp = fopen(DIR_FS_BACKUP . $_GET['file'], 'rb')) {
+ $buffer = fread($fp, filesize(DIR_FS_BACKUP . $_GET['file']));
fclose($fp);
header('Content-type: application/x-octet-stream');
- header('Content-disposition: attachment; filename=' . $HTTP_GET_VARS['file']);
+ header('Content-disposition: attachment; filename=' . $_GET['file']);
echo $buffer;
@@ -301,9 +300,9 @@
}
break;
case 'deleteconfirm':
- if (strstr($HTTP_GET_VARS['file'], '..')) tep_redirect(tep_href_link(FILENAME_BACKUP));
+ if (strstr($_GET['file'], '..')) tep_redirect(tep_href_link(FILENAME_BACKUP));
- tep_remove(DIR_FS_BACKUP . '/' . $HTTP_GET_VARS['file']);
+ tep_remove(DIR_FS_BACKUP . '/' . $_GET['file']);
if (!$tep_remove_error) {
$messageStack->add_session(SUCCESS_BACKUP_DELETED, 'success');
@@ -364,7 +363,7 @@
$check = 0;
- if ((!isset($HTTP_GET_VARS['file']) || (isset($HTTP_GET_VARS['file']) && ($HTTP_GET_VARS['file'] == $entry))) && !isset($buInfo) && ($action != 'backup') && ($action != 'restorelocal')) {
+ if ((!isset($_GET['file']) || (isset($_GET['file']) && ($_GET['file'] == $entry))) && !isset($buInfo) && ($action != 'backup') && ($action != 'restorelocal')) {
$file_array['file'] = $entry;
$file_array['date'] = date(PHP_DATE_TIME_FORMAT, filemtime(DIR_FS_BACKUP . $entry));
$file_array['size'] = number_format(filesize(DIR_FS_BACKUP . $entry)) . ' bytes';
diff --git a/catalog/admin/banner_manager.php b/catalog/admin/banner_manager.php
index dcbfde030..941f0b572 100644
--- a/catalog/admin/banner_manager.php
+++ b/catalog/admin/banner_manager.php
@@ -12,37 +12,37 @@
require('includes/application_top.php');
- $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
+ $action = (isset($_GET['action']) ? $_GET['action'] : '');
$banner_extension = tep_banner_image_extension();
if (tep_not_null($action)) {
switch ($action) {
case 'setflag':
- if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
- tep_set_banner_status($HTTP_GET_VARS['bID'], $HTTP_GET_VARS['flag']);
+ if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
+ tep_set_banner_status($_GET['bID'], $_GET['flag']);
$messageStack->add_session(SUCCESS_BANNER_STATUS_UPDATED, 'success');
} else {
$messageStack->add_session(ERROR_UNKNOWN_STATUS_FLAG, 'error');
}
- tep_redirect(tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $HTTP_GET_VARS['bID']));
+ tep_redirect(tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $_GET['bID']));
break;
case 'insert':
case 'update':
- if (isset($HTTP_POST_VARS['banners_id'])) $banners_id = tep_db_prepare_input($HTTP_POST_VARS['banners_id']);
- $banners_title = tep_db_prepare_input($HTTP_POST_VARS['banners_title']);
- $banners_url = tep_db_prepare_input($HTTP_POST_VARS['banners_url']);
- $new_banners_group = tep_db_prepare_input($HTTP_POST_VARS['new_banners_group']);
- $banners_group = (empty($new_banners_group)) ? tep_db_prepare_input($HTTP_POST_VARS['banners_group']) : $new_banners_group;
- $banners_html_text = tep_db_prepare_input($HTTP_POST_VARS['banners_html_text']);
- $banners_image_local = tep_db_prepare_input($HTTP_POST_VARS['banners_image_local']);
- $banners_image_target = tep_db_prepare_input($HTTP_POST_VARS['banners_image_target']);
+ if (isset($_POST['banners_id'])) $banners_id = tep_db_prepare_input($_POST['banners_id']);
+ $banners_title = tep_db_prepare_input($_POST['banners_title']);
+ $banners_url = tep_db_prepare_input($_POST['banners_url']);
+ $new_banners_group = tep_db_prepare_input($_POST['new_banners_group']);
+ $banners_group = (empty($new_banners_group)) ? tep_db_prepare_input($_POST['banners_group']) : $new_banners_group;
+ $banners_html_text = tep_db_prepare_input($_POST['banners_html_text']);
+ $banners_image_local = tep_db_prepare_input($_POST['banners_image_local']);
+ $banners_image_target = tep_db_prepare_input($_POST['banners_image_target']);
$db_image_location = '';
- $expires_date = tep_db_prepare_input($HTTP_POST_VARS['expires_date']);
- $expires_impressions = tep_db_prepare_input($HTTP_POST_VARS['expires_impressions']);
- $date_scheduled = tep_db_prepare_input($HTTP_POST_VARS['date_scheduled']);
+ $expires_date = tep_db_prepare_input($_POST['expires_date']);
+ $expires_impressions = tep_db_prepare_input($_POST['expires_impressions']);
+ $date_scheduled = tep_db_prepare_input($_POST['date_scheduled']);
$banner_error = false;
if (empty($banners_title)) {
@@ -107,15 +107,15 @@
tep_db_query("update " . TABLE_BANNERS . " set status = '0', date_scheduled = '" . tep_db_input($date_scheduled) . "' where banners_id = '" . (int)$banners_id . "'");
}
- tep_redirect(tep_href_link(FILENAME_BANNER_MANAGER, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'bID=' . $banners_id));
+ tep_redirect(tep_href_link(FILENAME_BANNER_MANAGER, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'bID=' . $banners_id));
} else {
$action = 'new';
}
break;
case 'deleteconfirm':
- $banners_id = tep_db_prepare_input($HTTP_GET_VARS['bID']);
+ $banners_id = tep_db_prepare_input($_GET['bID']);
- if (isset($HTTP_POST_VARS['delete_image']) && ($HTTP_POST_VARS['delete_image'] == 'on')) {
+ if (isset($_POST['delete_image']) && ($_POST['delete_image'] == 'on')) {
$banner_query = tep_db_query("select banners_image from " . TABLE_BANNERS . " where banners_id = '" . (int)$banners_id . "'");
$banner = tep_db_fetch_array($banner_query);
@@ -161,7 +161,7 @@
$messageStack->add_session(SUCCESS_BANNER_REMOVED, 'success');
- tep_redirect(tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page']));
+ tep_redirect(tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page']));
break;
}
}
@@ -213,17 +213,17 @@ function popupImageWindow(url) {
$bInfo = new objectInfo($parameters);
- if (isset($HTTP_GET_VARS['bID'])) {
+ if (isset($_GET['bID'])) {
$form_action = 'update';
- $bID = tep_db_prepare_input($HTTP_GET_VARS['bID']);
+ $bID = tep_db_prepare_input($_GET['bID']);
$banner_query = tep_db_query("select banners_title, banners_url, banners_image, banners_group, banners_html_text, status, date_format(date_scheduled, '%Y/%m/%d') as date_scheduled, date_format(expires_date, '%Y/%m/%d') as expires_date, expires_impressions, date_status_change from " . TABLE_BANNERS . " where banners_id = '" . (int)$bID . "'");
$banner = tep_db_fetch_array($banner_query);
$bInfo->objectInfo($banner);
- } elseif (tep_not_null($HTTP_POST_VARS)) {
- $bInfo->objectInfo($HTTP_POST_VARS);
+ } elseif (tep_not_null($_POST)) {
+ $bInfo->objectInfo($_POST);
}
$groups_array = array();
@@ -235,7 +235,7 @@ function popupImageWindow(url) {
@@ -304,7 +304,7 @@ function popupImageWindow(url) {
' . TEXT_BANNERS_INSERT_NOTE . ' ' . TEXT_BANNERS_EXPIRCY_NOTE . ' ' . TEXT_BANNERS_SCHEDULE_NOTE; ?>
-
+
@@ -324,13 +324,13 @@ function popupImageWindow(url) {
banners_id)) {
- echo ' ' . "\n";
+ echo ' ' . "\n";
} else {
- echo ' ' . "\n";
+ echo ' ' . "\n";
}
?>
' . tep_image(DIR_WS_IMAGES . 'icon_popup.gif', 'View Banner') . ' ' . $banners['banners_title']; ?>
@@ -350,12 +350,12 @@ function popupImageWindow(url) {
' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', 'Set Inactive', 10, 10) . '';
+ echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', 'Active', 10, 10) . ' ' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', 'Set Inactive', 10, 10) . ' ';
} else {
- echo '' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', 'Set Active', 10, 10) . ' ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', 'Inactive', 10, 10);
+ echo '' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', 'Set Active', 10, 10) . ' ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', 'Inactive', 10, 10);
}
?>
- ' . tep_image(DIR_WS_ICONS . 'statistics.gif', ICON_STATISTICS) . ' '; if (isset($bInfo) && is_object($bInfo) && ($banners['banners_id'] == $bInfo->banners_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ' '; } ?>
+ ' . tep_image(DIR_WS_ICONS . 'statistics.gif', ICON_STATISTICS) . ' '; if (isset($bInfo) && is_object($bInfo) && ($banners['banners_id'] == $bInfo->banners_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ' '; } ?>
- display_count($banners_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_BANNERS); ?>
- display_links($banners_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?>
+ display_count($banners_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_BANNERS); ?>
+ display_links($banners_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?>
@@ -379,17 +379,17 @@ function popupImageWindow(url) {
case 'delete':
$heading[] = array('text' => '' . $bInfo->banners_title . ' ');
- $contents = array('form' => tep_draw_form('banners', FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $bInfo->banners_id . '&action=deleteconfirm'));
+ $contents = array('form' => tep_draw_form('banners', FILENAME_BANNER_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id . '&action=deleteconfirm'));
$contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
$contents[] = array('text' => '' . $bInfo->banners_title . ' ');
if ($bInfo->banners_image) $contents[] = array('text' => ' ' . tep_draw_checkbox_field('delete_image', 'on', true) . ' ' . TEXT_INFO_DELETE_IMAGE);
- $contents[] = array('align' => 'center', 'text' => ' ' . tep_draw_button(IMAGE_DELETE, 'trash', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $HTTP_GET_VARS['bID'])));
+ $contents[] = array('align' => 'center', 'text' => ' ' . tep_draw_button(IMAGE_DELETE, 'trash', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $_GET['bID'])));
break;
default:
if (is_object($bInfo)) {
$heading[] = array('text' => '' . $bInfo->banners_title . ' ');
- $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_EDIT, 'document', tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $bInfo->banners_id . '&action=new')) . tep_draw_button(IMAGE_DELETE, 'trash', tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $bInfo->banners_id . '&action=delete')) . tep_draw_button(IMAGE_DETAILS, 'info', tep_href_link(FILENAME_BANNER_STATISTICS, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $bInfo->banners_id)));
+ $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_EDIT, 'document', tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id . '&action=new')) . tep_draw_button(IMAGE_DELETE, 'trash', tep_href_link(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id . '&action=delete')) . tep_draw_button(IMAGE_DETAILS, 'info', tep_href_link(FILENAME_BANNER_STATISTICS, 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id)));
$contents[] = array('text' => ' ' . TEXT_BANNERS_DATE_ADDED . ' ' . tep_date_short($bInfo->date_added));
if ( (function_exists('imagecreate')) && ($dir_ok) && ($banner_extension) ) {
diff --git a/catalog/admin/banner_statistics.php b/catalog/admin/banner_statistics.php
index 8d5a62f4b..4931e70db 100644
--- a/catalog/admin/banner_statistics.php
+++ b/catalog/admin/banner_statistics.php
@@ -12,7 +12,7 @@
require('includes/application_top.php');
- $type = (isset($HTTP_GET_VARS['type']) ? $HTTP_GET_VARS['type'] : '');
+ $type = (isset($_GET['type']) ? $_GET['type'] : '');
$banner_extension = tep_banner_image_extension();
@@ -30,11 +30,11 @@
}
}
- $banner_query = tep_db_query("select banners_title from " . TABLE_BANNERS . " where banners_id = '" . (int)$HTTP_GET_VARS['bID'] . "'");
+ $banner_query = tep_db_query("select banners_title from " . TABLE_BANNERS . " where banners_id = '" . (int)$_GET['bID'] . "'");
$banner = tep_db_fetch_array($banner_query);
$years_array = array();
- $years_query = tep_db_query("select distinct year(banners_history_date) as banner_year from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . (int)$HTTP_GET_VARS['bID'] . "'");
+ $years_query = tep_db_query("select distinct year(banners_history_date) as banner_year from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . (int)$_GET['bID'] . "'");
while ($years = tep_db_fetch_array($years_query)) {
$years_array[] = array('id' => $years['banner_year'],
'text' => $years['banner_year']);
@@ -67,16 +67,16 @@
switch ($type) {
case 'yearly': break;
case 'monthly':
- echo TITLE_YEAR . ' ' . tep_draw_pull_down_menu('year', $years_array, (isset($HTTP_GET_VARS['year']) ? $HTTP_GET_VARS['year'] : date('Y')), 'onchange="this.form.submit();"') . ' ';
+ echo TITLE_YEAR . ' ' . tep_draw_pull_down_menu('year', $years_array, (isset($_GET['year']) ? $_GET['year'] : date('Y')), 'onchange="this.form.submit();"') . ' ';
break;
default:
case 'daily':
- echo TITLE_MONTH . ' ' . tep_draw_pull_down_menu('month', $months_array, (isset($HTTP_GET_VARS['month']) ? $HTTP_GET_VARS['month'] : date('n')), 'onchange="this.form.submit();"') . ' ' . TITLE_YEAR . ' ' . tep_draw_pull_down_menu('year', $years_array, (isset($HTTP_GET_VARS['year']) ? $HTTP_GET_VARS['year'] : date('Y')), 'onchange="this.form.submit();"') . ' ';
+ echo TITLE_MONTH . ' ' . tep_draw_pull_down_menu('month', $months_array, (isset($_GET['month']) ? $_GET['month'] : date('n')), 'onchange="this.form.submit();"') . ' ' . TITLE_YEAR . ' ' . tep_draw_pull_down_menu('year', $years_array, (isset($_GET['year']) ? $_GET['year'] : date('Y')), 'onchange="this.form.submit();"') . ' ';
break;
}
?>
-
+
@@ -86,7 +86,7 @@
-
+
diff --git a/catalog/admin/cache.php b/catalog/admin/cache.php
index 7dd4f3a0c..ff91848ba 100644
--- a/catalog/admin/cache.php
+++ b/catalog/admin/cache.php
@@ -12,11 +12,11 @@
require('includes/application_top.php');
- $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
+ $action = (isset($_GET['action']) ? $_GET['action'] : '');
if (tep_not_null($action)) {
if ($action == 'reset') {
- tep_reset_cache_block($HTTP_GET_VARS['block']);
+ tep_reset_cache_block($_GET['block']);
}
tep_redirect(tep_href_link(FILENAME_CACHE));
diff --git a/catalog/admin/categories.php b/catalog/admin/categories.php
index dfc9054d9..95de13021 100644
--- a/catalog/admin/categories.php
+++ b/catalog/admin/categories.php
@@ -17,16 +17,16 @@
require(DIR_WS_CLASSES . 'currencies.php');
$currencies = new currencies();
- $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
+ $action = (isset($_GET['action']) ? $_GET['action'] : '');
$OSCOM_Hooks->call('products', 'productPreAction');
if (tep_not_null($action)) {
switch ($action) {
case 'setflag':
- if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
- if (isset($HTTP_GET_VARS['pID'])) {
- tep_set_product_status($HTTP_GET_VARS['pID'], $HTTP_GET_VARS['flag']);
+ if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
+ if (isset($_GET['pID'])) {
+ tep_set_product_status($_GET['pID'], $_GET['flag']);
}
if (USE_CACHE == 'true') {
@@ -35,12 +35,12 @@
}
}
- tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $HTTP_GET_VARS['cPath'] . '&pID=' . $HTTP_GET_VARS['pID']));
+ tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] . '&pID=' . $_GET['pID']));
break;
case 'insert_category':
case 'update_category':
- if (isset($HTTP_POST_VARS['categories_id'])) $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']);
- $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']);
+ if (isset($_POST['categories_id'])) $categories_id = tep_db_prepare_input($_POST['categories_id']);
+ $sort_order = tep_db_prepare_input($_POST['sort_order']);
$sql_data_array = array('sort_order' => (int)$sort_order);
@@ -63,7 +63,7 @@
$languages = tep_get_languages();
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
- $categories_name_array = $HTTP_POST_VARS['categories_name'];
+ $categories_name_array = $_POST['categories_name'];
$language_id = $languages[$i]['id'];
@@ -96,8 +96,8 @@
tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id));
break;
case 'delete_category_confirm':
- if (isset($HTTP_POST_VARS['categories_id'])) {
- $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']);
+ if (isset($_POST['categories_id'])) {
+ $categories_id = tep_db_prepare_input($_POST['categories_id']);
$categories = tep_get_category_tree($categories_id, '', '0', '', true);
$products = array();
@@ -111,8 +111,7 @@
}
}
- reset($products);
- while (list($key, $value) = each($products)) {
+ foreach ( $products as $key => $value ) {
$category_ids = '';
for ($i=0, $n=sizeof($value['categories']); $i<$n; $i++) {
@@ -133,8 +132,7 @@
tep_remove_category($categories[$i]['id']);
}
- reset($products_delete);
- while (list($key) = each($products_delete)) {
+ foreach ( array_keys ($products_delete) as $key ) {
tep_remove_product($key);
}
}
@@ -147,9 +145,9 @@
tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath));
break;
case 'delete_product_confirm':
- if (isset($HTTP_POST_VARS['products_id']) && isset($HTTP_POST_VARS['product_categories']) && is_array($HTTP_POST_VARS['product_categories'])) {
- $product_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);
- $product_categories = $HTTP_POST_VARS['product_categories'];
+ if (isset($_POST['products_id']) && isset($_POST['product_categories']) && is_array($_POST['product_categories'])) {
+ $product_id = tep_db_prepare_input($_POST['products_id']);
+ $product_categories = $_POST['product_categories'];
for ($i=0, $n=sizeof($product_categories); $i<$n; $i++) {
tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "' and categories_id = '" . (int)$product_categories[$i] . "'");
@@ -173,9 +171,9 @@
tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath));
break;
case 'move_category_confirm':
- if (isset($HTTP_POST_VARS['categories_id']) && ($HTTP_POST_VARS['categories_id'] != $HTTP_POST_VARS['move_to_category_id'])) {
- $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']);
- $new_parent_id = tep_db_prepare_input($HTTP_POST_VARS['move_to_category_id']);
+ if (isset($_POST['categories_id']) && ($_POST['categories_id'] != $_POST['move_to_category_id'])) {
+ $categories_id = tep_db_prepare_input($_POST['categories_id']);
+ $new_parent_id = tep_db_prepare_input($_POST['move_to_category_id']);
$path = explode('_', tep_get_generated_category_path_ids($new_parent_id));
@@ -197,8 +195,8 @@
break;
case 'move_product_confirm':
- $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);
- $new_parent_id = tep_db_prepare_input($HTTP_POST_VARS['move_to_category_id']);
+ $products_id = tep_db_prepare_input($_POST['products_id']);
+ $new_parent_id = tep_db_prepare_input($_POST['move_to_category_id']);
$duplicate_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$new_parent_id . "'");
$duplicate_check = tep_db_fetch_array($duplicate_check_query);
@@ -215,19 +213,19 @@
break;
case 'insert_product':
case 'update_product':
- if (isset($HTTP_GET_VARS['pID'])) $products_id = tep_db_prepare_input($HTTP_GET_VARS['pID']);
- $products_date_available = tep_db_prepare_input($HTTP_POST_VARS['products_date_available']);
+ if (isset($_GET['pID'])) $products_id = tep_db_prepare_input($_GET['pID']);
+ $products_date_available = tep_db_prepare_input($_POST['products_date_available']);
$products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : 'null';
- $sql_data_array = array('products_quantity' => (int)tep_db_prepare_input($HTTP_POST_VARS['products_quantity']),
- 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']),
- 'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']),
+ $sql_data_array = array('products_quantity' => (int)tep_db_prepare_input($_POST['products_quantity']),
+ 'products_model' => tep_db_prepare_input($_POST['products_model']),
+ 'products_price' => tep_db_prepare_input($_POST['products_price']),
'products_date_available' => $products_date_available,
- 'products_weight' => (float)tep_db_prepare_input($HTTP_POST_VARS['products_weight']),
- 'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_status']),
- 'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']),
- 'manufacturers_id' => (int)tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id']));
+ 'products_weight' => (float)tep_db_prepare_input($_POST['products_weight']),
+ 'products_status' => tep_db_prepare_input($_POST['products_status']),
+ 'products_tax_class_id' => tep_db_prepare_input($_POST['products_tax_class_id']),
+ 'manufacturers_id' => (int)tep_db_prepare_input($_POST['manufacturers_id']));
$products_image = new upload('products_image');
$products_image->set_destination(DIR_FS_CATALOG_IMAGES);
@@ -256,9 +254,9 @@
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
$language_id = $languages[$i]['id'];
- $sql_data_array = array('products_name' => tep_db_prepare_input($HTTP_POST_VARS['products_name'][$language_id]),
- 'products_description' => tep_db_prepare_input($HTTP_POST_VARS['products_description'][$language_id]),
- 'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id]));
+ $sql_data_array = array('products_name' => tep_db_prepare_input($_POST['products_name'][$language_id]),
+ 'products_description' => tep_db_prepare_input($_POST['products_description'][$language_id]),
+ 'products_url' => tep_db_prepare_input($_POST['products_url'][$language_id]));
if ($action == 'insert_product') {
$insert_sql_data = array('products_id' => $products_id,
@@ -275,12 +273,12 @@
$pi_sort_order = 0;
$piArray = array(0);
- foreach ($HTTP_POST_FILES as $key => $value) {
+ foreach ($_FILES as $key => $value) {
// Update existing large product images
if (preg_match('/^products_image_large_([0-9]+)$/', $key, $matches)) {
$pi_sort_order++;
- $sql_data_array = array('htmlcontent' => tep_db_prepare_input($HTTP_POST_VARS['products_image_htmlcontent_' . $matches[1]]),
+ $sql_data_array = array('htmlcontent' => tep_db_prepare_input($_POST['products_image_htmlcontent_' . $matches[1]]),
'sort_order' => $pi_sort_order);
$t = new upload($key);
@@ -295,7 +293,7 @@
} elseif (preg_match('/^products_image_large_new_([0-9]+)$/', $key, $matches)) {
// Insert new large product images
$sql_data_array = array('products_id' => (int)$products_id,
- 'htmlcontent' => tep_db_prepare_input($HTTP_POST_VARS['products_image_htmlcontent_new_' . $matches[1]]));
+ 'htmlcontent' => tep_db_prepare_input($_POST['products_image_htmlcontent_new_' . $matches[1]]));
$t = new upload($key);
$t->set_destination(DIR_FS_CATALOG_IMAGES);
@@ -338,11 +336,11 @@
tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id));
break;
case 'copy_to_confirm':
- if (isset($HTTP_POST_VARS['products_id']) && isset($HTTP_POST_VARS['categories_id'])) {
- $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);
- $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']);
+ if (isset($_POST['products_id']) && isset($_POST['categories_id'])) {
+ $products_id = tep_db_prepare_input($_POST['products_id']);
+ $categories_id = tep_db_prepare_input($_POST['categories_id']);
- if ($HTTP_POST_VARS['copy_as'] == 'link') {
+ if ($_POST['copy_as'] == 'link') {
if ($categories_id != $current_category_id) {
$check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$categories_id . "'");
$check = tep_db_fetch_array($check_query);
@@ -352,7 +350,7 @@
} else {
$messageStack->add_session(ERROR_CANNOT_LINK_TO_SAME_CATEGORY, 'error');
}
- } elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') {
+ } elseif ($_POST['copy_as'] == 'duplicate') {
$product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
$product = tep_db_fetch_array($product_query);
@@ -419,8 +417,8 @@
$pInfo = new objectInfo($parameters);
- if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
- $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
+ if (isset($_GET['pID']) && empty($_POST)) {
+ $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$_GET['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product = tep_db_fetch_array($product_query);
$pInfo->objectInfo($product);
@@ -457,7 +455,7 @@
default: $in_status = true; $out_status = false;
}
- $form_action = (isset($HTTP_GET_VARS['pID'])) ? 'update_product' : 'insert_product';
+ $form_action = (isset($_GET['pID'])) ? 'update_product' : 'insert_product';
?>
-
+
-
+
' . SECTION_HEADING_GENERAL . ''; ?>
' . SECTION_HEADING_DATA . ''; ?>
' . SECTION_HEADING_IMAGES . ''; ?>
@@ -699,7 +697,7 @@ function showPiDelConfirm(piId) {
- products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . tep_draw_button(IMAGE_SAVE, 'disk', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : ''))); ?>
+ products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . tep_draw_button(IMAGE_SAVE, 'disk', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : ''))); ?>
';
- $global_button = tep_draw_button(BUTTON_GLOBAL, 'circle-triangle-n', tep_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $HTTP_GET_VARS['nID'] . '&action=confirm&global=true'), 'primary');
+ $global_button = tep_draw_button(BUTTON_GLOBAL, 'circle-triangle-n', tep_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm&global=true'), 'primary');
- $cancel_button = tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $HTTP_GET_VARS['nID']));
+ $cancel_button = tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']));
- $choose_audience_string .= '