<?php if(!defined("Hacking")){die("404 Not Found"); } ?>
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="author" content="Yakup CEVIK - 2018 - www.showyazilim.com">
<title>Yönetim Paneli</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Oswald:700,400" rel="stylesheet">
<link href="lib/assets/global/plugins/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="lib/assets/global/plugins/bower_components/animate.css/animate.min.css" rel="stylesheet">
<link href="lib/assets/global/plugins/bower_components/dropzone/downloads/css/dropzone.css" rel="stylesheet">
<link href="lib/assets/global/plugins/bower_components/datatables/css/dataTables.bootstrap.css" rel="stylesheet">
<link href="lib/assets/global/plugins/bower_components/datatables/css/datatables.responsive.css" rel="stylesheet">
<link href="lib/assets/global/plugins/bower_components/fuelux/dist/css/fuelux.min.css" rel="stylesheet">
<link href="lib/assets/global/plugins/bower_components/bootstrap-tour/build/css/bootstrap-tour.min.css" rel="stylesheet">
<link href="lib/assets/admin/css/reset.css" rel="stylesheet">
<link href="lib/assets/admin/css/components.css" rel="stylesheet">
<link href="lib/assets/admin/css/plugins.css" rel="stylesheet">
<link href="lib/assets/admin/css/themes/default.theme.css" rel="stylesheet" id="theme">
<link href="lib/assets/admin/css/custom.css" rel="stylesheet">
<link rel="stylesheet" href="css/colorpicker.css" type="text/css" />
<link href="lib/assets/admin/css/layout.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="lib/assets/admin/css/jquery.tagsinput.min.css" />
<script type="text/javascript" src="lib/assets/admin/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="lib/assets/admin/js/jquery.tagsinput.min.js"></script>
<script type='text/javascript' src='lib/assets/admin/js/jquery-ui.min.js'></script>
<link rel="stylesheet" type="text/css" href="lib/assets/admin/css/jquery-ui.css" />

<style>
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}
.switch input {display:none;}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}
input:checked + .slider {
  background-color: #218838;
}
input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}
input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}
</style>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
</head>
<body class="page-session page-sound page-header-fixed page-sidebar-fixed demo-dashboard-session">
<section id="wrapper">
<header id="header">
  <div class="header-left">
  <div class="navbar-minimize-mobile left"> <i class="fa fa-bars"></i> </div>
    <div class="navbar-header animated swing"><a id="tour-1" class="navbar-brand" href="./"><b>Yönetim</b>Paneli</a></div>
  </div>
  <div class="header-right">
    <div class="navbar navbar-toolbar">
      <ul class="nav navbar-nav navbar-left">
        <li id="tour-2" class="navbar-minimize"> <a href="javascript:void(0);"> <i class="fa fa-bars"></i> </a> </li>
      </ul>
      <a class="btn btn-lg btn-info" href="../" role="button" target="_blank"> <i class="fa fa-eye"></i> &nbsp;Siteyi Göster</a>
	        <a class="btn btn-lg btn-default" title="Versiyon ve Güncelleme Bilgisi" onClick="#" role="button" target="_blank"> <i class="fa fa-info-circle" aria-hidden="true"></i> &nbsp;V4 (Update 9)</a>
      <a class="btn btn-lg btn-success" href="index.php?do=profil" role="button"><i class="fa fa-user"></i> &nbsp;Profil Ayarları</a>
      <a style="color:white;" class="btn btn-lg btn-warning" href="index.php?do=profil&sifre" role="button"><i class="fa fa-key"></i> &nbsp;Şifre Güncelle</a>
      <a class="btn btn-lg btn-danger" href="index.php?do=cikis" role="button"> <i class="fa fa-power-off"></i> &nbsp;Güvenli Çıkış</a>
     </div>
  </div>
</header>

