<?php
include("include/baglan.php");
include("include/fonksiyonlar.php");
ob_start();
session_start();
oturumkontrolana();

if($_POST['sss_ekle'] and $_GET['islem']==""){

$sira=$_POST['sira'];
$adi=$_POST['adi'];
$adi_en=$_POST['adi_en'];
$adi_ru=$_POST['adi_ru'];
$adi_ar=$_POST['adi_ar'];
$adi_de=$_POST['adi_de'];
$adi_it=$_POST['adi_it'];
$aciklama=$_POST['aciklama'];
	
function seflink($string){
$find = array('ß','Ä','ä','Ç', 'Ş', 'Ğ', 'Ü', 'İ', 'Ö', 'ç', 'ş', 'ğ', 'ü', 'ö', 'ı', '+', '#');
$replace = array('ss','ae', 'ae','c', 's','g', 'u', 'i', 'o', 'c', 's', 'g', 'u', 'o', 'i', 'plus', 'sharp');
$string = strtolower(str_replace($find, $replace, $string));
$string = preg_replace("@[^A-Za-z0-9\-_\.\+]@i", ' ', $string);
$string = trim(preg_replace('/\s+/', ' ', $string));
$string = str_replace(' ', '-', $string);
return $string;
}
$adii= seflink($adi);
$adiien= seflink($adi_en);
$adiiar= seflink($adi_ar);
$adiiru= seflink($adi_ru);
$adiide= seflink($adi_de);
$adiiit= seflink($adi_it);
	
$aciklama_en=$_POST['aciklama_en'];
$aciklama_ru=$_POST['aciklama_ru'];
$aciklama_ar=$_POST['aciklama_ar'];
$aciklama_de=$_POST['aciklama_de'];
$aciklama_it=$_POST['aciklama_it'];
$linki=$_POST['linki'];
$kategori=$_POST['kategori'];

$kat=implode(",",$kategori);

$durum=$_POST['durum'];
$sayfa_title=$_POST['sayfa_title'];
$sayfa_title_en=$_POST['sayfa_title_en'];
$sayfa_title_ar=$_POST['sayfa_title_ar'];
$sayfa_title_ru=$_POST['sayfa_title_ru'];
$sayfa_title_de=$_POST['sayfa_title_de'];
$sayfa_title_it=$_POST['sayfa_title_it'];

$sayfa_description=$_POST['sayfa_description'];
$sayfa_description_en=$_POST['sayfa_description_en'];
$sayfa_description_ar=$_POST['sayfa_description_ar'];
$sayfa_description_ru=$_POST['sayfa_description_ru'];
$sayfa_description_de=$_POST['sayfa_description_de'];
$sayfa_description_it=$_POST['sayfa_description_it'];	
$ozellik=$_POST['ozellik'];
$etiket=$_POST['etiket'];
$seo=$_POST['seo'];
$seoen=$_POST['seoen'];
$seoar=$_POST['seoar'];
$seoru=$_POST['seoru'];
$seode=$_POST['seode'];
$seoit=$_POST['seoit'];
	
$klasord="lib/images/sss/";
	$resim_tmpd = $_FILES['dosya']['tmp_name'];
	if(empty($resim_tmpd))
	{
		$resimd = "resim-yok";
	}
	else
	{
		
		if ($_FILES["dosya"]["type"] =="image/gif" || $_FILES["dosya"]["type"] =="image/png"|| $_FILES["dosya"]["type"] =="image/jpg"|| $_FILES["dosya"]["type"] =="image/jpeg") 
		{
			$random = rand(0,999);
			
			$resimd = $random."-".$adii.".".substr($_FILES['dosya']['name'], -3);
			
			move_uploaded_file($_FILES['dosya']['tmp_name'],$klasord."/".$resimd);
			$resimdd=implode(',',$resimd);
		}
		else
		{
			$bilgi = '<div class="alert alert-error">
										<button class="close" data-dismiss="alert">×</button>
										<strong>Hata !</strong> Lütfen  Uygun Formatta Bir Resim Dosyası Seçiniz ( .jpg - .gif - .png ).
			</div>';
		}
	}
	
	$klasor="lib/images/sss/";
	$resim_tmp = $_FILES['resim']['tmp_name'];
	if(empty($resim_tmp))
	{
		$resim = "resim-yok";
	}
	else
	{
			$random = rand(0,999);			
			$resim = $random."-".$adii.".".substr($_FILES['resim']['name'], -3);		
			move_uploaded_file($_FILES['resim']['tmp_name'],$klasor."/".$resim);
	}



$anasayfa= $_POST['anasayfa'];

$ekle=$db->prepare("insert into sss set anasayfa=:anasayfa,sira=:sira,adi=:adi,adi_en=:adi_en,adi_ar=:adi_ar,adi_ru=:adi_ru,adi_it=:adi_it,adi_de=:adi_de,aciklama=:aciklama,aciklama_it=:aciklama_it,aciklama_en=:aciklama_en,aciklama_ar=:aciklama_ar,aciklama_de=:aciklama_de,aciklama_ru=:aciklama_ru,durum=:durum,linki=:linki,kategori=:kategori,resim=:resim,sayfa_title=:sayfa_title,sayfa_title_en=:sayfa_title_en,sayfa_title_ar=:sayfa_title_ar,sayfa_title_ru=:sayfa_title_ru,sayfa_title_de=:sayfa_title_de,sayfa_title_it=:sayfa_title_it,sayfa_description=:sayfa_description,sayfa_description_en=:sayfa_description_en,sayfa_description_ar=:sayfa_description_ar,sayfa_description_ru=:sayfa_description_ru,sayfa_description_de=:sayfa_description_de,sayfa_description_it=:sayfa_description_it,etiket=:etiket,seo=:seo,seoen=:seoen,seoar=:seoar,seoru=:seoru,seode=:seode,seoit=:seoit,ozellik=:ozellik,coklu_resim=:coklu_resim,tarih=:tarih");

$simdi=$ekle->execute(array("anasayfa"=>$anasayfa,"sira"=>$sira,"adi"=>$adi,"adi_en"=>$adi_en,"adi_de"=>$adi_de,"adi_it"=>$adi_it,"adi_ar"=>$adi_ar,"adi_ru"=>$adi_ru,"ozellik"=>$ozellik,"durum"=>$durum,"resim"=>$resim,"aciklama"=>$aciklama,"aciklama_en"=>$aciklama_en,"aciklama_ru"=>$aciklama_ru,"aciklama_de"=>$aciklama_de,"aciklama_it"=>$aciklama_it,"aciklama_ar"=>$aciklama_ar,"linki"=>$linki,"kategori"=>$kat,"sayfa_title"=>$sayfa_title,"sayfa_title_en"=>$sayfa_title_en,"sayfa_title_ar"=>$sayfa_title_ar,"sayfa_title_ru"=>$sayfa_title_ru,"sayfa_title_de"=>$sayfa_title_de,"sayfa_title_it"=>$sayfa_title_it,"sayfa_description"=>$sayfa_description,"sayfa_description_en"=>$sayfa_description_en,"sayfa_description_ar"=>$sayfa_description_ar,"sayfa_description_ru"=>$sayfa_description_ru,"sayfa_description_de"=>$sayfa_description_de,"sayfa_description_it"=>$sayfa_description_it,"etiket"=>$etiket,"seo"=>$adii,"seoen"=>$adiien,"seoar"=>$adiiar,"seoru"=>$adiiru,"seode"=>$adiide,"seoit"=>$adiiit,"coklu_resim"=>$resimdd,"tarih"=>$tarih));
	
	if($simdi){
	$bilgi = "<div class='alert alert-success alert-dismissible fade show' role='alert'>
	<strong>SSS Ekleme BAŞARILI!</strong> SSS eklenmiştir.
	<button type='button' class='close' data-dismiss='alert' aria-label='Close'>
		<span aria-hidden='true'>&times;</span>
	</button>
</div>";
		}
}

