<?php


sleep(1);
ob_start();
session_start();
require_once "../../../system/baglan.php";
require_once "../../../system/fonk.php";
require_once "../../../language/dil_" . $_SESSION["k_dil"] . ".php";
if ($_POST) {
    $id = $_POST["id"];
    $limit = $limitayar["kampanya_sayisi"];
    $ARACSorgu = $db->prepare("SELECT * FROM araclar WHERE durum = ? AND kampanya = ? AND dil = ? AND id > ? ORDER BY id ASC, yirmidokuz_doksandokuz DESC LIMIT " . $limit);
    $ARACSorgu->execute(["1", "1", $_SESSION["k_dil"], $id]);
    $ARACislem = $ARACSorgu->fetchALL(PDO::FETCH_ASSOC);
    if ($ARACSorgu->rowCount() != "0") {
        foreach ($ARACislem as $ARACSonuc) {
            echo "\t\t\t<div class=\"col-sm-6\">\r\n\t\t\t\t<div class=\"item\" id=\"";
            echo $ARACSonuc["id"];
            echo "\">\r\n\t\t\t\t\t<div class=\"item-inner\">\r\n\t\t\t\t\t\t<div class=\"image-box\"><img src=\"";
            echo TEMA;
            echo "/uploads/araclar/";
            echo $ARACSonuc["resim"];
            echo "\" class=\"center-image\" data-height=\"200\">\r\n\t\t\t\t\t\t\t<div class=\"campaign-price\">\r\n\t\t\t\t\t\t\t\t<div class=\"label-value\"><b>";
            echo para_birim();
            echo "</b> ";
            echo intval($ARACSonuc["yirmidokuz_doksandokuz"] * 30);
            echo "</div>\r\n\t\t\t\t\t\t\t\t<div class=\"label-text\">/ ";
            echo $dil["aylik"];
            echo "</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"car-option-list\">\r\n\t\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t\t<li><i class=\"fa fa-battery-three-quarters\"></i><span>";
            if ($ARACSonuc["yakit"] == 1) {
                echo "Dizel";
            }
            if ($ARACSonuc["yakit"] == 2) {
                echo "Benzin";
            }
            if ($ARACSonuc["yakit"] == 3) {
                echo "Lpg";
            }
            echo "</span></li>\r\n\t\t\t\t\t\t\t\t<li><i class=\"fa fa-tachometer\"></i><span>";
            if ($ARACSonuc["vites"] == 1) {
                echo "Manuel";
            }
            if ($ARACSonuc["vites"] == 2) {
                echo "Otomatik";
            }
            if ($ARACSonuc["vites"] == 3) {
                echo "Triptonik";
            }
            echo "</span></li>\r\n\t\t\t\t\t\t\t\t<li><i class=\"fa fa-recycle\"></i><span>";
            if ($ARACSonuc["klima"] == 1) {
                echo "Dijital";
            }
            if ($ARACSonuc["klima"] == 2) {
                echo "Analog";
            }
            if ($ARACSonuc["klima"] == 3) {
                echo "Yok";
            }
            echo "</span></li>\r\n\t\t\t\t\t\t\t\t<li><i class=\"fa fa-suitcase\"></i><span>";
            echo $ARACSonuc["bagaj"];
            echo " ";
            echo $dil["lt"];
            echo "</span></li>\r\n\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"campaign-title\">";
            echo $ARACSonuc["adi"];
            echo " ";
            echo $dil["kampanyalar_txt"];
            echo " <span>";
            echo para_birim();
            echo " ";
            echo intval($ARACSonuc["yirmidokuz_doksandokuz"] * 30);
            echo "</span></div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"action-btn\"><a href=\"arac/";
            echo $ARACSonuc["seo"];
            echo ".html\" class=\"btn btn-primary-o\">";
            echo $dil["rezervasyon_yap"];
            echo "</a></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t";
        }
    } else {
        echo "yok";
    }
}

?>