$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; }
function shopstat_getSEO($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $mode = 'user') { global $languages_id; $link = ""; $maname = ""; if ($mode == 'admin') { require_once DIR_FS_INC . 'xtc_parse_category_path.inc.php'; require_once DIR_FS_INC . 'xtc_get_product_path.inc.php'; require_once DIR_FS_INC . 'xtc_get_parent_categories.inc.php'; require_once DIR_FS_INC . 'xtc_check_agent.inc.php'; } else { require_once DIR_FS_INC . 'xtc_get_products_name.inc.php'; require_once DIR_FS_INC . 'xtc_get_manufacturers.inc.php'; } //-- XTC !isset($languages_id) ? $languages_id = (int) $_SESSION['languages_id'] : false; //BOF - web28 - 2010-08-18 -- Die Parameter aufspalten $pararray = array(); foreach (explode("&", $parameters) as $pair) { $values = explode("=", $pair); if (!empty($values[0])) { $pararray[$values[0]] = $values[1]; } } $cPath = isset($pararray['cPath']) ? $pararray['cPath'] : false; $prodid = isset($pararray['products_id']) ? $pararray['products_id'] : false; $content = isset($pararray['content']) ? $pararray['content'] : false; $coid = isset($pararray['coID']) ? $pararray['coID'] : false; $maid = isset($pararray['manufacturers_id']) ? $pararray['manufacturers_id'] : false; $pager = isset($pararray['page']) ? $pararray['page'] : false; $lang = isset($pararray['language']) ? $pararray['language'] : ''; $sort = isset($pararray['sort']) ? $pararray['sort'] : ''; $filter_id = isset($pararray['filter_id']) ? $pararray['filter_id'] : ''; $viewmode = isset($pararray['viewmode']) ? $pararray['viewmode'] : ''; $view_mode = isset($pararray['viewmode']) ? $pararray['view_mode'] : ''; $prllset = isset($pararray['prllset']) ? $pararray['prllset'] : ''; $action = isset($pararray['action']) ? $pararray['action'] : ''; //EOF - web28 - 2010-08-18 -- Die Parameter aufspalten $go = true; //-- Nur bei der index.php und product_info.php if ($page != "index.php" && $page != "product_info.php" && $page != "shop_content.php") { $go = false; } elseif (strlen($sort) > 0) { //-- Unter diesen Bedingungen werden die URLs nicht umgewandelt //-- Sortieren $go = false; } elseif (strlen($filter_id) > 0) { //-- Sortieren der Herstellerprodukte $go = false; } elseif (strlen($view_mode) > 0) { $go = false; } elseif (strlen($viewmode) > 0) { $go = false; } elseif (strlen($prllset) > 0) { $go = false; } elseif (strlen($action) > 0) { //-- Andere Aktion $go = false; } //BOF web28 - 2010-08-18 -- Falls eine Sprache übergeben wurde, wird diese als 'Linksprache' definiert if (strlen($lang) > 0) { $seolng = new language(); $lang_id = $seolng->catalog_languages[$lang]['id']; } else { $lang_id = $languages_id; } //EOF- web28 - 2010-08-18 -- Falls eine Sprache übergeben wurde, wird diese als 'Linksprache' definiert if ($go && (xtc_not_null($maid) || xtc_not_null($cPath) || xtc_not_null($prodid) || xtc_not_null($coid))) { if ($connection == 'SSL') { if (ENABLE_SSL == true) { $link = HTTPS_SERVER . DIR_WS_CATALOG; } else { $link = HTTP_SERVER . DIR_WS_CATALOG; } } else { $link = HTTP_SERVER . DIR_WS_CATALOG; } if (xtc_not_null($cPath) || xtc_not_null($prodid)) { $cPath_array = xtc_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[sizeof($cPath_array) - 1]; if (!$current_category_id && $prodid) { $current_category_id = xtc_get_product_path($prodid); } // ------------------------------------------------- if (!$prodid) { $category['categories_name'] = shopstat_getRealPath($cPath, '/', $lang_id); $link .= shopstat_hrefCatlink($category['categories_name'], $cPath, $pager); } else { $category['categories_name'] = ''; if (ADD_CAT_NAMES_TO_PRODUCT_LINK) { $category['categories_name'] = shopstat_getRealPath(xtc_get_product_path($prodid), '/', $lang_id); } $link .= shopstat_hrefLink($category['categories_name'], xtc_get_products_name($prodid, $lang_id), $prodid); } } elseif (xtc_not_null($coid)) { $content = shopstat_getContentName($coid, $lang_id); $link .= shopstat_hrefContlink($content, $coid); } elseif (xtc_not_null($maid)) { $manufacturers = xtc_get_manufacturers(); foreach ($manufacturers as $manufacturer) { if ($manufacturer['id'] == $maid) { $maname = $manufacturer['text']; break; } } $link .= shopstat_hrefManulink($maname, $maid, $pager); } $separator = '?'; //-- Concat the lang-var //-- Check parameters and given language, just concat //-- if the language is different //web28 - 2010-08-18 -- Parameter für die Sprachumschaltung if (strlen($lang) > 0 && $lang_id != $languages_id) { $link .= $separator . 'language=' . $lang; } } return $link; }