'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'е' => 'e', 'ё' => 'e', 'ж' => 'zh', 'з' => 'z', 'и' => 'i', 'й' => 'y', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o', 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c', 'ч' => 'ch', 'ш' => 'sh', 'щ' => 'sch', 'ь' => '', 'ы' => 'y', 'ъ' => '', 'э' => 'e', 'ю' => 'yu', 'я' => 'ya', 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Е' => 'E', 'Ё' => 'E', 'Ж' => 'Zh', 'З' => 'Z', 'И' => 'I', 'Й' => 'Y', 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O', 'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C', 'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Sch', 'Ь' => '', 'Ы' => 'Y', 'Ъ' => '', 'Э' => 'E', 'Ю' => 'Yu', 'Я' => 'Ya', ' ' => '-' ); return strtr($string, $converter); } $cod = preg_replace("/[^0-9]/", '', $_GET['cod']); include("db.php"); $exchange = 1; if($exRatesBy){ $exchange = $exRatesBy; } $dsn = "mysql:host=$hostname;dbname=mhjsufhs_ersag;charset=utf8"; $opt = array( PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC ); $pdo = new PDO($dsn, "mhjsufhs_ersag", $password, $opt); $rat= $level_rat[$level_typ]; $rate = $level_rat[$level_typ]; /* $stmt = $pdo->prepare("SELECT * FROM exchange ORDER by dat DESC LIMIT 1"); $stmt->execute(); $result = $stmt->fetchAll(); $rat = $result[0]['rat']; if(!isset($result[0]['dat']) || $result[0]['dat']!=date('Ymd')){ $arrContextOptions=array( "http" => array( "method" => "GET", "header" => "Content-Type: application/xml; charset=utf-8;\r\n". "Connection: close\r\n", "ignore_errors" => true, "timeout" => (float)30.0, "content" => $strRequestXML, ), "ssl"=>array( "allow_self_signed"=>true, "verify_peer"=>false, "verify_peer_name"=>false, ), ); $json = file_get_contents('https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?valcode=TRY&json', false, stream_context_create($arrContextOptions)); $obj = json_decode($json); $rate = $obj[0]->rate; $rat = $rate; if(isset($rate)) { $stmt = $pdo->prepare("INSERT INTO exchange VALUES ('".date('Ymd')."','$rate')"); $stmt->execute(); } } */ $stmt = $pdo->prepare("SELECT * FROM site$site WHERE cod=? LIMIT 1"); $stmt->execute(array($cod)); $result = $stmt->fetchAll(); $info = $result[0]; $brend_nom = json_decode($info['section2'])[0]; $stmt = $pdo->prepare("SELECT * FROM site".$site."_subsections WHERE nom=? AND sec=? LIMIT 1"); $stmt->execute(array($brend_nom,2)); $result = $stmt->fetchAll(); $category = $result[0]['ru']; $category_nom = $result[0]['nom']; if($lang==1){ $category = $result[0]['ru_ru']; } $photos_list = explode(",", $info['photos']); $photo_html = ""; foreach ($photos_list as $photo_nom){ $photo_html.="
"; } $photo_big = "
"; $schem = "https://schema.org/OutOfStock"; $notbuy = false; if($info[$price_typ]>0){ $availability = "
В наличии
"; $schem = "https://schema.org/InStock"; } else { $availability = "
Нет в наличии
"; $schem = "https://schema.org/OutOfStock"; $notbuy = true; } $sites = array("","Миючі та очищаючі засоби", "Особиста гігієна", "Декоративна косметика", "БАДи та вітаміни", "Парфуми"); if($lang==1) $sites = array("","Моющие средства", "Личная гигиены", "Декоративная косметика", "БАДы и витамины", "Духи"); $links = array("","/cleaning.html", "/hygiene.html", "/cosmetics.html", "/vitamins.html", "/parfums.html"); $stmt = $pdo->prepare("SELECT * FROM site".$site."_desc WHERE nom=? LIMIT 1"); $stmt->execute(array($cod)); $result = $stmt->fetchAll(); $description = $result[0]['text']; if($lang==1 || $lang==2){ $info['nam']=$info['nam_ru']; $description = $result[0]['text_ru']; } $stmt = $pdo->prepare("SELECT nom,site,cod,uid,nam,bal,plus,minus,coment,answer,tim FROM review WHERE site=? AND cod=? AND stat!=0 ORDER by nom DESC LIMIT 0,10"); $stmt->execute(array($site, $cod)); $reviews_arr = $stmt->fetchAll(); if($info['rait']<100000){ $info['rait']*=1000000; } ?> <?echo $info['nam'];?> ERSAG " /> "_max.jpg">
" /> " />
'; echo ''; echo ''; echo '
'; echo ''; echo ''; echo ''; echo '
'; echo ''; echo '
'; } ?>

