<?php

echo !defined("GUVENLIK") ? exit : NULL;
$ayar_dizi = $db->prepare("SELECT * FROM ayarlar WHERE id = ?");
$ayar_dizi->execute([1]);
if ($ayar_dizi->rowCount()) {
    $Sonuc = $ayar_dizi->fetch(PDO::FETCH_ASSOC);
} else {
    echo "<meta http-equiv=\"refresh\" content=\"0; url=404.html\">";
}
echo "<link href=\"assets/plugins/codemirror/lib/codemirror.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n<link href=\"assets/plugins/codemirror/theme/neat.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n<link href=\"assets/plugins/codemirror/theme/ambiance.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n<link href=\"assets/plugins/codemirror/theme/material.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n<link href=\"assets/plugins/codemirror/theme/neo.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n<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=\"site-ayar.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["txt49"];
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=\"site-ayar.html\">";
echo $admindil["txt48"];
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["txt49"];
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\t\t\t<div class=\"card-box\">\r\n\t\t\t\t<div class=\"row\">\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<div class=\"col-md-12\">\r\n\t\t\t\t\t\t<div class=\"form-group col-sm-6\" style=\"margin-left: -10px;\">\r\n\t\t\t\t\t\t\t<label for=\"site_title\">Site Title</label>\r\n\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"site_title\" value=\"";
echo $Sonuc["site_baslik"];
echo "\" id=\"site_title\"/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group col-sm-6\" style=\"padding-right: 0px;\">\r\n\t\t\t\t\t\t\t<label for=\"site_title\">Site URL</label>\r\n\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"site_url\" value=\"";
echo $Sonuc["site_url"];
echo "\" id=\"site_url\"/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t<label for=\"site_keyw\">Site Meta</label><span class=\"clearfix\"></span>\r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"site_keyw\" id=\"site_keyw\" data-role=\"tagsinput\" value=\"";
echo $Sonuc["site_keyw"];
echo "\" placeholder=\"Kelime Ekle\"/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t<label for=\"site_desc\">Site Açıklama (description)</label>\r\n\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"site_desc\" value=\"";
echo $Sonuc["site_desc"];
echo "\"  id=\"site_desc\"/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t";
if ($Sonuc["firma_logo"]) {
    echo "\t\t\t\t\t\t\t<div class=\"form-group\" style=\"float:left;\">\r\n\t\t\t\t\t\t\t<img src=\"../";
    echo TEMA;
    echo "/uploads/logo/";
    echo $Sonuc["firma_logo"];
    echo "\" alt=\"image\" class=\"img-responsive img-thumbnail\" width=\"200\" style=\"margin-bottom:2px;\"><br>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t";
}
echo "\t\t\t\t\t\t";
if ($Sonuc["favicon"]) {
    echo "\t\t\t\t\t\t\t<div class=\"form-group\" style=\"float:left;margin-top: 45px;\">\r\n\t\t\t\t\t\t\t<img src=\"../";
    echo TEMA;
    echo "/uploads/favicon/";
    echo $Sonuc["favicon"];
    echo "\" alt=\"image\" class=\"img-responsive img-thumbnail\" width=\"32\" style=\"margin-bottom:2px;\"><br>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t";
}
echo "\t\t\t\t\t\t<span class=\"clearfix\"></span>\r\n\t\t\t\t\t\t<div class=\"form-group col-sm-5\" style=\"margin-left: -10px;\">\r\n\t\t\t\t\t\t\t<label class=\"control-label\">Firma Logo</label>\r\n\t\t\t\t\t\t\t<input type=\"file\" name=\"resim\" class=\"filestyle\" data-buttonname=\"btn-primary\">\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div style=\"clear:both;\"></div>\r\n\t\t\t\t\t\t<div class=\"form-group col-sm-5\" style=\"margin-left: -10px;\">\r\n\t\t\t\t\t\t\t<label class=\"control-label\">Firma Favicon</label>\r\n\t\t\t\t\t\t\t<input type=\"file\" name=\"favicon\" class=\"filestyle\" data-buttonname=\"btn-primary\">\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div style=\"clear:both;\"></div>\r\n\t\t\t\t\t\t<div class=\"form-group col-sm-6\" style=\"margin-left: -10px;\">\r\n\t\t\t\t\t\t\t<label for=\"firma_adi\">Firma Adı</label>\r\n\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"firma_adi\" value=\"";
echo $Sonuc["firma_adi"];
echo "\"  id=\"firma_adi\"/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group col-sm-6\" style=\"padding-right: 0px;\">\r\n\t\t\t\t\t\t\t<label for=\"firma_telefon\">Firma Telefon</label>\r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"firma_telefon\" id=\"firma_telefon\" value=\"";
echo $Sonuc["firma_telefon"];
echo "\" data-mask=\"9 (999) 999-9999\" class=\"form-control\"/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group col-sm-6\" style=\"margin-left: -10px;\">\r\n\t\t\t\t\t\t\t<label for=\"firma_fax\">Firma Fax</label>\r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"firma_fax\" id=\"firma_fax\" value=\"";
echo $Sonuc["firma_fax"];
echo "\" data-mask=\"9 (999) 999-9999\" class=\"form-control\"/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group col-sm-6\" style=\"padding-right: 0px;\">\r\n\t\t\t\t\t\t\t<label for=\"firma_email\">Firma E-Mail</label>\r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"firma_email\" id=\"firma_email\" value=\"";
echo $Sonuc["firma_email"];
echo "\" class=\"form-control\"/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t<label>Site Para Birimi</label>\r\n\t\t\t\t\t\t\t<select class=\"form-control\" name=\"pbirim\" title=\"Para Birimi\">\r\n\t\t\t\t\t\t\t\t<option ";
echo $Sonuc["pbirim"] == "TL" ? "selected" : "";
echo ">TL</option>\r\n\t\t\t\t\t\t\t\t<option ";
echo $Sonuc["pbirim"] == "USD" ? "selected" : "";
echo ">USD</option>\r\n\t\t\t\t\t\t\t\t<option ";
echo $Sonuc["pbirim"] == "EURO" ? "selected" : "";
echo ">EURO</option>\r\n\t\t\t\t\t\t\t</select>\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t<label for=\"firma_adres\">Firma Adres</label>\r\n\t\t\t\t\t\t\t<textarea class=\"form-control\" name=\"firma_adres\" id=\"firma_adres\" rows=\"5\">";
echo $Sonuc["firma_adres"];
echo "</textarea>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t<label for=\"google_maps\">Google Maps</label>\r\n\t\t\t\t\t\t\t<textarea class=\"form-control\" name=\"google_maps\" id=\"google_maps\" rows=\"5\">";
echo $Sonuc["google_maps"];
echo "</textarea>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t<label for=\"google_maps_link\">Google Maps Link</label>\r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"google_maps_link\" id=\"google_maps_link\" value=\"";
echo $Sonuc["google_maps_link"];
echo "\" class=\"form-control\"/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t<label for=\"google_analytics\">Google Analytics</label>\r\n\t\t\t\t\t\t\t<textarea class=\"form-control\" name=\"google_analytics\"id=\"google_analytics\" rows=\"5\">";
echo $Sonuc["google_analytics"];
echo "</textarea>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group col-sm-6\" style=\"margin-left: -10px;\">\r\n\t\t\t\t\t\t\t<label for=\"facebook\">Facebook Sayfa URL</label>\r\n\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"facebook\" value=\"";
echo $Sonuc["facebook"];
echo "\"  id=\"facebook\"/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group col-sm-6\" style=\"padding-right: 0px;\">\r\n\t\t\t\t\t\t\t<label for=\"twitter\">Twitter Sayfa URL</label>\r\n\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"twitter\" value=\"";
echo $Sonuc["twitter"];
echo "\"  id=\"twitter\"/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group col-sm-6\" style=\"margin-left: -10px;\">\r\n\t\t\t\t\t\t\t<label for=\"gplus\">Gplus Sayfa URL</label>\r\n\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"gplus\" value=\"";
echo $Sonuc["gplus"];
echo "\"  id=\"gplus\"/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group col-sm-6\" style=\"padding-right: 0px;\">\r\n\t\t\t\t\t\t\t<label for=\"instagram\">Instagram Sayfa URL</label>\r\n\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"instagram\" value=\"";
echo $Sonuc["instagram"];
echo "\"  id=\"instagram\"/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t<label class=\"control-label\">Copyright Metni</label>\r\n\t\t\t\t\t\t\t<textarea class=\"form-control\" name=\"copyright\" placeholder=\"İçerik Giriniz.\">";
echo $Sonuc["copyright"];
echo "</textarea>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t";
$degisken = "dil";
$dizin = "../language/admin_" . $degisken . ".php";
$yazan = "";
if (file_exists($dizin) && 0 < filesize($dizin)) {
    $dosya = fopen($dizin, "r");
    $yazan = fread($dosya, filesize($dizin));
} else {
    echo "\t\t\t\t\t\t\t <div class=\"alert alert-danger\">\r\n\t\t\t\t\t\t\t\t<strong>Kritik Hata!</strong> Dil dosyası bulunamadı veya içi boş acilen ";
    echo str_replace("/", "\\", $dizin);
    echo " yerini doldurun. Veya düzenleye basıp otomatik olarak ekleyebilirsiniz.\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t";
}
echo "\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t<textarea class=\"form-control\" rows=\"3\" name=\"ekstra\" id=\"code_editor_demo_1\">";
echo $yazan;
echo "</textarea>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"form-group col-sm-2\" style=\"padding-right: 0px;\">\r\n\t\t\t\t\t\t\t<label class=\"control-label\">Site Durumu</label> <span class=\"clearfix\"></span>\r\n\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"site_durum\" ";
if ($Sonuc["site_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</div>\r\n\t\t\t\t\t\t<span class=\"clearfix\"></span>\r\n\t\t\t\t\t\t<button type=\"submit\" name=\"SiteAyarGuncelle\" class=\"btn btn-primary waves-effect waves-light\">\r\n\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</button>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</form>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t</div>\r\n</div>\r\n<script src=\"assets/plugins/codemirror/lib/codemirror.js\" type=\"text/javascript\"></script>\r\n<script src=\"assets/plugins/codemirror/addon/edit/matchbrackets.js\" type=\"text/javascript\"></script>\r\n<script src=\"assets/plugins/codemirror/mode/htmlmixed/htmlmixed.js\" type=\"text/javascript\"></script>\r\n<script src=\"assets/plugins/codemirror/mode/xml/xml.js\" type=\"text/javascript\"></script>\r\n<script src=\"assets/plugins/codemirror/mode/javascript/javascript.js\" type=\"text/javascript\"></script>\r\n<script src=\"assets/plugins/codemirror/mode/css/css.js\" type=\"text/javascript\"></script>\r\n<script src=\"assets/plugins/codemirror/mode/clike/clike.js\" type=\"text/javascript\"></script>\r\n<script src=\"assets/plugins/codemirror/mode/php/php.js\" type=\"text/javascript\"></script>\r\n\r\n<style>\r\n.CodeMirror {\r\n    height: 400px;\r\n}\r\n</style>\r\n<script type=\"text/javascript\">\r\nvar myTextarea = document.getElementById('code_editor_demo_1');\r\n  var editor = CodeMirror.fromTextArea(myTextarea, {\r\n        lineNumbers: true,\r\n        matchBrackets: true,\r\n        mode: \"text/x-php\",\r\n        indentUnit: 4,\r\n        indentWithTabs: true,\r\n        theme : \"ambiance\"\r\n  });\r\n</script>\r\n";
if ($_SESSION["SiteAyarGuncelle"] == "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 güncellendi.')\r\n\t});\r\n\t</script>";
    unset($_SESSION["SiteAyarGuncelle"]);
}
if ($_SESSION["SiteAyarGuncelle"] == "no") {
   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 güncellendi.')\r\n\t});\r\n\t</script>";
    unset($_SESSION["SiteAyarGuncelle"]);
}
echo "\r\n\t";

?>