コード例 #1
0
function xtc_category_link($cID, $cName = '')
{
    //-- SHOPSTAT --//
    /*
    		$cName = xtc_cleanName($cName);
    		$link = 'cat=c'.$cID.'_'.$cName.'.html';
    		return $link;
    */
    require_once DIR_FS_INC . 'xtc_get_category_path.inc.php';
    return 'cPath=' . xtc_get_category_path($cID);
    //-- SHOPSTAT --//
}
コード例 #2
0
    $actual_products_id = (int) str_replace('p', '', $pID);
    $product = new product($actual_products_id);
} elseif (isset($_GET['products_id'])) {
    // also check for old 3.0.3 URLS
    $actual_products_id = (int) $_GET['products_id'];
    $product = new product($actual_products_id);
}
if (!isset($product) || !is_object($product)) {
    $product = new product();
}
// category URLS
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 {