if (isset($_GET['cat'])) { $site = explode('_', $_GET['cat']); $cID = $site[0]; $cID = str_replace('c', '', $cID); $_GET['cPath'] = xtc_get_category_path($cID); } // manufacturer URLS if (isset($_GET['manu'])) { $site = explode('_', $_GET['manu']); $mID = $site[0]; $mID = (int) str_replace('m', '', $mID); $_GET['manufacturers_id'] = $mID; } // calculate category path if (isset($_GET['cPath'])) { $cPath = $_GET['cPath'] = xtc_input_validation($_GET['cPath'], 'cPath', ''); } elseif (is_object($product) && !isset($_GET['manufacturers_id'])) { if ($product->isProduct()) { $cPath = xtc_get_product_path($actual_products_id); } else { $cPath = ''; } } else { $cPath = ''; } if (xtc_not_null($cPath)) { $cPath_array = xtc_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[sizeof($cPath_array) - 1]; } else { $current_category_id = 0;
<?php /* ----------------------------------------------------------------------------------------- $Id: set_language_sessions.php 3859 2012-11-08 10:18:16Z web28 $ Modified - community made shopping http://www.modified-shop.org Copyright (c) 2009 - 2012 Modified ----------------------------------------------------------------------------------------- Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ if (!isset($_SESSION['language']) || isset($_GET['language']) || isset($_SESSION['language']) && !isset($_SESSION['language_charset'])) { include DIR_WS_CLASSES . 'language.php'; if (isset($_GET['language'])) { $_GET['language'] = xtc_input_validation($_GET['language'], 'char', ''); $lng = new language($_GET['language']); } elseif (isset($_SESSION['language'])) { $lng = new language(xtc_input_validation($_SESSION['language'], 'char', '')); } else { $lng = new language(xtc_input_validation(DEFAULT_LANGUAGE, 'char', '')); $lng->get_browser_language(); } $_SESSION['language'] = $lng->language['directory']; $_SESSION['languages_id'] = $lng->language['id']; $_SESSION['language_charset'] = $lng->language['language_charset']; $_SESSION['language_code'] = $lng->language['code']; }
* xt:Commerce ist eine geschŸtzte Handelsmarke und wird vertreten durch die xt:Commerce GmbH (Austria) * xt:Commerce is a protected trademark and represented by the xt:Commerce GmbH (Austria) * * @copyright Copyright 2003-2007 xt:Commerce (Winger/Zanier), www.xt-commerce.com * @license http://www.xt-commerce.com.com/license/2_0.txt GNU Public License V2.0 * * For questions, help, comments, discussion, etc., please join the * xt:Commerce Support Forums at www.xt-commerce.com * * ab 15.08.2008 Teile vom Hamburger-Internetdienst geändert * Hamburger-Internetdienst Support Forums at www.forum.hamburger-internetdienst.de * Stand 29.04.2009 */ include '../../includes/application_top_callback.php'; include DIR_WS_CLASSES . 'language.php'; $lng = new language(xtc_input_validation($_GET['language'], 'char', '')); if (!isset($_GET['language'])) { $lng->get_browser_language(); } include DIR_WS_LANGUAGES . $lng->language['directory'] . '/' . $lng->language['directory'] . '.php'; // nur zum Testen Dateien in ein Verzeichnis root/paypaltest //foreach ($_POST as $key => $value) { // $text.= "Schlüssel: $key; Wert: $value\n"; //} //$file='paypal_'.date('d.m.Y-H.i.s').'.txt'; //$fp = fopen('../../paypaltest/' . $file, "a"); //fwrite($fp, $text); //fclose($fp); // testen ende require_once '../../includes/classes/paypal_checkout.php'; $o_paypal = new paypal_checkout();
// customer wants to update the product quantity in their shopping cart // customer wants to update the product quantity in their shopping cart case 'update_product': // BOF VERSANDKOSTEN IM WARENKORB if (isset($_POST['country'])) { $_SESSION['country'] = xtc_remove_non_numeric($_POST['country']); unset($_SESSION['sendto']); } // EOF VERSANDKOSTEN IM WARENKORB if (isset($econda) && is_object($econda)) { $econda->_emptyCart(); } for ($i = 0, $n = sizeof($_POST['products_id']); $i < $n; $i++) { $cart_quantity = $_POST['cart_quantity'][$i] = xtc_remove_non_numeric($_POST['cart_quantity'][$i]); $_POST['old_qty'][$i] = xtc_remove_non_numeric($_POST['old_qty'][$i]); $_POST['products_id'][$i] = xtc_input_validation($_POST['products_id'][$i], 'products_id', ''); if ($cart_quantity == 0) { $_SESSION['cart']->remove($_POST['products_id'][$i]); } if (in_array($_POST['products_id'][$i], isset($_POST['cart_delete']) && is_array($_POST['cart_delete']) ? $_POST['cart_delete'] : array())) { $_SESSION['cart']->remove($_POST['products_id'][$i]); if (isset($econda) && is_object($econda)) { $econda->_delArticle($_POST['products_id'][$i], $_POST['cart_quantity'][$i], $_POST['old_qty'][$i]); } } else { if ($cart_quantity > MAX_PRODUCTS_QTY) { $cart_quantity = MAX_PRODUCTS_QTY; } $attributes = isset($_POST['id'][$_POST['products_id'][$i]]) ? $_POST['id'][$_POST['products_id'][$i]] : ''; if (isset($econda) && is_object($econda)) { $old_quantity = $_SESSION['cart']->get_quantity(xtc_get_uprid($_POST['products_id'][$i], $_POST['id'][$i]));
header("HTTP/1.0 301 Moved Permanently"); header("Location: {$location}"); } } if (!(preg_match('/^[a-z0-9]{26}$/i', session_id()) || preg_match('/^[a-z0-9]{32}$/i', session_id()))) { session_regenerate_id(true); // Thanks to HHGAG ;-) } // set the language include DIR_WS_MODULES . 'set_language_sessions.php'; // language translations require DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . $_SESSION['language'] . '.php'; // currency if (!isset($_SESSION['currency']) || isset($_GET['currency']) || USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && LANGUAGE_CURRENCY != $_SESSION['currency']) { if (isset($_GET['currency'])) { $_GET['currency'] = xtc_input_validation($_GET['currency'], 'char', ''); if (!($_SESSION['currency'] = xtc_currency_exists($_GET['currency']))) { $_SESSION['currency'] = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY; } } else { $_SESSION['currency'] = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY; } } if (isset($_SESSION['currency']) && $_SESSION['currency'] == '') { $_SESSION['currency'] = DEFAULT_CURRENCY; } // write customers status in session require DIR_WS_INCLUDES . 'write_customers_status.php'; //BOC web28 2011-11-30 - Versandkosten im Warenkorb if (strpos($PHP_SELF, FILENAME_SHOPPING_CART) === false) { unset($_SESSION['country']);