<?php


echo !defined("GUVENLIK") ? exit : NULL;
if (isset($_SESSION["aracid"])) {
    $Sorgu = $db->prepare("SELECT * FROM araclar WHERE id = ? AND durum = ? AND dil = ?");
    $Sorgu->execute([$_SESSION["aracid"], "1", $_SESSION["k_dil"]]);
    if ($Sorgu->rowCount()) {
        $Sonuc = $Sorgu->fetch(PDO::FETCH_ASSOC);
    } else {
        header("Location:../404.html");
    }
} else {
    header("Location:../index.html");
}
echo "<section class=\"site-content\">\r\n    <div class=\"page-filter\">\r\n        <div class=\"container\">\r\n            <div class=\"promo-form\">\r\n\t\t\t\t<form action=\"system/site_islemler.php\" method=\"POST\" autocomplete=\"off\">\r\n\t\t\t\t\t<div class=\"promo-form-input\">\r\n\t\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t\t<div class=\"col-md-4 col-sm-12\">\r\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"icon-box\"><i class=\"fa fa-car\"></i></div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"input-box\">\r\n\t\t\t\t\t\t\t\t\t\t<select name=\"alis\" data-style=\"home-btn-select btn-link\" data-live-search=\"true\" data-size=\"10\" class=\"selectpicker\" data-custom-id=\"custom\" data-custom-class=\"custom\">\r\n\t\t\t\t\t\t\t\t\t\t\t<option selected=\"selected\" value=\"\">";
echo $dil["alis_noktasi"];
echo "</option>\r\n\t\t\t\t\t\t\t\t\t\t\t";
$LOCSorgu = $db->prepare("SELECT * FROM lokasyon WHERE durum = ? AND konum = ? AND dil = ? ORDER BY id ASC");
$LOCSorgu->execute(["1", "0", $_SESSION["k_dil"]]);
$LOCislem = $LOCSorgu->fetchALL(PDO::FETCH_ASSOC);
echo "\t\t\t\t\t\t\t\t\t\t\t";
foreach ($LOCislem as $LOCSonuc) {
    echo "\t\t\t\t\t\t\t\t\t\t\t<option value=\"";
    echo $LOCSonuc["adi"];
    echo "\" ";
    echo $LOCSonuc["adi"] == $_SESSION["alis"] ? "selected" : "";
    echo ">";
    echo $LOCSonuc["adi"];
    echo "</option>\r\n\t\t\t\t\t\t\t\t\t\t\t";
}
echo "\t\t\t\t\t\t\t\t\t\t</select>\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=\"col-md-3 col-sm-6\">\r\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"icon-box\"><i class=\"fa fa-calendar\"></i></div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"input-box\">\r\n\t\t\t\t\t\t\t\t\t\t<input name=\"alistarih\" type=\"text\" placeholder=\"";
echo $dil["tarih_seciniz"];
echo "\" value=\"";
echo $_SESSION["alistarih"] != "" ? $_SESSION["alistarih"] : date("d-m-Y") . " " . date("H", strtotime("+1 hours")) . ":00";
echo "\" class=\"form-control dt-picker dt-start\" />\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=\"col-md-3 col-sm-6\">\r\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"icon-box\"><i class=\"fa fa-calendar\"></i></div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"input-box\">\r\n\t\t\t\t\t\t\t\t\t\t<input name=\"donustarih\" type=\"text\" placeholder=\"";
echo $dil["tarih_seciniz"];
echo "\" value=\"";
echo $_SESSION["donustarih"] != "" ? $_SESSION["donustarih"] : date("d-m-Y", strtotime("+1 days")) . " " . date("H", strtotime("+1 hours")) . ":00";
echo "\" class=\"form-control dt-picker dt-end\" />\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=\"col-md-2 col-sm-6 col-md-offset-0 col-sm-offset-3\">\r\n\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"url\" name=\"url\" value=\"";
echo $_SERVER["REQUEST_URI"];
echo "\">\r\n\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"arac_bul\" value=\"";
echo $dil["arac_bul"];
echo "\" class=\"btn btn-primary-o btn-submit\" />\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\t<div class=\"promo-form-action\">\r\n\t\t\t\t\t\t<div class=\"other-delivery-area\">\r\n\t\t\t\t\t\t\t<div class=\"col-md-6 col-md-offset-3\">\r\n\t\t\t\t\t\t\t\t<div class=\"promo-form-input mt-20\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"icon-box\"><i class=\"fa fa-car\"></i></div>\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-box\">\r\n\t\t\t\t\t\t\t\t\t\t\t<select name=\"donus\" data-style=\"home-btn-select btn-link\" data-live-search=\"true\" data-size=\"10\" class=\"selectpicker\" data-custom-id=\"custom\" data-custom-class=\"custom\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<option selected=\"selected\" value=\"\">";
echo $dil["iade_noktasi"];
echo "</option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t";
$LOCSorgu = $db->prepare("SELECT * FROM lokasyon WHERE durum = ? AND konum = ? AND dil = ? ORDER BY id ASC");
$LOCSorgu->execute(["1", "1", $_SESSION["k_dil"]]);
$LOCislem = $LOCSorgu->fetchALL(PDO::FETCH_ASSOC);
echo "\t\t\t\t\t\t\t\t\t\t\t\t";
foreach ($LOCislem as $LOCSonuc) {
    echo "\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"";
    echo $LOCSonuc["adi"];
    echo "\" ";
    echo $LOCSonuc["adi"] == $_SESSION["donus"] ? "selected" : "";
    echo ">";
    echo $LOCSonuc["adi"];
    echo "</option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t";
}
echo "\t\t\t\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t\t\t\t</div>\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</div>\r\n\t\t\t\t\t\t<div class=\"other-delivery\">\r\n\t\t\t\t\t\t\t<button type=\"button\" class=\"btn-link\" id=\"btnsec\">";
echo $dil["farkli_lokasyon"];
echo "</button>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</form>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    ";
$extraUcret = 0;
if (isset($_SESSION["arac_" . $_SESSION["aracid"]])) {
    foreach ($_SESSION["arac_" . $_SESSION["aracid"]] as $k => $v) {
        $seciliextra = $db->query("SELECT * FROM ekstra WHERE id = '" . $k . "'")->fetch(PDO::FETCH_ASSOC);
        $extraUcret += $seciliextra["fiyat"] * (int) $v;
    }
}
echo "    <div class=\"page-content\">\r\n        <div class=\"container\">\r\n            <div class=\"row\">\r\n                <div class=\"col-md-3 col-sm-5 col-md-offset-1 col-xs-12 pull-right\">\r\n                    <div class=\"page-sidebar\">\r\n                        <div class=\"widget widget-price\"><span>";
echo $dil["genel_toplam"];
echo "</span><b>";
echo para_birim();
echo " ";
echo $_SESSION["genel_fiyat"] + $extraUcret;
echo "</b> <strong>";
echo $dil["kdv_dahil"];
echo "</strong></div>\r\n                        <div class=\"widget widget-reservation\">\r\n                            <div class=\"widget-head\"><i class=\"fa fa-car\"></i><span>";
echo $dil["islem_bilgi"];
echo "</span></div>\r\n                            <div class=\"widget-body\">\r\n\r\n                                <div class=\"car-detail\">\r\n                                    <div class=\"date-box\">";
echo $_SESSION["gunfarki"];
echo " <span>";
echo $dil["gun"];
echo "</span></div>\r\n                                    <div class=\"image-box\">\r\n                                        <img src=\"";
echo TEMA;
echo "/uploads/araclar/";
echo $Sonuc["resim"];
echo "\">\r\n\t\t\t\t\t\t\t\t\t</div>\r\n                                    <div class=\"car-info\">\r\n                                        <div class=\"car-name\">";
echo $Sonuc["adi"];
echo "<span></span></div>\r\n                                    </div>\r\n                                </div>\r\n\r\n                                <div class=\"filter-list\">\r\n                                    <div class=\"list-head\"><span>";
echo $dil["ek_secenek"];
echo "</span></div>\r\n                                    <div class=\"list-body\">\r\n                                        <ul>\r\n                                            <li><span style=\"font: 22px/31px !important;color: #5d6469;\">";
echo $dil["extra_ucret"];
echo " : </span><b> ";
echo para_birim();
echo "</b> <span class=\"pull-right\" style=\"margin-left: 2px;font-size: 19px;margin-top: -2px;\">";
echo $extraUcret;
echo "</span></li>\r\n                                        </ul>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"col-md-8 col-sm-6 col-xs-12\">\r\n                    <div class=\"page-block\">\r\n                        <div class=\"block-title\">\r\n                            <h1>";
echo $dil["kisisel_bilgiler"];
echo "</h1>\r\n                        </div>\r\n                        <div class=\"block-body\">\r\n                            <div class=\"row\">\r\n\t\t\t\t\t\t\t\t<form action=\"system/site_islemler.php\" method=\"POST\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t\t\t<label>";
echo $dil["uyruk"];
echo "</label>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"radio-inline\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"uyruk\" value=\"Türk\" checked><span>";
echo $dil["turk"];
echo "</span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"radio-inline\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"uyruk\" value=\"Diğer\"><span>";
echo $dil["diger"];
echo "</span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t\t\t<label>";
echo $dil["tc_no"];
echo "</label>\r\n\t\t\t\t\t\t\t\t\t\t\t<input name=\"TcKimlikNo\" type=\"text\" maxlength=\"11\" id=\"TcKimlikNo\" class=\"form-control\" placeholder=\"\" />\r\n\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-6\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t\t\t<label>";
echo $dil["adiniz"];
echo "</label>\r\n\t\t\t\t\t\t\t\t\t\t\t<input name=\"Adi\" type=\"text\" id=\"Adi\" class=\"form-control\" placeholder=\"\" />\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-6\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t\t\t<label>";
echo $dil["soyadiniz"];
echo "</label>\r\n\t\t\t\t\t\t\t\t\t\t\t<input name=\"Soyadi\" type=\"text\" id=\"Soyadi\" class=\"form-control\" placeholder=\"\" />\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"\">";
echo $dil["dogum_tarihi"];
echo "</label>\r\n\t\t\t\t\t\t\t\t\t\t\t<input name=\"DogumTarihi\" type=\"text\" id=\"DogumTarihi\" class=\"form-control date\" placeholder=\"\" data-inputmask=\"&#39;mask&#39;: &#39;99.99.9999&#39;\" />\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t\t\t<label for=\"\">";
echo $dil["ehliyet_Verilis"];
echo "</label>\r\n\t\t\t\t\t\t\t\t\t\t\t<input name=\"EhliyetTarihi\" type=\"text\" id=\"EhliyetTarihi\" class=\"form-control date\" placeholder=\"\" data-inputmask=\"&#39;mask&#39;: &#39;99.99.9999&#39;\" />\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-6\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t\t\t<label>";
echo $dil["email"];
echo "</label>\r\n\t\t\t\t\t\t\t\t\t\t\t<input name=\"Email\" type=\"text\" id=\"Email\" class=\"form-control\" placeholder=\"\" data-inputmask=\"&#39;alias&#39;: &#39;email&#39;\" />\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-6\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t\t\t<label>";
echo $dil["telefon_numaraniz"];
echo "</label>\r\n\t\t\t\t\t\t\t\t\t\t\t<input name=\"Gsm\" type=\"text\" id=\"Gsm\" class=\"form-control\" placeholder=\"\" data-inputmask=\"&#39;mask&#39;: &#39;0(999) 999 99 99&#39;\" />\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"has-scroll\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<h4>";


