$_GET["vin"] = htmlentities($_GET["vin"]);
$scriptStartTime = microtime();
ob_start();
session_start();
header("Content-Type: text/html; charset=utf-8");
error_reporting(~E_ALL);
//Значение параметра partInfo по умолчанию
//partInfo default value
$partInfoValue = 1;
if (file_exists('underConstruction.php')) {include('underConstruction.php');}
if ($IlcatsInjections=file_exists('IlcatsInjections.php')) {$IlcatsInjection='Index1'; include('IlcatsInjections.php');}
if (file_exists('IlcatsInjections2.php')) include_once('IlcatsInjections2.php');
//print_r(dirname(__FILE__));
include_once(dirname(__FILE__).'/../content/originalnye-katalogi/settings.php');
include_once(dirname(__FILE__).'/../content/originalnye-katalogi/API.v2/PHP/Functions.Common.php');
include_once(dirname(__FILE__).'/../content/originalnye-katalogi/API.v2/PHP/Functions.Blocks.php');
if ($IlcatsInjections=file_exists('IlcatsInjections.php')) {$IlcatsInjection='Index1.2'; include('IlcatsInjections.php');}
if (!$_GET['function']) {$_GET['function']='defaultFunction';}
if (!$_GET['language']) $_GET['language']=$_COOKIE['language'] ? $_COOKIE['language'] : "ru";
$vinTmp = (empty($_GET["vin"]) ? array() : array("vin" => $_GET["vin"]));
if ($_GET['brand']) $data=getApiData($_GET);
else $data=getApiData(array_merge(array("function"=>"catalogsList","brand"=>'cataloglist',"apiVersion"=>'2.0',"shopClientId"=>$_GET["clid"], "catalogId"=>$_GET["pid"],"shopid"=>$_GET["shopid"],"language"=>$_GET["language"]),$vinTmp));
if ($_GET["debughash"]) ShowApiAnswer($data, $_GET["debughash"]);
if ($_GET['Ajax']==1){
$_GET['filterData']=base64_decode($_GET['filterData']);
$Answer['filterData']=$_GET['filterData'];
$Answer['PageSelector']=$data['data'][1]['format']($data['data'][1]);
$Answer['Tiles']=$data['data'][2]['format']($data['data'][2]);
//print_r($Answer);
exit(json_encode($Answer));
}
if ($IlcatsInjections=file_exists('IlcatsInjections.php')) {$IlcatsInjection='Index1.5'; include('IlcatsInjections.php');}
$SiteLabels=$data['siteLabels'];
if ($data['mainMenu']) $Page['MainMenu']=MainMenu($data['mainMenu']);
if ($data['availableLanguages']) $Page['Languages']=Languages($data['availableLanguages'],$apiActiveLanguages); //else $Page['Languages']="No 'availableLanguages'";
if ($data['data'])
foreach ($data["data"] as $Data)
$Page['Content'][]=($Data['caption'] ? "
" : "").$Data['format']($Data, $SiteLabels);
else {
if ($data["errors"])
$Page['Content'][]="
";
if ($IlcatsInjections) {$IlcatsInjection='Index2'; include('IlcatsInjections.php');}
?>
if ($IlcatsInjections) {$IlcatsInjection='Counters'; include('IlcatsInjections.php');} ?>
Body'>
if ($IlcatsInjections) {$IlcatsInjection='Advert1'; include('IlcatsInjections.php');} ?>
echo $data["stageName"]; ?>
if ($data['data'][0]['format']=='ifImage'){
$TempPageContent[0]=$Page['Content'][0];
array_shift($Page['Content']);
$TempPageContent[1]="
".ImplodeIfArray($Page['Content'])."
";
$Page['Content']="
".ImplodeIfArray($TempPageContent)."
";
}
echo ImplodeIfArray($Page['Content']);
if ($IlcatsInjections) {$IlcatsInjection='Advert2'; include('IlcatsInjections.php');} ?>