<?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["arac_listesi"];
    $AJAXARACSorgu = $db->prepare("SELECT * FROM araclar WHERE durum = ? AND dil = ? AND id > ? ORDER BY id ASC, bir_uc ASC LIMIT " . $limit);
    $AJAXARACSorgu->execute(["1", $_SESSION["k_dil"], $id]);
    $AJAXARACislem = $AJAXARACSorgu->fetchALL(PDO::FETCH_ASSOC);
    if ($AJAXARACSorgu->rowCount() != "0") {
        foreach ($AJAXARACislem as $AJAXAJAXARACSonuc) {
            echo "\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"item\" id=\"";
            echo $AJAXAJAXARACSonuc["id"];
            echo "\">\r\n\t\t\t\t\t";
            if ($AJAXAJAXARACSonuc["yeni"] == 1) {
                echo "<div class='new-box'><span>";
                echo $dil["yeni"];
                echo "</span></div>";
            }
            echo "\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-md-6\">\r\n\t\t\t\t\t\t\t<div class=\"price-box\"><span class=\"price-value\">";
            echo intval($AJAXAJAXARACSonuc["bir_uc"]);
            echo " <i class=\"fa fa-try\"></i></span><span class=\"price-text\"><b>/</b> Gün</span></div>\r\n\t\t\t\t\t\t\t<div class=\"image-box\"><img src=\"";
            echo TEMA;
            echo "/uploads/araclar/";
            echo $AJAXAJAXARACSonuc["resim"];
            echo "\"></div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"col-md-6\">\r\n\t\t\t\t\t\t\t<div class=\"car-info\">\r\n\t\t\t\t\t\t\t\t<div class=\"car-name\">";
            echo $AJAXAJAXARACSonuc["adi"];
            echo " <span></span></div>\r\n\t\t\t\t\t\t\t\t<div class=\"car-class\"> ";
            echo $kategoriler["adi"];
            echo " </div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class=\"car-option-list\">\r\n\t\t\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t\t\t<li><i class=\"fa fa-battery-three-quarters\"></i><span>";
            if ($AJAXAJAXARACSonuc["yakit"] == 1) {
                echo "Dizel";
            }
            if ($AJAXAJAXARACSonuc["yakit"] == 2) {
                echo "Benzin";
            }
            if ($AJAXAJAXARACSonuc["yakit"] == 3) {
                echo "Lpg";
            }
            echo "</span></li>\r\n\t\t\t\t\t\t\t\t\t<li><i class=\"fa fa-tachometer\"></i><span>";
            if ($AJAXAJAXARACSonuc["vites"] == 1) {
                echo "Manuel";
            }
            if ($AJAXAJAXARACSonuc["vites"] == 2) {
                echo "Otomatik";
            }
            if ($AJAXAJAXARACSonuc["vites"] == 3) {
                echo "Triptonik";
            }
            echo "</span></li>\r\n\t\t\t\t\t\t\t\t\t<li><i class=\"fa fa-recycle\"></i><span>";
            if ($AJAXAJAXARACSonuc["klima"] == 1) {
                echo "Dijital";
            }
            if ($AJAXAJAXARACSonuc["klima"] == 2) {
                echo "Analog";
            }
            if ($AJAXAJAXARACSonuc["klima"] == 3) {
                echo "Yok";
            }
            echo "</span></li>\r\n\t\t\t\t\t\t\t\t\t<li><i class=\"fa fa-suitcase\"></i><span>";
            echo $AJAXAJAXARACSonuc["bagaj"];
            echo " ";
            echo $dil["lt"];
            echo "</span></li>\r\n\t\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class=\"fiyatliste hidden-xs hidden-sm\">\r\n\t\t\t\t\t\t\t\t<div class=\"fiyatlisteborder\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"fiyatlistehizala\"> \r\n\t\t\t\t\t\t\t\t\t\t<span class=\"gunlukfiyatlar\">1-3 ";
            echo $dil["gun"];
            echo "<em> ";
            echo para_birim();
            echo " ";
            echo intval($AJAXAJAXARACSonuc["bir_uc"]);
            echo "</em></span> \r\n\t\t\t\t\t\t\t\t\t\t<span class=\"gunlukfiyatlar\">4-7 ";
            echo $dil["gun"];
            echo "<em> ";
            echo para_birim();
            echo " ";
            echo intval($AJAXAJAXARACSonuc["dort_yedi"]);
            echo "</em></span> \r\n\t\t\t\t\t\t\t\t\t\t<span class=\"gunlukfiyatlar\">8-15 ";
            echo $dil["gun"];
            echo "<em> ";
            echo para_birim();
            echo " ";
            echo intval($AJAXAJAXARACSonuc["sekiz_onbes"]);
            echo "</em></span> \r\n\t\t\t\t\t\t\t\t\t\t<span class=\"gunlukfiyatlar\">16-21 ";
            echo $dil["gun"];
            echo "<em> ";
            echo para_birim();
            echo " ";
            echo intval($AJAXAJAXARACSonuc["onalti_yirmibir"]);
            echo "</em></span> \r\n\t\t\t\t\t\t\t\t\t\t<span class=\"gunlukfiyatlar\">22-28 ";
            echo $dil["gun"];
            echo "<em> ";
            echo para_birim();
            echo " ";
            echo intval($AJAXAJAXARACSonuc["yirmiiki_yirmisekiz"]);
            echo "</em></span> \r\n\t\t\t\t\t\t\t\t\t\t<span class=\"gunlukfiyatlar\">29-99 ";
            echo $dil["gun"];
            echo "<em> ";
            echo para_birim();
            echo " ";
            echo intval($AJAXAJAXARACSonuc["yirmidokuz_doksandokuz"]);
            echo "</em></span> \r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class=\"action-btn\">\r\n\t\t\t\t\t\t\t\t<a href=\"arac/";
            echo $AJAXAJAXARACSonuc["seo"];
            echo ".html\" class=\"btn btn-primary-o\"><i class=\"fa fa-external-link\" aria-hidden=\"true\"></i>  ";
            echo $dil["incele"];
            echo "</a>\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</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t";
        }
    } else {
        echo "yok";
    }
}

?>