),
'url' => rtrim((string) $url, '/') . '/' .
$brandKeyword . '/' . $modelKeyword . '/',
'image' => $imageFallbacks[0],
'images' => $imageFallbacks,
'price' => $displayPrice,
'type' => (string) ($candidate['type_name'] ?? ''),
'transmission' => (string) (
$candidate['transmission'] ??
$candidate['transmission_name'] ??
$candidate['gearbox'] ??
$candidate['kpp'] ??
''
),
'power' => $power,
];
if (count($japanPriceLandingPopularCars) >= 12) {
break;
}
}
}
# мета теги
(new Iastudio\Meta)->set();
# shortcode @hz
$shortcode_params = [];
if ($AUTH_USER_ID > 0 && checkUserGroup($AUTH_USER_ID, 1) ) {
if (isset($_GET['marka_name']) && $_GET['marka_name'] != '') {
$shortcode_params['vendor'] = $_GET['marka_name'];
}
if (isset($_GET['model_name']) && $_GET['model_name'] != '') {
$shortcode_params['model'] = $_GET['model_name'];
}
if (isset($_GET['year'][0]) && $_GET['year'][0] != '') {
$shortcode_params['Year_From'] = $_GET['year'][0];
}
if (isset($_GET['year'][0]) && $_GET['year'][0] != '') {
$shortcode_params['Year_From'] = $_GET['year'][0];
}
if (isset($_GET['year'][1]) && $_GET['year'][1] != '') {
$shortcode_params['Year_To'] = $_GET['year'][1];
}
if (isset($_GET['mileage'][0]) && $_GET['mileage'][0] != '') {
$shortcode_params['Mileage_From'] = $_GET['mileage'][0];
}
if (isset($_GET['mileage'][1]) && $_GET['mileage'][1] != '') {
$shortcode_params['Mileage_To'] = $_GET['mileage'][1];
}
if (isset($_GET['kuzov']) && is_array($_GET['kuzov'])) {
$shortcode_params['Kuzov'] = implode(",", $_GET['kuzov']);
}
if (isset($_GET['rate']) && is_array($_GET['rate'])) {
$shortcode_params['Rate'] = implode(",", $_GET['rate']);
}
if (isset($_GET['eng_v'][0]) && $_GET['eng_v'][0] != '') {
$shortcode_params['V_From'] = $_GET['eng_v'][0];
}
if (isset($_GET['eng_v'][1]) && $_GET['eng_v'][1] != '') {
$shortcode_params['V_To'] = $_GET['eng_v'][1];
}
if (isset($_GET['finish_rub'][0]) && $_GET['finish_rub'][0] != '') {
$shortcode_params['Finish_From'] = $_GET['finish_rub'][0];
}
if (isset($_GET['finish_rub'][1]) && $_GET['finish_rub'][1] != '') {
$shortcode_params['Finish_To'] = $_GET['finish_rub'][1];
}
}
$shortcode = getShortCode($entity);
} else {
### детальная
// текущий объект, $resMsg здесь не работает
$item = $nc_core->message->get_by_id($current_cc['Class_ID'], $message);
// Редирект со старых адресов
if ($isredir) {
$brand_keyword = $nc_core->db->get_var("SELECT keyword FROM `is_auto_brands` WHERE id = '" . $item['is_auto_brand_id'] . "'");
$model_keyword = $nc_core->db->get_var("SELECT keyword FROM `is_auto_models` WHERE id = '" . $item['is_auto_model_id'] . "' AND `is_auto_brand_id` = " . $item['is_auto_brand_id'] . " LIMIT 1");
if ($brand_keyword && $model_keyword) {
header('Location: /stat/'.$brand_keyword.'/'.$model_keyword.'/'.$item['Keyword'].'.html');
exit();
} else {
nc_send_page_404();
}
}
// brand
$brand = (array)$nc_core->db->get_results("SELECT * FROM `is_auto_brands` WHERE keyword = '" . $_GET['brand'] . "' LIMIT 1")[0];
// model
$model = (array)$nc_core->db->get_results("SELECT * FROM `is_auto_models` WHERE keyword = '" . $_GET['model'] . "' AND `is_auto_brand_id` = " . $brand['id'] . " AND count_jp > 0 LIMIT 1")[0];
// 404
if ($item['is_auto_brand_id'] !== $brand['id'] || $item['is_auto_model_id'] !== $model['id']) {
nc_send_page_404();
}
// санкции
//$is_sanction = $helper->isSanction(['is_hybrid' => $item['is_hybrid'], 'is_electric' => $item['is_electric'], 'volume' => $item['eng_v']]);
// похожие
$similar = $nc_core->db->get_results("SELECT *, b.name AS brand_name, m.name AS model_name, g.name AS grade_name, auc.name AS auction_name
FROM `Message" . $current_cc['Class_ID'] . "` as a
LEFT JOIN `is_auto_brands` b ON a.`is_auto_brand_id` = b.`id`
LEFT JOIN `is_auto_models` m ON a.`is_auto_model_id` = m.`id`
LEFT JOIN `is_auto_grades` g ON a.`is_auto_grade_id` = g.`id`
LEFT JOIN `aj_" . $entity . "_auctions` auc ON a.`aj_" . $entity . "_auction_id` = auc.`id`
WHERE a.is_auto_brand_id = '" . $brand['id'] . "
AND a.is_auto_model_id = " . $model['id'] . "'
AND a.year = " . $item['year'] . "
AND a.aj_jcar_status_id IN (1, 4)
AND a.Message_ID NOT LIKE " . $message . "
ORDER BY a.date DESC
LIMIT 8");
}
} catch (Throwable $e) {
debug($e);
}
// END AUTOLIFE JAPAN PRICE LANDINGS — FULL SYSTEM SETTINGS
Заявка принята
Ваша заявка принята.
Мы свяжемся с вами в самое ближайшее время.