prepare("SELECT * FROM users WHERE uid=? LIMIT 1"); $stmt->execute(array($_COOKIE['uid'])); $result = $stmt->fetchAll(); if($_COOKIE['key']==$result[0]['pass'] && $result[0]['adm']>=1){ $auth = true; if($result[0]['adm']>0) $adm = $result[0]['adm']; }; } if(!$auth){ echo array("
Код товару : ".$info['cod']."
","
Код товара : ".$info['cod']."
","
Код товара : ".$info['cod']."
")[$lang]; } else { echo "
Код товара : ".$info['cod']."
"; } ?>
%'>

Получите со скидкой
от 20% до 47%
'; echo '
Цена по каталогу без скидки : '.(round($info[$price_typ]*100)/100).' '.$price_sign.'
'; echo "
Получить скидку
"; } else */if($geo==1){ echo '
Получите со скидкой
от 20% до 47%
'; echo '
Цена по каталогу ERSAG без скидки : '.(round($info[$price_typ]*100)/100).' '.$price_sign.'
'; echo "
Купить
"; } else { echo '
'.(round(($info[$price_typ])*100*$exchange)/100).' '.$price_sign.'
'; echo '
Цена после регистрации :
'; echo '
'.(round(($info[$price_typ])*0.8*100*$exchange)/100).' '.$price_sign.'
'; echo "
Купить
"; } ?>
$val){ if(substr($key, 0, 7)=="section"){ $nom = substr($key, 7); if($nom>$max) $max = $nom; } } for($i; $i<=$max; $i++){ if(isset($info['section'.$i])){ $arr = json_decode($info['section'.$i]); if(count($arr)>0){ $sections[$i] = array(); foreach ($arr as $val){ array_push($sections[$i], $val); array_push($subsections, $val); } } } } if(count($sections)>0){ $in = str_repeat('?,', count($sections) - 1) . '?'; $stmt = $pdo->prepare("SELECT * FROM site".$site."_sections WHERE nom IN ($in)"); $stmt->execute(array_keys($sections)); foreach ($result = $stmt->fetchAll() as $row){ $sections_name[$row['nom']] = $row['ru']; if($lang==1) $sections_name[$row['nom']] = $row['ru_ru']; }; $in = str_repeat('?,', count($subsections) - 1) . '?'; $stmt = $pdo->prepare("SELECT * FROM site".$site."_subsections WHERE nom IN ($in)"); $stmt->execute($subsections); foreach ($result = $stmt->fetchAll() as $row){ $subsections_name[$row['sec'].'_'.$row['nom']] = $row['ru']; if($lang==1) $subsections_name[$row['sec'].'_'.$row['nom']] = $row['ru_ru']; }; echo "
Характеристики
"; foreach ($sections as $sec => $subs){ echo "
".$sections_name[$sec]."
"; foreach ($subs as $val){ echo $subsections_name[$sec.'_'.$val]."
"; } echo "
"; } echo "
"; } ?>

:
:
:
"/>
"/>