<script type="text/javascript">
    function itemsil(gelen_id,kategori_id,itemisim,alan)
    {
      swal({
        title: 'Sil > ' + itemisim,
        html: "<hr>'" + itemisim + "' <b/><b> Kaydı Silinsin mi?",
        type: 'question',
        showCancelButton: true,
        confirmButtonColor: '#3085d6',
        cancelButtonColor: '#d33',
        confirmButtonText: 'EVET',
        cancelButtonText: 'HAYIR',
        confirmButtonClass: 'btn btn-success',
        cancelButtonClass: 'btn btn-danger',
        buttonsStyling: false,
        allowOutsideClick: false
      }).then((result) => {
        if (result.value) {
          $.ajax({
      		type: "POST",
      		url: "islemler/silmeislemi.php",	//gönderilecek sayfa.
      		data: {gelenid : gelen_id, kat_id : kategori_id, hangialan : alan},		//gidecek veriler.
      		success:function(cevap){
            var obj     = JSON.parse(cevap);
            var durum   = obj.durum;
            var id      = obj.id;
            var giturl  = obj.git;
            var mesaj   = obj.mesaj;
            if(durum=="success")
						{
              swal(
                  'Başarılı!',
                  itemisim + ' Silindi. <br> Bekleyin..',
                  'success')
                go(1, giturl);
						}
            else if(durum=="error")
            {
              swal(
                  'Hata!',
                  itemisim + ' Silinirken sorun oluştu.',
                  'error')
            }
          }
    })
        } else if (result.dismiss === 'cancel') {
          swal(
            'İptal Edildi',
            'Silme işlemi iptal edildi.',
            'error'
          )
        }
      })
    }

   function go(saniye,indexdo)
   {
     window.setTimeout(function(){
     window.location.href = "index.php?do="+indexdo;
   }, (saniye*1000));
   }

</script>

<script type="text/javascript">
  function onAddTag(tag) {
    alert("Added a tag: " + tag);
  }
  function onRemoveTag(tag) {
    alert("Removed a tag: " + tag);
  }
  function onChangeTag(input,tag) {
    alert("Changed a tag: " + tag);
  }
  $(function() {

    $('#tags_1').tagsInput({width:'auto'});
    $('#tags_2').tagsInput({
      width: 'auto',
      onChange: function(elem, elem_tags)
      {
        var languages = ['php','ruby','javascript'];
        $('.tag', elem_tags).each(function()
        {
          if($(this).text().search(new RegExp('\\b(' + languages.join('|') + ')\\b')) >= 0)
            $(this).css('background-color', '#33414E');
            $(this).css('color', 'white');
            $(this).css('border-color', '#33414E');
        });
      }
    });
    $('#tags_3').tagsInput({
      width: 'auto',
      autocomplete_url:'test/fake_json_endpoint.html' // jquery ui autocomplete requires a json endpoint
    });
  });

  function aktifkontrol(id,alan) {
    var deger = document.getElementById("toggle["+id+"]").checked;
    if(deger==true)
      var durum = "aktif";
    else
      var durum = "pasif"
    $.ajax({
		type: "POST",
		url: "islemler/aktifpasifkontrol.php",
		data: {id : id, kategori : alan, durum : durum},		//gidecek veriler.
		success:function(cevap){
    }})}


    function boyutkontrol(max_img_size)
    {
        var input = document.getElementById("resimboyut");
        if(input.files && input.files.length == 1)
        {
            if (input.files[0].size > max_img_size)
            {
                alert("Maksimum dosya boyutu " + (max_img_size/1024/1024) + "MB");
                return false;
            }
        }

        return true;
    }
    function getImg(input,max,accepted="jpeg|png"){
    	var upImg=new Image(),test,size,msg=input.form;
    	msg=msg.elements[0].children[0];
        return input.files?validate():
    	(upImg.src=input.value,upImg.onerror=upImg.onload=validate);
            "author: b.b. Troy III p.a.e";
    	function validate(){
    		test=(input.files?input.files[0]:upImg);
    		size=(test.size||test.fileSize)/1024;
    		mime=(test.type||test.mimeType);

    	mime.match(RegExp(accepted,'i'))?
    	size>max?(input.form.reset(),alert("Max dosya boyutu : " + max/1024 + " MB")):
    	msg.innerHTML="Upload ready...":
    	(input.form.reset(),msg.innerHTML=accepted+" file type(s) only!")
    	}
    }
</script>

<script>
$(document).ready(function() {
    $('.navbar-minimize-mobile').on('touchstart click', function(e) {
        e.preventDefault();
        $('body').toggleClass('page-sidebar-left-show');
    });
});
</script>