<?php
include("include/baglan.php");
include("include/fonksiyonlar.php");
ob_start();
session_start();
oturumkontrolana();
if ($_SESSION["lan"] != '') {
    $dilsec = $db->query("select * from lan where id='{$_SESSION["lan"]}'")->fetch(PDO::FETCH_ASSOC);
}
if ($_GET["lan"]) {
    $_SESSION["lan"] = $_GET["lan"];
    $dilsec = $db->query("select * from lan where id='{$_SESSION["lan"]}'")->fetch(PDO::FETCH_ASSOC);
}
if ($_SESSION["lan"] == '') {
    $dilsec = $db->query("select * from lan where anadil='0'")->fetch(PDO::FETCH_ASSOC);
}
$uyet = $db->query("select * from admin where id='{$_SESSION["id"]}'")->fetch(PDO::FETCH_ASSOC);
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title><?= $title ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta content="Admin Dashboard" name="<?= $description ?>" />
    <meta content="<?= $author ?>" name="author" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link rel="shortcut icon" href="../imgupload/<?= $favicon ?>">
    <link href="assets/plugins/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
    <link href="assets/plugins/datatables/responsive.bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="assets/plugins/datatables/dataTables.bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="assets/css/icons.css" rel="stylesheet" type="text/css">
    <link href="assets/css/style.css" rel="stylesheet" type="text/css">
</head>
<body class="fixed-left">
    <div id="wrapper">
        <?php include("inc/menu.php") ?>
        <div class="content-page">
            <?php
            include("detals/" . $_GET["seo"] . ".php");
            include("inc/footer.php");
            ?>
        </div>
    </div>
    <script src="assets/js/jquery.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script src="assets/js/modernizr.min.js"></script>
    <script src="assets/js/detect.js"></script>
    <script src="assets/js/fastclick.js"></script>
    <script src="assets/js/jquery.slimscroll.js"></script>
    <script src="assets/js/jquery.blockUI.js"></script>
    <script src="assets/js/waves.js"></script>
    <script src="assets/js/wow.min.js"></script>
    <script src="assets/js/jquery.nicescroll.js"></script>
    <script src="assets/js/jquery.scrollTo.min.js"></script>
    <link rel="stylesheet" href="assets/uploadfive/uploadifive.css" type="text/css">
    <script src="assets/uploadfive/jquery.uploadifive.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            var date = new Date();
            var date_time = date.getTime();
            $('.upload .icon span').uploadifive({
                'auto': true,
                'queueID': 'queue',
                'fileSizeLimit': '15360KB',
                'fileExt': '*.jpg;*.jpeg;*.JPG;*.JPEG;*.png;*.PNG;*.svg;*.gif',
                'width': 25,
                'buttonText': " ",
                'formData': {
                    'timestamp': date_time,
                    'token': 'sayim' + date_time + 'sayim'
                },
                'uploadScript': 'assets/uploadfive/uploadifive.php',
                'removeCompleted': true,
                'onUploadComplete': function(file, data) {
                    if (data == '2') {
                        alert('Lütfen Geçerli Fortmatta Yükleme Yapınız.');
                    } else if (data == '3') {
                        alert('İşlem Başarısız.(Dosya Boyutu İle Alakalı Olabilir.)');
                    } else {
                        var id = $(this).attr('data-id');
                        $('input[name="img' + id + '"]').val(data);
                        $('#url').val('<?php echo $site; ?>imgupload/' + data);
                        $('.uploaddis[data-id="' + id + '"] .yuklendi img').attr('src', '../../imgupload/' + data);
                        $('.uploaddis[data-id="' + id + '"]').removeClass('aktif');
                        $('.uploaddis[data-id="' + id + '"]').addClass('pasif');
                    }
                }
            });
            $('.upload1 .icon span').uploadifive({
                'auto': true,
                'queueID': 'queue',
                'fileSizeLimit': '15360KB',
                'fileExt': '*.jpg;*.jpeg;*.JPG;*.JPEG;*.png;*.PNG;*.svg;*.gif',
                'width': 25,
                'buttonText': " ",
                'formData': {
                    'timestamp': date_time,
                    'token': 'sayim' + date_time + 'sayim'
                },
                'uploadScript': 'assets/uploadfive/uploadifive.php',
                'removeCompleted': true,
                'onUploadComplete': function(file, data) {
                    if (data == '2') {
                        alert('Lütfen Geçerli Fortmatta Yükleme Yapınız.');
                    } else if (data == '3') {
                        alert('İşlem Başarısız.(Dosya Boyutu İle Alakalı Olabilir.)');
                    } else {
                        var say = $('#imgupload .col-md-3').length;
                        $('#imgupload').append('\
                            <div class="col-md-3" data-resim-dis-id="' + say + '">\
                                    <div class="uploaddis pasif" style="float:left;">\
                                      <div class="yuklendi">\
                                          <img src="../../imgupload/' + data + '" width="100%">\
                                          <div class="icon" data-resim-sil-id="' + say + '"><span class="fa fa-trash"></span></div>\
                                          <input type="hidden" name="img[]" value="' + data + '" required="">\
                                      </div>\
                                    </div>\
                                </div>\
                        ');
                    }
                }
            });
            $(document).on('click', '[data-resim-sil-id]', function() {
                $('[data-resim-dis-id="' + $(this).attr('data-resim-sil-id') + '"]').remove();
            });
            $('.yuklendi .icon').click(function() {
                var id = $(this).attr('data-id');
                $('.uploaddis[data-id="' + id + '"]').removeClass('pasif');
                $('.uploaddis[data-id="' + id + '"]').addClass('aktif');
                $('input[name="img' + id + '"]').val('');
                $('.uploaddis[data-id="' + id + '"] .yuklendi img').attr('src', '');
            });
        });
    </script>
    <script src="assets/plugins/jquery-sparkline/jquery.sparkline.min.js"></script>
    <script src="assets/plugins/datatables/jquery.dataTables.min.js"></script>
    <script src="assets/plugins/datatables/dataTables.bootstrap.js"></script>
    <script src="assets/plugins/datatables/dataTables.responsive.min.js"></script>
    <script src="assets/plugins/datatables/responsive.bootstrap.min.js"></script>
    <script src="assets/plugins/datatables/jquery.dataTables.min.js"></script>
    <script src="assets/plugins/datatables/dataTables.bootstrap.js"></script>
    <script src="assets/plugins/datatables/dataTables.buttons.min.js"></script>
    <script src="assets/plugins/datatables/buttons.bootstrap.min.js"></script>
    <script src="assets/plugins/datatables/jszip.min.js"></script>
    <script src="assets/plugins/datatables/pdfmake.min.js"></script>
    <script src="assets/plugins/datatables/vfs_fonts.js"></script>
    <script src="assets/plugins/datatables/buttons.html5.min.js"></script>
    <script src="assets/plugins/datatables/buttons.print.min.js"></script>
    <script src="assets/plugins/datatables/dataTables.fixedHeader.min.js"></script>
    <script src="assets/plugins/datatables/dataTables.keyTable.min.js"></script>
    <script src="assets/plugins/datatables/dataTables.responsive.min.js"></script>
    <script src="assets/plugins/datatables/responsive.bootstrap.min.js"></script>
    <script src="assets/plugins/datatables/dataTables.scroller.min.js"></script>
    <script src="assets/pages/dashborad.js"></script>
    <script src="assets/pages/datatables.init.js"></script>
    <script src="ckeditor-2/ckeditor.js"></script>
    <script src="assets/js/app.js"></script>
</body>
</html>