<?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["transfer_sayisi"];
    $BSorgu = $db->prepare("SELECT * FROM transfer WHERE durum = ? AND dil = ? AND id < ? ORDER BY id DESC LIMIT " . $limit);
    $BSorgu->execute(["1", $_SESSION["k_dil"], $id]);
    $islem = $BSorgu->fetchALL(PDO::FETCH_ASSOC);
    if ($BSorgu->rowCount() != "0") {
        foreach ($islem as $BSonuc) {
            echo "\t\t\t<tr class=\"item\" id=\"";
            echo $Sonuc["id"];
            echo "\">\r\n\t\t\t\t<td>";
            echo $BSonuc["alis"];
            echo "</td>\r\n\t\t\t\t<td>";
            echo $BSonuc["varis"];
            echo "</td>\r\n\t\t\t\t<td>";
            echo para_birim();
            echo " ";
            echo $BSonuc["t1_4"];
            echo "</td>\r\n\t\t\t\t<td>";
            echo para_birim();
            echo " ";
            echo $BSonuc["t5_8"];
            echo "</td>\r\n\t\t\t\t<td>";
            echo para_birim();
            echo " ";
            echo $BSonuc["t9_15"];
            echo "</td>\r\n\t\t\t\t<td>";
            echo para_birim();
            echo " ";
            echo $BSonuc["t16_30"];
            echo "</td>\r\n\t\t\t\t<td>";
            echo $BSonuc["mesafe"];
            echo " ";
            echo $dil["km"];
            echo "</td>\r\n\t\t\t\t<td><a data-toggle=\"modal\" data-target=\"#transfer_formu_";
            echo $BSonuc["id"];
            echo "\" data-backdrop=\"static\" data-keyboard=\"false\" style=\"padding: 7px 20px;height:auto;\" class=\"btn btn-primary-o btn-block\">";
            echo $dil["rezervasyon"];
            echo " <i class=\"fa fa-arrow-circle-o-right\"></i></a></td>\r\n\t\t\t</tr>\r\n\t\t";
        }
    } else {
        echo "yok";
    }
}

?>