echo "</p>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"checkbox-inline\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"sozlesme\" required><span>";
echo $dil["okudum_onayliyorum"];
echo "</span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"col-md-6 col-md-offset-3\">\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"aracadi\" value=\"";
echo $Sonuc["adi"];
echo "\" />\r\n\t\t\t\t\t\t\t\t\t\t";
$extraUcret = 0;
if (isset($_SESSION["arac_" . $_SESSION["aracid"]])) {
    foreach ($_SESSION["arac_" . $_SESSION["aracid"]] as $k => $v) {
        echo "\t\t\t\t\t\t\t\t\t    \t\t<input type=\"hidden\" name=\"ekstra_";
        echo $k;
        echo "\" value=\"";
        echo $v;
        echo "\">\r\n\t\t\t\t\t\t\t\t\t    \t\t";
    }
}
echo "\t\t\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"btngonder\" value=\"";
echo $dil["rezervasyon_yap"];
echo "\" id=\"btngonder\" class=\"btn btn-orange btn-block\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</form>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</section>\r\n";
if ($_SESSION["donus"]) {
    echo "<script>\r\n\t\$('.btn-link').toggleClass('active');\r\n\t\$('.other-delivery-area').toggle();\r\n\t\$(\"#btnsec\").css(\"display\", \"none\");\r\n</script>\r\n";
}
echo "<!--Form Alert -->\r\n";
if ($_SESSION["btngonder"] == "no") {
    echo "\r\n\t<script>\r\n\tswal({\r\n\t\ttype: 'error',\r\n\t\ttitle: '" . $dil["hata"] . "',\r\n\t\ttext: '" . $dil["hata_olustu"] . "',\r\n\t\tconfirmButtonText: 'Tamam',\r\n\t\ttimer: 5000\r\n\t})\r\n\t</script>";
    unset($_SESSION["btngonder"]);
}
if ($_SESSION["btngonder"] == "bos") {
    echo "\r\n\t<script>\r\n\tswal({\r\n\t\ttype: 'warning',\r\n\t\ttitle: '" . $dil["hata"] . "',\r\n\t\ttext: '" . $dil["bos_alan"] . "',\r\n\t\tconfirmButtonText: 'Tamam',\r\n\t\ttimer: 5000\r\n\t})\r\n\t</script>";
    unset($_SESSION["btngonder"]);
}

?>