if(@$_POST['sss_ekle'] and $_GET['islem']=="duzenle"){
	
$id=$_GET['id'];
$sira=$_POST['sira'];
$adi=$_POST['adi'];
$adi_en=$_POST['adi_en'];
$adi_ru=$_POST['adi_ru'];
$adi_ar=$_POST['adi_ar'];
$adi_de=$_POST['adi_de'];
$adi_it=$_POST['adi_it'];

function seflink($string){
$find = array('ß','Ä','ä','Ç', 'Ş', 'Ğ', 'Ü', 'İ', 'Ö', 'ç', 'ş', 'ğ', 'ü', 'ö', 'ı', '+', '#');
$replace = array('ss','ae', 'ae','c', 's','g', 'u', 'i', 'o', 'c', 's', 'g', 'u', 'o', 'i', 'plus', 'sharp');
$string = strtolower(str_replace($find, $replace, $string));
$string = preg_replace("@[^A-Za-z0-9\-_\.\+]@i", ' ', $string);
$string = trim(preg_replace('/\s+/', ' ', $string));
$string = str_replace(' ', '-', $string);
return $string;
}

$adii= seflink($adi);
$adiien= seflink($adi_en);
$adiiar= seflink($adi_ar);
$adiiru= seflink($adi_ru);
$adiide= seflink($adi_de);
$adiiit= seflink($adi_it);
	
$aciklama=$_POST['aciklama'];
$aciklama_en=$_POST['aciklama_en'];
$aciklama_ru=$_POST['aciklama_ru'];
$aciklama_ar=$_POST['aciklama_ar'];
$aciklama_de=$_POST['aciklama_de'];
$aciklama_it=$_POST['aciklama_it'];
$linki=$_POST['linki'];
$kategori=$_POST['kategori'];

$implode=implode(",",$kategori);

$durum=$_POST['durum'];
$sayfa_title=$_POST['sayfa_title'];
$sayfa_title_en=$_POST['sayfa_title_en'];
$sayfa_title_ar=$_POST['sayfa_title_ar'];
$sayfa_title_ru=$_POST['sayfa_title_ru'];
$sayfa_title_de=$_POST['sayfa_title_de'];
$sayfa_title_it=$_POST['sayfa_title_it'];
$sayfa_description=$_POST['sayfa_description'];
$sayfa_description_en=$_POST['sayfa_description_en'];
$sayfa_description_ar=$_POST['sayfa_description_ar'];
$sayfa_description_ru=$_POST['sayfa_description_ru'];
$sayfa_description_de=$_POST['sayfa_description_de'];
$sayfa_description_it=$_POST['sayfa_description_it'];	
$ozellik=$_POST['ozellik'];
$etiket=$_POST['etiket'];
$seo=$_POST['seo'];
$seoen=$_POST['seoen'];
$seoar=$_POST['seoar'];
$seoru=$_POST['seoru'];
$seode=$_POST['seode'];
$seoit=$_POST['seoit'];	
	
	
	
	$klasor="lib/images/sss/";
	$resim_tmp = $_FILES['resim']['tmp_name'];
	
	if(empty($resim_tmp))
	{
		$duzenlenecek_id = $_GET['id'];
		$ayar_kaydi = $db->query("SELECT * FROM sss WHERE id = '$id'")->fetch(PDO::FETCH_ASSOC);
		$resim = $ayar_kaydi['resim'];
	}
	else
	{
			$ayar_kaydi = $db->query("SELECT * FROM sss WHERE id = '$duzenlenecek_id'")->fetch(PDO::FETCH_ASSOC);
  			if($ayar_kaydi['resim']!="resim-yok")
			{
			  unlink("lib/images/sss/".$ayar_kaydi['resim']);	  
			}
			$random = rand(0,999);
			$resim = $random."-".$adii.".".substr($_FILES['resim']['name'], -3);
			move_uploaded_file($_FILES['resim']['tmp_name'],$klasor."/".$resim);
	}

	

$anasayfa= $_POST['anasayfa'];

$guncelle=$db->prepare("update sss set anasayfa=:anasayfa,sira=:sira,adi=:adi,adi_en=:adi_en,adi_ar=:adi_ar,adi_ru=:adi_ru,adi_it=:adi_it,adi_de=:adi_de,aciklama=:aciklama,aciklama_it=:aciklama_it,aciklama_en=:aciklama_en,aciklama_ar=:aciklama_ar,aciklama_de=:aciklama_de,aciklama_ru=:aciklama_ru,durum=:durum,linki=:linki,kategori=:kategori,resim=:resim,sayfa_title=:sayfa_title,sayfa_title_en=:sayfa_title_en,sayfa_title_ar=:sayfa_title_ar,sayfa_title_ru=:sayfa_title_ru,sayfa_title_de=:sayfa_title_de,sayfa_title_it=:sayfa_title_it,sayfa_description=:sayfa_description,sayfa_description_en=:sayfa_description_en,sayfa_description_ar=:sayfa_description_ar,sayfa_description_ru=:sayfa_description_ru,sayfa_description_de=:sayfa_description_de,sayfa_description_it=:sayfa_description_it,etiket=:etiket,seo=:seo,seoen=:seoen,seoar=:seoar,seoru=:seoru,seode=:seode,seoit=:seoit,ozellik=:ozellik,coklu_resim=:coklu_resim,tarih=:tarih where id=:id");

$simdii=$guncelle->execute(array("anasayfa"=>$anasayfa,"sira"=>$sira,"adi"=>$adi,"adi_en"=>$adi_en,"adi_de"=>$adi_de,"adi_it"=>$adi_it,"adi_ar"=>$adi_ar,"adi_ru"=>$adi_ru,"ozellik"=>$ozellik,"durum"=>$durum,"resim"=>$resim,"aciklama"=>$aciklama,"aciklama_en"=>$aciklama_en,"aciklama_ru"=>$aciklama_ru,"aciklama_de"=>$aciklama_de,"aciklama_it"=>$aciklama_it,"aciklama_ar"=>$aciklama_ar,"linki"=>$linki,"kategori"=>$implode,"sayfa_title"=>$sayfa_title,"sayfa_title_en"=>$sayfa_title_en,"sayfa_title_ar"=>$sayfa_title_ar,"sayfa_title_ru"=>$sayfa_title_ru,"sayfa_title_de"=>$sayfa_title_de,"sayfa_title_it"=>$sayfa_title_it,"sayfa_description"=>$sayfa_description,"sayfa_description_en"=>$sayfa_description_en,"sayfa_description_ar"=>$sayfa_description_ar,"sayfa_description_ru"=>$sayfa_description_ru,"sayfa_description_de"=>$sayfa_description_de,"sayfa_description_it"=>$sayfa_description_it,"etiket"=>$etiket,"seo"=>$adii,"seoen"=>$adiien,"seoar"=>$adiiar,"seoru"=>$adiiru,"seode"=>$adiide,"seoit"=>$adiiit,"coklu_resim"=>$coklu_resim,"tarih"=>$tarih,"id"=>$id));
	
}

