if (!defined('WEBPATH')) include $_SERVER['DOCUMENT_ROOT'].'/system/default.php'; $path = isset($_GET['path']) ? $_GET['path'] : ""; $car_make = Tools_Http::Get('car_make',true); if(isset($_GET['search'])) $search_string=$_GET['search']; $search = Tools_Http::Get('search'); $path = explode('/',$path); $tmp=array();$catid=0; $cat_item=array(); $product_item=array(); $itemid = 0; $page=0; $products = new Reviews(); $categories = new Reviews_Categories(); if (!empty($path)) { foreach ($path as $item) { if ($item) { $tmp[] = $item; } } } $path = $tmp; $last_item = array_pop($path); if (is_numeric($last_item)) { $page = intval($last_item); $last_item = array_pop($path); } //Is it category ? $cat_item = $categories -> getItem($last_item, 'sef'); if (!empty($cat_item)) { $catid = $cat_item['id']; } else { $tmp = explode('-', $last_item, 2); $pid = isset($tmp[0]) ? intval($tmp[0]) : 0; if ($pid) { $product_item = $products -> getItem($pid); } if (!empty($product_item)) { $itemid = $product_item['id']; } $last_item = array_pop($path); $cat_item = $categories -> getItem($last_item, 'sef'); if (!empty($cat_item)) { $catid = $cat_item['id']; } } $Template = new Common_Template('Default'); $Template->title= $L->StrT('reviews_categories','title', $cat_item['id'], $cat_item['title']); if(isset($search_string)) $Template->title= $search_string; $Template->OutputHtml(); $Template->OutputHead(); define ('catid', $catid); define ('product_id', $itemid); //define ('page', $page); ?>
include PLUGINPATH . 'leftReviewsMenu.php'; echo $m_return; include PLUGINPATH . 'newProducts.php'; echo $m_return; include PLUGINPATH . 'saleProducts.php'; echo $m_return; include PLUGINPATH . 'resent_searches.php'; echo $m_return; ?> | include PLUGINPATH . 'reviewsCategoriesPath.php'; if(isset($_COOKIE['curr_id'])) $currency_id= $_COOKIE['curr_id']; else $currency_id=0; ?> /* */?> if (product_id) { //include PLUGINPATH . 'videoOpen.php'; echo $m_return; } else { if (!catid) { //list categories include PLUGINPATH . 'reviewsCategories.php'; echo $m_return; } else { // include PLUGINPATH . 'productCategoriesPath.php'; include PLUGINPATH . 'reviewsListing.php'; echo $m_return; } } ?> | include PLUGINPATH . 'newProducts.php'; echo $m_return; //include PLUGINPATH . 'rightColumn.php'; echo $m_return; ?> |