<?php

if (isset($_GET["islem"]) == "duzenle") {
    $durum = "duzenle";
    $Sorgu = $db->prepare("SELECT * FROM transfer WHERE id = ?");
    $Sorgu->execute([$_GET["id"]]);
    if ($Sorgu->rowCount()) {
        $Sonuc = $Sorgu->fetch(PDO::FETCH_ASSOC);
    } else {
        header("Location:../404.html");
    }
}
echo "<div class=\"content\">\r\n<div class=\"container\">\r\n<!-- Page-Title -->\r\n\t<div class=\"row\">\r\n\t\t<div class=\"col-sm-12\">\r\n\t\t\t<div class=\"btn-group pull-right m-t-15\">\r\n\t\t\t\t<button type=\"button\" class=\"btn btn-default dropdown-toggle waves-effect waves-light\" data-toggle=\"dropdown\" aria-expanded=\"false\">Düzenleme Dili <strong>";
echo $mevcutDil["adi"];
echo "</strong></button>\r\n\t\t\t\t<div class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"btnGroupDrop1\">\r\n\t\t\t\t\t";
$DILSorgu = $db->prepare("SELECT * FROM diller ORDER BY sira ASC");
$DILSorgu->execute();
$DILislem = $DILSorgu->fetchALL(PDO::FETCH_ASSOC);
echo "\t\t\t\t\t\t";
foreach ($DILislem as $DILSonuc) {
    echo "\t\t\t\t\t\t<a class=\"dropdown-item\" href=\"transferler.html?dil=";
    echo $DILSonuc["id"];
    echo "\">";
    echo $DILSonuc["adi"];
    echo "</a>\r\n\t\t\t\t\t\t";
}
echo "\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<h4 class=\"page-title\">";
echo $admindil["txt23_1"];
echo " </h4>\r\n\t\t\t<ol class=\"breadcrumb\">\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<a href=\"index.html\">";
echo $admindil["txt1"];
echo "</a>\r\n\t\t\t\t</li>\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<a href=\"transferler.html\">";
echo $admindil["txt23"];
echo "</a>\r\n\t\t\t\t</li>\r\n\t\t\t\t<li class=\"active\">\r\n\t\t\t\t\t";
echo $admindil["txt23_1"];
echo "\t\t\t\t</li>\r\n\t\t\t</ol>\r\n\t\t</div>\r\n\t</div>\r\n\r\n<!-- Forms -->\r\n\t<div class=\"row\">\r\n\t\t<div class=\"col-sm-12\">\r\n\r\n\t\t\t<div class=\"card-box\">\r\n\t\t\t\t<div class=\"row\">\r\n\r\n\t\t\t\t\t<form method=\"POST\" action=\"../system/panel_islemler.php\" enctype=\"multipart/form-data\">\r\n\t\t\t\t\t\t<input id=\"id\" name=\"id\" type=\"hidden\" value=\"";
echo $Sonuc["id"];
echo "\">\r\n\t\t\t\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t<label>Alış Yeri</label>\r\n\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"alis\" value=\"";
echo $Sonuc["alis"];
echo "\">\r\n\t\t\t\t\t\t\t</div>\t\r\n\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t<label>Varış Yeri</label>\r\n\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"varis\" value=\"";
echo $Sonuc["varis"];
echo "\">\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t<label>Mesafe (KM)</label>\r\n\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"mesafe\" value=\"";
echo $Sonuc["mesafe"];
echo "\">\r\n\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t<label for=\"exampleInputEmail1\">Fiyatlar</label>\r\n\t\t\t\t\t\t\t\t<div class=\"table-responsive\">\r\n\r\n\t\t\t\t\t\t\t\t\t<table class=\"table table-bordered user-list table-hover table-striped\">\r\n\t\t\t\t\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<th>1-4 Kişi Ücreti</th>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<th>5-8 Kişi Ücreti</th>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<th>9-15 Kişi Ücreti</th>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<th>16-30 Kişi Ücreti</th>\r\n\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<td><input class=\"form-control\" type=\"text\" name=\"t1_4\" value=\"";
echo $Sonuc["t1_4"];
echo "\"> </td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<td><input class=\"form-control\" type=\"text\" name=\"t5_8\" value=\"";
echo $Sonuc["t5_8"];
echo "\"> </td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<td><input class=\"form-control\" type=\"text\" name=\"t9_15\" value=\"";
echo $Sonuc["t9_15"];
echo "\"></td>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<td><input class=\"form-control\" type=\"text\" name=\"t16_30\" value=\"";
echo $Sonuc["t16_30"];
echo "\"> </td>\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t\t\t\t</table>\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 style=\"clear:both;\"></div>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t";
if (isset($_GET["islem"]) == "duzenle") {
    echo "\t\t\t\t\t\t\t<div class=\"form-group col-sm-1\">\r\n\t\t\t\t\t\t\t\t<label class=\"control-label\">Durumu</label> <span class=\"clearfix\"></span>\r\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"durum\" ";
    if ($Sonuc["durum"] == "1") {
        echo " checked ";
    }
    echo " value=\"1\" data-plugin=\"switchery\" data-switchery=\"true\" data-color=\"#1AB394\" data-secondary-color=\"#ED5565\" />\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t";
} else {
    echo "\t\t\t\t\t\t\t<div class=\"form-group col-sm-1\">\r\n\t\t\t\t\t\t\t\t<label class=\"control-label\">Durumu</label> <span class=\"clearfix\"></span>\r\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"durum\" value=\"1\" checked data-plugin=\"switchery\" data-switchery=\"true\" data-color=\"#1AB394\" data-secondary-color=\"#ED5565\" />\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t";
}
echo "\t\t\t\t\t\t\t<div style=\"clear:both;\"></div>\t\t\r\n\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t<!-- /.form-group -->\r\n\t\t\t\t\t\t\t";
if (isset($_GET["islem"]) == "duzenle") {
    echo "\t\t\t\t\t\t\t<button type=\"submit\" name=\"transfer_bilgileri_guncelle\" class=\"btn btn-primary waves-effect waves-light\">\r\n\t\t\t\t\t\t\t\t   <span class=\"btn-label\"><i class=\"fa fa-check\"></i></span>Güncelle\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t";
} else {
    echo "\t\t\t\t\t\t\t<button type=\"submit\" name=\"transfer_bilgileri_kaydet\" class=\"btn btn-success waves-effect waves-light autohidebut\">\r\n\t\t\t\t\t\t\t\t   <span class=\"btn-label\"><i class=\"fa fa-check\"></i></span>Kaydet\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t";
}
echo "\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<!-- /.row -->\r\n\t\t\t\t\t</form>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\t\t\r\n\t\t\t\r\n\t\t</div>\r\n\t</div>\r\n\t</div>\r\n</div>\r\n\r\n<script src=\"assets/js/jquery.maskMoney.js\"></script>\r\n<script>\r\n  \$(function() {\r\n    \$('#ilantutar').maskMoney();\r\n  })\r\n</script>\r\n";
if ($_SESSION["transfer_bilgileri_kaydet"] == "no") {
    echo "\r\n\t<script>\r\n\t\$(document).ready(function () {\r\n\t\t\$.Notification.autoHideNotify('error', 'top right', 'Hata!','Hata oluştu tekrar deneyiniz.!')\r\n\t});\r\n\t</script>";
    unset($_SESSION["transfer_bilgileri_kaydet"]);
}
if ($_SESSION["transfer_bilgileri_kaydet"] == "bossonuc") {
    echo "\r\n\t<script>\r\n\t\$(document).ready(function () {\r\n\t\t\$.Notification.autoHideNotify('error', 'top right', 'Hata!','Boş alan bıraktınız.!')\r\n\t});\r\n\t</script>";
    unset($_SESSION["transfer_bilgileri_kaydet"]);
}
echo "\r\n";
if ($_SESSION["transfer_bilgileri_guncelle"] == "yes") {
    echo "\r\n\t<script>\r\n\t\$(document).ready(function () {\r\n\t\t\$.Notification.autoHideNotify('success', 'top right', 'Başarılı!','Başarı ile guncellenmiştir.')\r\n\t});\r\n\t</script>";
    unset($_SESSION["transfer_bilgileri_guncelle"]);
}
if ($_SESSION["transfer_bilgileri_guncelle"] == "no") {
    echo "\r\n\t<script>\r\n\t\$(document).ready(function () {\r\n\t\t\$.Notification.autoHideNotify('error', 'top right', 'Hata!','Hata oluştu tekrar deneyiniz.!')\r\n\t});\r\n\t</script>";
    unset($_SESSION["transfer_bilgileri_guncelle"]);
}

?>