if($simdii){
$bilgi = "<div class='alert alert-success alert-dismissible fade show' role='alert'>
	<strong> SSS Güncelleme BAŞARILI!</strong> SSS Güncellenmiştir.
	<button type='button' class='close' data-dismiss='alert' aria-label='Close'>
		<span aria-hidden='true'>&times;</span>
	</button>
</div>";
}

if(@$_GET['islem']=="duzenle"){
	$idd=$_GET['id'];
	$guncelle=$db->query("select * from sss where id='$idd'")->fetch(PDO::FETCH_ASSOC);
}

$deger=$db->query("select * from sss order by id desc limit 1")->fetch(PDO::FETCH_ASSOC);
$sira=$deger['sira']+1;
$idim=$deger['id']+1;
$id=$_SESSION['id'];
$hesabim=$db->query("select * from yonetici where id='$id'")->fetch(PDO::FETCH_ASSOC);
?>

<!DOCTYPE html>
<html lang="tr">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>
	<?php
	if($_GET['islem']=="duzenle"){
	?>
	<?=$guncelle['adi']?> Düzenle <?php } else {?>
	<?=$isimler['sss']?> Ekle <?php } ?>- <?=$ayar['site_title']?>
	</title>
	<link rel="stylesheet" href="assets/vendors/core/core.css">
	<link rel="stylesheet" href="assets/vendors/sweetalert2/sweetalert2.min.css">
	<link rel="stylesheet" href="assets/vendors/select2/select2.min.css">
	<link rel="stylesheet" href="assets/vendors/jquery-tags-input/jquery.tagsinput.min.css">
	<link rel="stylesheet" href="assets/vendors/dropzone/dropzone.min.css">
	<link rel="stylesheet" href="assets/vendors/dropify/dist/dropify.min.css">
	<link rel="stylesheet" href="assets/vendors/bootstrap-colorpicker/bootstrap-colorpicker.min.css">
	<link rel="stylesheet" href="assets/vendors/bootstrap-datepicker/bootstrap-datepicker.min.css">
	<link rel="stylesheet" href="assets/vendors/font-awesome/css/font-awesome.min.css">
	<link rel="stylesheet" href="assets/vendors/tempusdominus-bootstrap-4/tempusdominus-bootstrap-4.min.css">
	<link rel="stylesheet" href="drop/assets/dropzone.css">
	<link rel="stylesheet" href="assets/fonts/feather-font/css/iconfont.css">
	<link rel="stylesheet" href="assets/vendors/flag-icon-css/css/flag-icon.min.css">
	<link rel="stylesheet" href="assets/css/demo_2/style.css">
	<link rel="shortcut icon" href="lib/images/logo/<?=$ayar['favicon']?>" />
