<?php


echo "<div class=\"content\">\r\n\t<div class=\"container\">\r\n\r\n\t\t<!-- Page-Title -->\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-sm-12\">\r\n\t\t\t\t<div class=\"btn-group pull-right m-t-15\">\r\n\t\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\t<div class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"btnGroupDrop1\">\r\n\t\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\t";
foreach ($DILislem as $DILSonuc) {
    echo "\t\t\t\t\t\t\t<a class=\"dropdown-item\" href=\"urun-grublari.html?dil=";
    echo $DILSonuc["id"];
    echo "\">";
    echo $DILSonuc["adi"];
    echo "</a>\r\n\t\t\t\t\t\t\t";
}
echo "\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<h4 class=\"page-title\">";
echo $admindil["txt20"];
echo "</h4>\r\n\t\t\t\t<ol class=\"breadcrumb\">\r\n\t\t\t\t\t<li>\r\n\t\t\t\t\t\t<a href=\"index.html\">";
echo $admindil["txt1"];
echo "</a>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t<li class=\"active\">\r\n\t\t\t\t\t\t";
echo $admindil["txt20"];
echo "\t\t\t\t\t</li>\r\n\t\t\t\t</ol>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-sm-12\">\r\n\t\t\t\t<div class=\"card-box\">\r\n\t\t\t\t\t<table id=\"demo-foo-filtering\" class=\"table table-striped toggle-circle m-b-0\" data-page-size=\"7\">\r\n\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<th data-toggle=\"true\">Sıra</th>\r\n\t\t\t\t\t\t\t\t<th>Kategori Adı</th>\r\n\t\t\t\t\t\t\t\t<th>Durum</th>\r\n\t\t\t\t\t\t\t\t<th style=\"width:150px\">İşlem</th>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t<div class=\"form-inline m-b-20\">\r\n\t\t\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t\t\t<div class=\"col-sm-6 text-xs-center\">\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<label class=\"control-label m-r-5\">Durum</label>\r\n\t\t\t\t\t\t\t\t\t\t<select id=\"demo-foo-filter-status\" class=\"form-control input-sm\">\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">Tümünü Göster</option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"aktif\">Aktif</option>\r\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"pasif\">Pasif</option>\r\n\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\t<div class=\"col-sm-6 text-xs-center text-right\">\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<input id=\"demo-foo-search\" type=\"text\" placeholder=\"Arama\" class=\"form-control input-sm\" autocomplete=\"on\">\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<tbody>\r\n\t\t\t\t\t\t";
$PSorgu = $db->prepare("SELECT * FROM kategori WHERE dil = ? ORDER BY sira ASC");
$PSorgu->execute([$_SESSION["admin_dil"]]);
$say = 1;
$Pislem = $PSorgu->fetchALL(PDO::FETCH_ASSOC);
echo "\t\t\t\t\t\t";
foreach ($Pislem as $PSonuc) {
    echo "\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td>";
    echo $say++;
    echo "</td>\r\n\t\t\t\t\t\t\t\t<td>";
    echo $PSonuc["adi"];
    echo "</td>\r\n\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t";
    if ($PSonuc["durum"] == "1") {
        echo "\t\t\t\t\t\t\t\t <span class=\"label label-table label-success\">Aktif</span>\r\n\t\t\t\t\t\t\t\t ";
    } else {
        echo "\t\t\t\t\t\t\t\t <span class=\"label label-table label-danger\">Pasif</span>\r\n\t\t\t\t\t\t\t\t";
    }
    echo "\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t<a class=\"btn btn-danger btn-xs waves-effect waves-light\" id=\"\"  href=\"javascript:;\" onclick=\"\$.Notification.confirm('success','top right', 'Silmek istediğinize emin misiniz ?','../system/panel_islemler.php?kategorisil=ok&id=";
    echo $PSonuc["id"];
    echo "')\"><i class=\"fa fa-trash\"></i> Sil</a>\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<a href=\"#custom-modal";
    echo $PSonuc["id"];
    echo "\" class=\"btn btn-info btn-xs\" title=\"Düzenle\" id=\"add-sticky\" data-animation=\"fadein\" data-plugin=\"custommodal\" data-overlaySpeed=\"200\" data-overlayColor=\"#36404a\">\r\n\t\t\t\t\t\t\t\t\t<i class=\"fa fa-pencil\"></i> Düzenle\r\n\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<!-- Modal -->\r\n\t\t\t\t\t\t\t<div id=\"custom-modal";
    echo $PSonuc["id"];
    echo "\" class=\"modal-demo\">\r\n\t\t\t\t\t\t\t\t<button type=\"button\" class=\"close\" onclick=\"Custombox.close();\">\r\n\t\t\t\t\t\t\t\t\t<span>&times;</span><span class=\"sr-only\">Kapat</span>\r\n\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t\t<h4 class=\"custom-modal-title\">Kategori Düzenle</h4>\r\n\t\t\t\t\t\t\t\t<div class=\"custom-modal-text text-left\">\r\n\t\t\t\t\t\t\t\t<form role=\"form\" action=\"../system/panel_islemler.php\"  method=\"POST\">\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<label for=\"Gadi\">Kategori Adı</label>\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"Gadi\" name=\"Gadi\" value=\"";
    echo $PSonuc["adi"];
    echo "\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\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<label for=\"keywords\">Sayfa Meta</label><span class=\"clearfix\"></span>\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"Gkeywords\" id=\"keywords\" data-role=\"tagsinput\" value=\"";
    echo $PSonuc["keywords"];
    echo "\" placeholder=\"Kelime Ekle\"/>\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=\"form-group\">\r\n\t\t\t\t\t\t\t\t\t\t<label for=\"Gdescription\">Sayfa Açıklama (description) <span id=\"descriptionKalanKarakterSayac\">160</span></label>\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"Gdescription\" onkeyup=\"descriptionTextAreaKarakterSayisiDogrula()\" value=\"";
    echo $PSonuc["description"];
    echo "\"  id=\"Gdescription\"/>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\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<label class=\"control-label\">Durumu</label> <span class=\"clearfix\"></span>\r\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"Gdurum\" ";
    if ($PSonuc["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\t\t\t<input type=\"hidden\" name=\"kid\" value=\"";
    echo $PSonuc["id"];
    echo "\" />\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\t\t<button type=\"submit\" name=\"KategoriEGuncelle\" class=\"btn btn-success waves-effect waves-light\">Güncelle</button>\r\n\t\t\t\t\t\t\t\t\t<button type=\"button\" onclick=\"Custombox.close();\" class=\"btn btn-danger waves-effect waves-light m-l-10\">Kapat</button>\r\n\t\t\t\t\t\t\t\t</form>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\t\t\t\r\n\t\t\t\t\t\t";
}
echo "\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t<tfoot>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td colspan=\"6\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"text-right\">\r\n\t\t\t\t\t\t\t\t\t\t<ul class=\"pagination pagination-split m-t-30 m-b-0\"></ul>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</tfoot>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-12\">\r\n\t\t\t\t<div class=\"card-box\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\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\t<div class=\"col-md-12\">\r\n\t\t\t\t\t\t\t<h4 class=\"m-t-0 header-title\"><b>KATEGORİ EKLE</b></h4>\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<label for=\"adi\">Kategori Adı</label>\r\n\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"adi\"  id=\"adi\"/>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t<label for=\"keywords\">Sayfa Meta</label><span class=\"clearfix\"></span>\r\n\t\t\t\t\t\t\t\t<input type=\"text\" name=\"keywords\" id=\"keywords\" data-role=\"tagsinput\"  placeholder=\"Kelime Ekle\"/>\r\n\t\t\t\t\t\t\t\t</div>\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<label for=\"description\">Sayfa Açıklama (description) <span id=\"descriptionKalanKarakterSayac\">160</span></label>\r\n\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"description\" onkeyup=\"descriptionTextAreaKarakterSayisiDogrula()\" id=\"description\"/>\r\n\t\t\t\t\t\t\t\t</div>\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<label class=\"control-label\">Durumu</label> <span class=\"clearfix\"></span>\r\n\t\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\t</div>\r\n\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<span class=\"clearfix\"></span>\r\n\t\t\t\t\t\t\t<button type=\"submit\" name=\"KategoriEkle\" 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</form>\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\t\r\n\t\t\t\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n<link href=\"assets/plugins/custombox/dist/custombox.min.css\" rel=\"stylesheet\">\r\n<!-- Modal-Effect -->\r\n<script src=\"assets/plugins/custombox/dist/custombox.min.js\"></script>\r\n<script src=\"assets/plugins/custombox/dist/legacy.min.js\"></script>\r\n";
if ($_SESSION["KategoriEkle"] == "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 eklenmiştir.')\r\n\t});\r\n\t</script>";
    unset($_SESSION["KategoriEkle"]);
}
if ($_SESSION["KategoriEkle"] == "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["KategoriEkle"]);
}
echo "\r\n";
if ($_SESSION["KategoriEGuncelle"] == "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["KategoriEGuncelle"]);
}
if ($_SESSION["KategoriEGuncelle"] == "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["KategoriEGuncelle"]);
}
echo "\r\n";
if ($_SESSION["kategorisil"] == "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 silinmiştir.')\r\n\t});\r\n\t</script>";
    unset($_SESSION["kategorisil"]);
}
if ($_SESSION["kategorisil"] == "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["kategorisil"]);
}
echo "\t";

?>