</head>
<body>
	<div class="main-wrapper">

		<?php include("include/menu.php");?>
    
	
		<div class="page-wrapper">
				
		
			<?php include("include/header.php");?>
			<div class="page-content">

				<nav class="page-breadcrumb">
					<ol class="breadcrumb">
						<li class="breadcrumb-item"><a href="./">Anasayfa</a></li>
						<li class="breadcrumb-item active" aria-current="page"><?=$isimler['sss']?> Ekle</li>
					</ol>
				</nav>

				<div class="row">
					<div class="col-md-12 grid-margin stretch-card">
                    
                    
						<div class="card">
							<div class="card-body">
								<h6 class="card-title"><?=$isimler['sss']?> Bilgilerini Giriniz</h6>
                                 
                                <?=$bilgi?>
								<form class="cmxform" method="post" enctype="multipart/form-data" >
								  
                       <div class="aside-body">
                        <ul class="nav nav-tabs mt-3" role="tablist">
                          <li class="nav-item">
                            <a class="nav-link active" id="chats-tab" data-toggle="tab" href="#chats" role="tab" aria-controls="chats" aria-selected="true">
                              <div class="d-flex flex-row flex-lg-column flex-xl-row align-items-center">
                                <i data-feather="message-square" class="icon-sm mr-sm-2 mr-lg-0 mr-xl-2 mb-md-1 mb-xl-0"></i>
                                <p class="d-none d-sm-block"><?=$isimler['sss']?> Bilgileri</p>
                              </div>
                            </a>
                          </li>
                          
						  <?php
         if($izin['sss_1']==0){
		 ?>
                          <li class="nav-item">
                            <a class="nav-link" id="calls-tab" data-toggle="tab" href="#calls" role="tab" aria-controls="calls" aria-selected="false">
                              <div class="d-flex flex-row flex-lg-column flex-xl-row align-items-center">
                                <i data-feather="image" class="icon-sm mr-sm-2 mr-lg-0 mr-xl-2 mb-md-1 mb-xl-0"></i>
                                <p class="d-none d-sm-block">Çoklu Resim Alanı</p>
                              </div>
                            </a>
                          </li>
                         <?php }?> 
                          <li class="nav-item">
                            <a class="nav-link" id="contacts-tab" data-toggle="tab" href="#contacts" role="tab" aria-controls="contacts" aria-selected="false">
                              <div class="d-flex flex-row flex-lg-column flex-xl-row align-items-center">
                                <i data-feather="users" class="icon-sm mr-sm-2 mr-lg-0 mr-xl-2 mb-md-1 mb-xl-0"></i>
                                <p class="d-none d-sm-block">Seo Ayarları</p>
                              </div>
                            </a>
                          </li>
                        </ul>
                        <div class="tab-content mt-3">
                          <div class="tab-pane fade show active" id="chats" role="tabpanel" aria-labelledby="chats-tab">
                            <div>
                             
							<div class="form-group">
							<label for="exampleInputNumber1"><?=$isimler['sss']?> Sırası</label>
							<input type="number" class="form-control" min-value="0"  name="sira" <?php if(@$_GET['islem']=="duzenle"){?> value="<?=$guncelle['sira']?>" <?php } else {?> value="<?=$sira?>" <?php }?>>
							</div>

							<div class="form-group">
							<label ><?=$isimler['sss']?> Adı <?=$isimler['tr']?></label>
							<input type="text" class="form-control" id="adi"  name="adi" value="<?=$guncelle['adi']?>">
							</div>

							<?php
							if($izin['en']==0){
							?>
							<div class="form-group">
							<label for="exampleInputText1"><?=$isimler['sss']?>  Adı <?=$isimler['en']?></label>
							<input type="text" class="form-control"   name="adi_en" value="<?=$guncelle['adi_en']?>">
							</div>
							<?php }?>

							<?php
							if($izin['ar']==0){
							?>
							<div class="form-group">
							<label for="exampleInputText1"><?=$isimler['sss']?>  Adı <?=$isimler['ar']?></label>
							<input type="text" class="form-control"   name="adi_ar" value="<?=$guncelle['adi_ar']?>">
							</div>
							<?php }?>

							<?php
							if($izin['ru']==0){
							?>
							<div class="form-group">
							<label for="exampleInputText1"><?=$isimler['sss']?> Adı  <?=$isimler['ru']?></label>
							<input type="text" class="form-control" name="adi_ru" value="<?=$guncelle['adi_ru']?>">
							</div>
							<?php }?>

							<?php
							if($izin['de']==0){
							?>
							<div class="form-group">
							<label for="exampleInputText1"><?=$isimler['sss']?>  Adı <?=$isimler['de']?></label>
							<input type="text" class="form-control"   name="adi_de" value="<?=$guncelle['adi_de']?>">
							</div>
							<?php }?>

							<?php
							if($izin['it']==0){
							?>
							<div class="form-group">
							<label for="exampleInputText1"><?=$isimler['sss']?> Adı <?=$isimler['it']?></label>
							<input type="text" class="form-control"  name="adi_it" value="<?=$guncelle['adi_it']?>">
							</div>
							<?php }?>

							<div class="form-group">
							<label for="exampleInputText1">Linki</label>
							<input type="text" class="form-control"   name="linki" value="<?=$guncelle['linki']?>">
							</div>
 
									<div class="row">
										<div class="col-md-12 stretch-card">
											<div class="card">
												<div class="card-body">
													<h6 class="card-title"><?=$isimler['sss']?> Resmi</h6>
													<input type="file" id="myDropify" class="border" name="resim" <?php if(@$_GET['islem']=="duzenle"){?> data-default-file="lib/images/sss/<?=$guncelle['resim']?>" <?php }?>/>
												</div>
											</div>
										</div>
									</div>
                
              
									<div class="form-group">
										<div class="form-check">
											<label class="form-check-label">
												<input type="radio" class="form-check-input" <?php if($guncelle['durum']==0){?> checked <?php }?> name="durum" id="optionsRadios" value="0">
												Göster
											</label>
										</div>
										<div class="form-check">
											<label class="form-check-label">
												<input type="radio" <?php if($guncelle['durum']==1){?> checked <?php }?> class="form-check-input" name="durum" id="optionsRadios1" value="1">
												Gösterme
											</label>
										</div>
									</div>				
									
									<div class="form-group">
										<div class="form-check">
											<label class="form-check-label">
												<input type="radio" class="form-check-input" <?php if($guncelle['ozellik']==0){?> checked <?php }?> name="ozellik" id="optionsRadios" value="0">
												Özellik Göster
											</label>
										</div>
										<div class="form-check">
											<label class="form-check-label">
												<input type="radio" <?php if($guncelle['ozellik']==1){?> checked <?php }?> class="form-check-input" name="ozellik" id="optionsRadios1" value="1">
												Özellik Gösterme
											</label>
										</div>
									</div>
                                    
									<div class="form-group">
										<div class="form-check">
											<label class="form-check-label">
												<input type="radio" class="form-check-input" <?php if($guncelle['anasayfa']==0){?> checked <?php }?> name="anasayfa" id="optionsRadios" value="0">
												Anasayfa Göster
											</label>
										</div>
										<div class="form-check">
											<label class="form-check-label">
												<input type="radio" <?php if($guncelle['anasayfa']==1){?> checked <?php }?> class="form-check-input" name="anasayfa" id="optionsRadios1" value="1">
												Anasayfa Gösterme
											</label>
										</div>
									</div>
                                    
									<div class="row">
										<div class="col-md-12 grid-margin stretch-card">
											<div class="card">
												<div class="card-body">
													<h4 class="card-title"><?=$isimler['sss']?> Açıklaması <?=$isimler['tr']?></h4>
													<textarea class="ckeditor" name="aciklama"  rows="10" value=""><?=$guncelle['aciklama']?></textarea>
												</div>
											</div>
										</div>
									</div>
                
									<?php
									if($izin['en']==0){
									?>
									<div class="row">
										<div class="col-md-12 grid-margin stretch-card">
											<div class="card">
												<div class="card-body">
													<h4 class="card-title"><?=$isimler['sss']?> Açıklaması <?=$isimler['en']?></h4>
													
													<textarea class="ckeditor" name="aciklama_en"  rows="10"><?=$guncelle['aciklama_en']?></textarea>
												</div>
											</div>
										</div>
									</div>
									<?php }?>
									
								   <?php
								   if($izin['ar']==0){
								   ?>
									<div class="row">
										<div class="col-md-12 grid-margin stretch-card">
											<div class="card">
												<div class="card-body">
													<h4 class="card-title"><?=$isimler['sss']?> Açıklaması <?=$isimler['ar']?></h4>
													
									<textarea class="ckeditor" name="aciklama_ar"  rows="10" value=""><?=$guncelle['aciklama_ar']?></textarea>
												</div>
											</div>
										</div>
									</div>
									<?php }?>
									
								   <?php
								   if($izin['ru']==0){
								   ?>
									<div class="row">
										<div class="col-md-12 grid-margin stretch-card">
											<div class="card">
												<div class="card-body">
													<h4 class="card-title"><?=$isimler['sss']?> Açıklaması <?=$isimler['ru']?></h4>
													
													<textarea class="ckeditor" name="aciklama_ru"  rows="10"><?=$guncelle['aciklama_ru']?></textarea>
												</div>
											</div>
										</div>
									</div>
									<?php }?>
									
								   <?php
								   if($izin['de']==0){
								   ?>
									<div class="row">
										<div class="col-md-12 grid-margin stretch-card">
											<div class="card">
												<div class="card-body">
													<h4 class="card-title"><?=$isimler['sss']?> Açıklaması <?=$isimler['de']?></h4>
													
													<textarea class="ckeditor" name="aciklama_de"  rows="10"><?=$guncelle['aciklama_de']?></textarea>
												</div>
											</div>
										</div>
									</div>
									<?php }?>
									
									<?php
									if($izin['it']==0){
									?>
									<div class="row">
										<div class="col-md-12 grid-margin stretch-card">
											<div class="card">
												<div class="card-body">
													<h4 class="card-title"><?=$isimler['sss']?> Açıklaması <?=$isimler['it']?></h4>
													
													<textarea class="ckeditor" name="aciklama_it"  rows="10"><?=$guncelle['aciklama_it']?></textarea>
												</div>
											</div>
										</div>
									</div>
									<?php }?>
                            </div>
                          </div>
                          <div class="tab-pane fade" id="calls" role="tabpanel" aria-labelledby="calls-tab">
                           
							<div class="row">
								<div class="col-md-12 stretch-card grid-margin grid-margin-md-0">
									<div class="card">
										<div class="card-body">
											<h6 class="card-title">Buradan birden fazla resim yükleyebilirsiniz.</h6>
											<a href="javascript:NewWindow=window.open('upload.php?urun_id=<?php if($_GET['islem']=="duzenle"){echo $guncelle['id'];}else{echo $idim;}?>','newWin','width=468,height=600,left=0,top=0 ,toolbar=No,location=No,scrollbars=No,status=No,re sizable=No,fullscreen=No'); NewWindow.focus();void(0);">Sınırsız Resim Eklemek İçin Tıklayınız.</a>
										</div>
									</div>
								</div>
							</div>
							<br>
                          </div>
                          <div class="tab-pane fade" id="contacts" role="tabpanel" aria-labelledby="contacts-tab">
                            
							<div class="form-group">
							<label for="exampleInputText1">Sayfa Title <?=$isimler['tr']?></label>
							<input type="text" class="form-control" id="exampleInputText1"  name="sayfa_title" value="<?=$guncelle['sayfa_title']?>">
							</div>

							<?php
							if($izin['en']==0){
							?>
							<div class="form-group">
							<label for="exampleInputText1">Sayfa Title <?=$isimler['en']?></label>
							<input type="text" class="form-control" id="exampleInputText1"  name="sayfa_title_en" value="<?=$guncelle['sayfa_title_en']?>">
							</div>
							<?php }?>  

							<?php
							if($izin['ar']==0){
							?>
							<div class="form-group">
							<label for="exampleInputText1">Sayfa Title <?=$isimler['ar']?></label>
							<input type="text" class="form-control" id="exampleInputText1"  name="sayfa_title_ar" value="<?=$guncelle['sayfa_title_ar']?>">
							</div>
							<?php }?> 

							<?php
							if($izin['ru']==0){
							?>
							<div class="form-group">
							<label for="exampleInputText1">Sayfa Title <?=$isimler['ru']?></label>
							<input type="text" class="form-control" id="exampleInputText1"  name="sayfa_title_ru" value="<?=$guncelle['sayfa_title_ru']?>">
							</div>
							<?php }?> 


							<?php
							if($izin['de']==0){
							?>
							<div class="form-group">
							<label for="exampleInputText1">Sayfa Title <?=$isimler['de']?></label>
							<input type="text" class="form-control" id="exampleInputText1"  name="sayfa_title_de" value="<?=$guncelle['sayfa_title_de']?>">
							</div>
							<?php }?> 

							<?php
							if($izin['it']==0){
							?>
							<div class="form-group">
							<label for="exampleInputText1">Sayfa Title <?=$isimler['it']?></label>
							<input type="text" class="form-control" id="Description"  name="sayfa_title_it" value="<?=$guncelle['sayfa_title_it']?>">
							</div>
							<?php }?> 

							<div class="form-group">
							<label for="exampleInputText1">Sayfa Description <?=$isimler['tr']?></label>
							<input type="text" class="form-control" id="exampleInputText1"  name="sayfa_description" value="<?=$guncelle['sayfa_description']?>">
							</div>

							<?php
							if($izin['en']==0){
							?>
							<div class="form-group">
							<label for="exampleInputText1">Sayfa Description <?=$isimler['en']?></label>
							<input type="text" class="form-control" id="exampleInputText1"  name="sayfa_description_en" value="<?=$guncelle['sayfa_description_en']?>">
							</div>
							<?php }?>

							<?php
							if($izin['ar']==0){
							?>
							<div class="form-group">
							<label for="exampleInputText1">Sayfa Description <?=$isimler['ar']?></label>
							<input type="text" class="form-control" id="exampleInputText1"  name="sayfa_description_ar" value="<?=$guncelle['sayfa_description_ar']?>">
							</div>
							<?php }?>

							<?php
							if($izin['ru']==0){
							?>
							<div class="form-group">
							<label for="exampleInputText1">Sayfa Description <?=$isimler['ru']?></label>
							<input type="text" class="form-control" id="exampleInputText1"  name="sayfa_description_ru" value="<?=$guncelle['sayfa_description_ru']?>">
							</div>
							<?php }?>

							<?php
							if($izin['de']==0){
							?>
							<div class="form-group">
							<label for="exampleInputText1">Sayfa Description <?=$isimler['de']?></label>
							<input type="text" class="form-control" id="exampleInputText1"  name="sayfa_description_de" value="<?=$guncelle['sayfa_description_de']?>">
							</div>
							<?php }?>

							<?php
							if($izin['it']==0){
							?>
							<div class="form-group">
							<label for="exampleInputText1">Sayfa Description <?=$isimler['it']?></label>
							<input type="text" class="form-control" id="exampleInputText1"  name="sayfa_description_it" value="<?=$guncelle['sayfa_description_it']?>">
							</div>
							<?php }?>
       
                            <div class="row">
								<div class="col-md-6 grid-margin stretch-card">
									<div class="card">
										<div class="card-body">
											<h6 class="card-title">Etiketler</h6>
											<div>
												<input name="etiket" id="tags" value="<?=$guncelle['etiket']?>" />
											</div>
										</div>
									</div>
								</div>
							</div>
							
                          </div>
                        </div>
                      </div>       
                                   
		<input class="btn btn-primary" type="submit"<?php if(@$_GET['islem']=="duzenle"){?> value="<?=$isimler['sss']?> Güncelle" <?php } else {?> value="<?=$isimler['sss']?> Ekle" <?php }?> name="sss_ekle">
								</form>
                                <br>
                                
                         
							</div>
						</div>
					</div>
				</div>
				
				
			</div>

			<?php include("include/footer.php");?>
	
		</div>
	</div>  
	
	<script src="ckeditor-2/ckeditor.js"></script>
	<script src="assets/vendors/core/core.js"></script>
	<script src="assets/vendors/jquery-validation/jquery.validate.min.js"></script>
	<script src="assets/vendors/bootstrap-maxlength/bootstrap-maxlength.min.js"></script>
	<script src="assets/vendors/inputmask/jquery.inputmask.min.js"></script>
	<script src="assets/vendors/select2/select2.min.js"></script>
	<script src="assets/vendors/typeahead.js/typeahead.bundle.min.js"></script>
	<script src="assets/vendors/jquery-tags-input/jquery.tagsinput.min.js"></script>
	<script src="assets/vendors/dropzone/dropzone.min.js"></script>
	<script src="assets/vendors/dropify/dist/dropify.min.js"></script>
	<script src="assets/vendors/bootstrap-colorpicker/bootstrap-colorpicker.min.js"></script>
	<script src="assets/vendors/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
	<script src="assets/vendors/moment/moment.min.js"></script>
	<script src="assets/vendors/tempusdominus-bootstrap-4/tempusdominus-bootstrap-4.js"></script>
	<script src="assets/vendors/feather-icons/feather.min.js"></script>
	<script src="assets/js/template.js"></script>
	<script src="assets/vendors/tinymce/tinymce.min.js"></script>
	<script src="assets/js/form-validation.js"></script>
	<script src="assets/js/bootstrap-maxlength.js"></script>
	<script src="assets/js/inputmask.js"></script>
	<script src="assets/js/select2.js"></script>
	<script src="assets/js/typeahead.js"></script>
	<script src="assets/js/tags-input.js"></script>
	<script src="assets/js/dropzone.js"></script>
	<script src="assets/js/dropify.js"></script>
	<script src="assets/js/bootstrap-colorpicker.js"></script>
	<script src="assets/js/datepicker.js"></script>
	<script src="assets/js/timepicker.js"></script>
	<script src="assets/js/tinymce.js"></script>
</body>
</html>