<?php
include ("ust.php");
session_start(); ## -> Oturum Başlatıldı
$giris_kontrol = $_SESSION['kullanici_id']; if(empty($giris_kontrol)){echo '<meta http-equiv="refresh" content="0;URL=index.php">';}else{


$dilgoster = g("dilgoster");
if(empty($dilgoster)){}else{$d_k_d = "&dilgoster=$dilgoster";}

## -> Silme İşlemi
$sil = g('sil');
switch($sil){
case "sil":

// İşlem Kayıt Modülü
$islemk_islem = "Bir sayaç silindi";
include("moduller/islemkayit_modul.php");

$id = g('id'); $id = mysql_real_escape_string($id);
$dosyabul=mysql_query("SELECT * FROM sayaclar WHERE id='$id'"); 
$getir2=mysql_fetch_array($dosyabul); 
$resim = $getir2['resim'];
unlink('../'.$resim.'');
$sil = mysql_query("delete from sayaclar where id='$id'") or die("Hata Olustu!");
if($sil){echo '<meta http-equiv="refresh" content="0;URL=sayaclar.php?durum=basarili'.$d_k_d.'"> ';}
}
## ->  Silme İşlemi

$icerik_getir=mysql_query("SELECT * FROM diller WHERE id='$dilgoster'"); 
$getir=mysql_fetch_array($icerik_getir); 
$dil_g_u_baslik = $getir['baslik'];
?>
				<link rel="stylesheet" href="assets/plugins/html5-editor/bootstrap-wysihtml5.css" />
				<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
			
				<div class="container-fluid">
              
				<?php // Bakım modu aktif ise tüm sayfalarda bakım uyarısı verir.
				if($geayar_bakim == "evet"){include("moduller/bakim-modul.php");} ?>
		
                <div class="row">
                <div class="col-12">

				<?php $durum = g('durum'); if($durum == "duzenleme-basarili") { ?>
				<div class="alert alert-success"> <i class="fa fa-check"></i> İşlem başarıyla gerçekleştirildi
				<button type="button" class="close" data-dismiss="alert" aria-label="Close"> </button>
				</div>
				<?php } ?>
				
				
                <div class="card">
                <div class="card-body">
				<div class="col-md-12">
				<div class="row">		
				<div class="col-md-8">
				<h4 class="card-title"><?php if(empty($dilgoster)){ echo "Türkçe";}else{ echo "$dil_g_u_baslik";}?> Sayaç Yönetimi <h4>
                <h6 class="card-subtitle">Bu alandan sitenizde bulunan sayaçları kolaylıkla yönetebilirsiniz</h6>
				</div>
				<div class="col-md-4">
				<?php 
				$islem = g("islem");
				if(empty($islem)){?>
				
				<div class="dropdown" style="float:right;margin-left:10px;">
				<button class="btn waves-effect waves-light btn-warning dropdown-toggle" type="button"  id="dropdownMenuButton2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
				<i class="fa fa-language"></i> Göster
				</button>
				<div class="dropdown-menu" aria-labelledby="dropdownMenuButton2">
				
				<?php
		
				$dil_al = mysql_query("SELECT * FROM diller ORDER BY id ASC limit 0,999");
				while($yaz=mysql_fetch_array($dil_al)){
				$dil_g_id = $yaz['id'];
				$dil_g_baslik = $yaz['baslik'];
				$dil_g_resim = $yaz['resim'];
				
				echo '<a class="dropdown-item" href="sayaclar.php?dilgoster='.$dil_g_id.'"><img src="../'.$dil_g_resim.'" width="26" height="26"></img> '.$dil_g_baslik.'</a>';
				
				}
				?>
				</div>
				</div>
				
				<a href="sayaclar.php?islem=yeni<?php echo $d_k_d;?>">
				<button type="button" class="btn waves-effect waves-light btn-primary" style="float:right;">
				<i class="fa fa-plus-circle"></i> Oluştur
				</button>
				</a>
				
				
				
				<?php }else{ ?>
				<a href="sayaclar.php?<?php echo $d_k_d;?>">
				<button type="button" class="btn waves-effect waves-light btn-danger" style="float:right;">
				<i class="fa fa-times"></i> İptal
				</button>
				</a>
				<?php } ?>
				</div>
				</div>
				</div>
                
				
				
				
				
				<!-- ################### -->
				<!-- Yeni İçerik Ekleme Alanı -->
				<!-- ################### -->



				<?php if($islem == "yeni"){?>
				
				<?php 
				## -> Yeni İçerik Ekleme
				$ileri = g('ileri');
				switch($ileri){
				case "ekle":

				$rastgele = rand(1000,9999);
				$posted = "resim";
				$baslik = p('baslik');
				$icerik = $_POST["icerik"];
				$goruntuleme = p('goruntuleme');
				$gizlinot = p('gizlinot');
				$icerik1 = $_POST["icerik"];
				$icerik = addslashes($icerik1);
				$seo_baslik = seo($baslik);
				$seo_url = $seo_baslik;
				$seo_url2 = "$seo_baslik"."-$rastgele";
				$seo_anahtarkelime = p('seo_anahtarkelime');
				$seo_aciklama = p('seo_aciklama');
				$veri_dil = p('veri_dil');
				$m4 = p('m4');
				$m5 = p('m5');
				$m6 = p('m6');
				$m7 = p('m7');
				$m8 = p('m8');
				$m9 = p('m9');
				$m10 = p('m10');
				$m11 = p('m11');
				$m12 = p('m12');
				$m13 = p('m13');
				$m14 = p('m14');
				$m15 = p('m15');
				$ekleyen = "$yonetici_kullanici_adi";
				$tarih = date('d.m.Y');


				// İşlem Kayıt Modülü
				$islemk_islem = "$baslik sayacı oluşturuldu";
				include("moduller/islemkayit_modul.php");

				$ekle_veri = mysql_query("INSERT INTO sayaclar (baslik,icerik,goruntuleme,seo_url,seo_anahtarkelime,seo_aciklama,veri_dil,ekleyen,tarih,resim,gizlinot,icerik_durum,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15)VALUES('$baslik','$icerik','$goruntuleme','$seo_url','$seo_anahtarkelime','$seo_aciklama','$veri_dil','$ekleyen','$tarih','$resim','$gizlinot','$icerik_durum','$m4','$m5','$m6','$m7','$m8','$m9','$m10','$m11','$m12','$m13','$m14','$m15')");

				if($ekle_veri){echo '<meta http-equiv="refresh" content="0;URL=sayaclar.php?durum=basarili'.$d_k_d.'"> '; }
				else{ echo '<meta http-equiv="refresh" content="0;URL=sayaclar.php?durum=hata"> '; }
				break;
				}
				## -> Yeni İçerik Ekleme
				
				?>	
				<div class="col-lg-12">
                <div class="card card-outline-inverse">
                <div class="card-header">
                <h4 class="m-b-0 text-white">Yeni Sayaç Ekle</h4>
				
                </div>
				<form action="sayaclar.php?islem=yeni&ileri=ekle<?php echo $d_k_d;?>" method="post" enctype="multipart/form-data">
		
				<div class="row p-t-20">
				<div class="col-md-12">
                <div class="col-md-12">
                <div class="form-group">
                <label class="control-label">Başlık</label>
                <input type="text" name="baslik" class="form-control" required>
                <small class="form-control-feedback"> Sayacın altında gösterilecek başlık. </small> </div>
                </div>
				
				<div class="col-md-12">
                <div class="form-group">
                <label class="control-label">Miktar</label>
                <input type="text" name="m4" class="form-control">
				<small class="form-control-feedback"> Noktalama işareti kullanmayınız</small>
                </div>
                </div>
				
				<div class="col-md-12">
                <div class="form-group">
                <label class="control-label">Sayaç Simgesi</label>
				
				<div class="row">
				<div class="col-md-3">
				
				<input type="radio" id="user-circle" name="m5" value="user-circle">
				<label for="user-circle"><i class="fa fa-user-circle"></i></label><br>
				
				<input type="radio" id="eye" name="m5" value="eye">
				<label for="eye"><i class="fa fa-eye"></i></label><br>
				
				<input type="radio" id="eercast" name="m5" value="eercast">
				<label for="eercast"><i class="fa fa-eercast"></i></label><br>
				
				<input type="radio" id="bandcamp" name="m5" value="bandcamp">
				<label for="bandcamp"><i class="fa fa-bandcamp"></i></label><br>
				
				<input type="radio" id="telegram" name="m5" value="telegram">
				<label for="telegram"><i class="fa fa-telegram"></i></label><br>
				
				<input type="radio" id="grav" name="m5" value="grav">
				<label for="grav"><i class="fa fa-grav"></i></label><br>
				
				<input type="radio" id="podcast" name="m5" value="podcast">
				<label for="podcast"><i class="fa fa-podcast"></i></label><br>
				
				<input type="radio" id="shower" name="m5" value="shower">
				<label for="shower"><i class="fa fa-shower"></i></label><br>
				
				<input type="radio" id="vcard" name="m5" value="vcard">
				<label for="vcard"><i class="fa fa-vcard"></i></label><br>
				
				<input type="radio" id="handshake-o" name="m5" value="handshake-o">
				<label for="handshake-o"><i class="fa fa-handshake-o"></i></label><br>
				
				<input type="radio" id="bank" name="m5" value="bank">
				<label for="bank"><i class="fa fa-bank"></i></label><br>
				
				<input type="radio" id="bars" name="m5" value="bars">
				<label for="bars"><i class="fa fa-bars"></i></label><br>
				
				<input type="radio" id="bell" name="m5" value="bell">
				<label for="bell"><i class="fa fa-bell"></i></label><br>
				
				<input type="radio" id="bug" name="m5" value="bug">
				<label for="bug"><i class="fa fa-bug"></i></label><br>
				
				<input type="radio" id="bullseye" name="m5" value="bullseye">
				<label for="bullseye"><i class="fa fa-bullseye"></i></label><br>
				
				<input type="radio" id="bus" name="m5" value="bus">
				<label for="bus"><i class="fa fa-bus"></i></label><br>
				</div>
				
				<div class="col-md-3">
				<input type="radio" id="server" name="m5" value="server">
				<label for="server"><i class="fa fa-server"></i></label><br>
				
				<input type="radio" id="shopping-bag" name="m5" value="shopping-bag">
				<label for="shopping-bag"><i class="fa fa-shopping-bag"></i></label><br>
				
				<input type="radio" id="shield" name="m5" value="shield">
				<label for="shield"><i class="fa fa-shield"></i></label><br>
				
				<input type="radio" id="road" name="m5" value="road">
				<label for="road"><i class="fa fa-road"></i></label><br>
				
				<input type="radio" id="space-shuttle" name="m5" value="space-shuttle">
				<label for="space-shuttle"><i class="fa fa-space-shuttle"></i></label><br>
				
				<input type="radio" id="upload" name="m5" value="upload">
				<label for="upload"><i class="fa fa-upload"></i></label><br>
				
				<input type="radio" id="unlock" name="m5" value="unlock">
				<label for="unlock"><i class="fa fa-unlock"></i></label><br>
				
				<input type="radio" id="tree" name="m5" value="tree">
				<label for="tree"><i class="fa fa-tree"></i></label><br>
				
				<input type="radio" id="thumbs-o-up" name="m5" value="thumbs-o-up">
				<label for="thumbs-o-up"><i class="fa fa-thumbs-o-up"></i></label><br>
				
				<input type="radio" id="wheelchair" name="m5" value="wheelchair">
				<label for="wheelchair"><i class="fa fa-wheelchair"></i></label><br>
				
				<input type="radio" id="refresh" name="m5" value="refresh">
				<label for="refresh"><i class="fa fa-refresh"></i></label><br>
				
				<input type="radio" id="apple" name="m5" value="apple">
				<label for="apple"><i class="fa fa-apple"></i></label><br>
				
			
				
				<input type="radio" id="briefcase" name="m5" value="briefcase">
				<label for="briefcase"><i class="fa fa-briefcase"></i></label><br>
				
				<input type="radio" id="book" name="m5" value="book">
				<label for="book"><i class="fa fa-book"></i></label><br>
				
				<input type="radio" id="balance-scale" name="m5" value="balance-scale">
				<label for="balance-scale"><i class="fa fa-balance-scale"></i></label><br>
				</div>
				
				
				<div class="col-md-3">
				<input type="radio" id="crop" name="m5" value="crop">
				<label for="crop"><i class="fa fa-crop"></i></label><br>
				
				<input type="radio" id="flag" name="m5" value="flag">
				<label for="flag"><i class="fa fa-flag"></i></label><br>
				
				<input type="radio" id="heart-o" name="m5" value="heart-o">
				<label for="heart-o"><i class="fa fa-heart-o"></i></label><br>
				
				<input type="radio" id="hotel" name="m5" value="hotel">
				<label for="hotel"><i class="fa fa-hotel"></i></label><br>
				
				<input type="radio" id="legal" name="m5" value="legal">
				<label for="legal"><i class="fa fa-legal"></i></label><br>
				
				<input type="radio" id="magic" name="m5" value="magic">
				<label for="magic"><i class="fa fa-magic"></i></label><br>
				
				<input type="radio" id="map" name="m5" value="map">
				<label for="map"><i class="fa fa-map"></i></label><br>
				
				<input type="radio" id="map-signs" name="m5" value="map-signs">
				<label for="map-signs"><i class="fa fa-map-signs"></i></label><br>
				
				<input type="radio" id="motorcycle" name="m5" value="motorcycle">
				<label for="motorcycle"><i class="fa fa-motorcycle"></i></label><br>
				
				<input type="radio" id="paper-plane" name="m5" value="paper-plane">
				<label for="paper-plane"><i class="fa fa-paper-plane"></i></label><br>
				
				<input type="radio" id="pencil" name="m5" value="pencil">
				<label for="pencil"><i class="fa fa-pencil"></i></label><br>
				
				<input type="radio" id="power-off" name="m5" value="power-off">
				<label for="power-off"><i class="fa fa-power-off"></i></label><br>
				
				<input type="radio" id="plane" name="m5" value="plane">
				<label for="plane"><i class="fa fa-plane"></i></label><br>
				
				<input type="radio" id="random" name="m5" value="random">
				<label for="random"><i class="fa fa-random"></i></label><br>
				
				<input type="radio" id="plus" name="m5" value="plus">
				<label for="plus"><i class="fa fa-plus"></i></label><br>
				</div>
				
				
				<div class="col-md-3">
				<input type="radio" id="bar-chart-o" name="m5" value="bar-chart-o">
				<label for="bar-chart-o"><i class="fa fa-bar-chart-o"></i></label><br>
				
				<input type="radio" id="anchor" name="m5" value="anchor">
				<label for="anchor"><i class="fa fa-anchor"></i></label><br>
				
				<input type="radio" id="code" name="m5" value="code">
				<label for="code"><i class="fa fa-code"></i></label><br>
				
				<input type="radio" id="cogs" name="m5" value="cogs">
				<label for="cogs"><i class="fa fa-cogs"></i></label><br>
				
				<input type="radio" id="coffee" name="m5" value="coffee">
				<label for="coffee"><i class="fa fa-coffee"></i></label><br>
				
				<input type="radio" id="clock-o" name="m5" value="clock-o">
				<label for="clock-o"><i class="fa fa-clock-o"></i></label><br>
				
				<input type="radio" id="comment" name="m5" value="comment">
				<label for="comment"><i class="fa fa-comment"></i></label><br>
				
				<input type="radio" id="check" name="m5" value="check">
				<label for="check"><i class="fa fa-check"></i></label><br>
				
				<input type="radio" id="bolt" name="m5" value="bolt">
				<label for="bolt"><i class="fa fa-bolt"></i></label><br>
				
				<input type="radio" id="desktop" name="m5" value="desktop">
				<label for="desktop"><i class="fa fa-desktop"></i></label><br>
				
				<input type="radio" id="cubes" name="m5" value="cubes">
				<label for="cubes"><i class="fa fa-cubes"></i></label><br>
				
				<input type="radio" id="compass" name="m5" value="compass">
				<label for="compass"><i class="fa fa-compass"></i></label><br>
				
				<input type="radio" id="cutlery" name="m5" value="cutlery">
				<label for="cutlery"><i class="fa fa-cutlery"></i></label><br>
				
					<input type="radio" id="android" name="m5" value="android">
				<label for="android"><i class="fa fa-android"></i></label><br>
				
				<input type="radio" id="bullhorn" name="m5" value="bullhorn">
				<label for="bullhorn"><i class="fa fa-bullhorn"></i></label><br>
				
		
				</div>
				
				</div>
				
				<small class="form-control-feedback"> Anasayfada gösterilecek olan sayaç simgesi </small>
                </div>
                </div>
				
		
				</div>
             
				</div>
                
				
				
				<div class="col-md-12">
				<div class="row">
				<div class="col-md-12">
				
                <div class="form-group">
                <label class="control-label">İçerik Dili</label>
                <select name="veri_dil" class="form-control">
			
				<?php
		
			
				$dil_al = mysql_query("SELECT * FROM diller ORDER BY id ASC limit 0,999");
				while($yaz=mysql_fetch_array($dil_al)){
				$id = $yaz['id'];
				$baslik = $yaz['baslik'];
				
				if($menu_dil_getir == $id){}else{
				echo '<option value="'.$id.'">'.$baslik.'</option>';
				}
				}
				?>
			
				</select>
				<small class="form-control-feedback">İçeriğin gösterileceği dili seçin</small>
                </div>
				
				</div>
				
				</div>
				</div>
                
                </div>
				
                <div class="card-body">
                
             
                <div class="form-actions">
                <?php if($kontrol_kullanici_yetki == "1"){?>
                <button type="submit" class="btn btn-primary"> <i class="fa fa-check"></i> Kaydet</button>
				<?php }else{echo '<a class="btn btn-primary text-white" data-toggle="modal" data-target="#uyari-modal"> <i class="fa fa-check"></i> Kaydet</a>'; }?>
                </div>
				</form>
                </div>
                </div>
                </div>
				<?php } ?>
				<!-- ################### -->
				<!-- Yeni İçerik Ekleme Alanı -->
				<!-- ################### -->
				
				
				
				
				
				
				
				<!-- ################### -->
				<!-- İçerik Düzenleme Alanı -->
				<!-- ################### -->


				<?php 
				$ileri = g('ileri');
				$id = g('id');
				switch($ileri){
				case "duzenle":

				$posted = "resim";
				$baslik = p('baslik');
				$icerik1 = $_POST["icerik"];
				$icerik = addslashes($icerik1);
				$seo_baslik = seo($baslik);
				$rastgele = rand(1000,9999);
				$seo_url = $seo_baslik;
				$seo_url2 = "$seo_baslik"."-$rastgele";
				$seo_anahtarkelime = p('seo_anahtarkelime');
				$seo_aciklama = p('seo_aciklama');
				$veri_dil = p('veri_dil');
				$ekleyen = "$yonetici_kullanici_adi";
				$goruntuleme = p('goruntuleme');
				$gizlinot = p('gizlinot');
				$icerik_durum = p('icerik_durum');
				$m4 = p('m4');
				$m5 = p('m5');
				$m6 = p('m6');
				$m7 = p('m7');
				$m8 = p('m8');
				$m9 = p('m9');
				$m10 = p('m10');
				$m11 = p('m11');
				$m12 = p('m12');
				$m13 = p('m13');
				$m14 = p('m14');
				$m15 = p('m15');
 
				// İşlem Kayıt Modülü
				$islemk_islem = "$baslik sayacı düzenlendi";
				include("moduller/islemkayit_modul.php");

				$duzenle = mysql_query("update sayaclar set 
				baslik='$baslik',
				icerik='$icerik',
				seo_url='$seo_url',
				seo_anahtarkelime='$seo_anahtarkelime',
				seo_aciklama='$seo_aciklama',
				goruntuleme='$goruntuleme',
				gizlinot='$gizlinot',
				icerik_durum='$icerik_durum',
				m4='$m4',
				m5='$m5',
				m6='$m6',
				m7='$m7',
				m8='$m8',
				m9='$m9',
				m10='$m10',
				m11='$m11',
				m12='$m12',
				m13='$m13',
				m14='$m14',
				m15='$m15',
				veri_dil='$veri_dil'
				where id='$id'") or die("Hata Olustu!");	

			

				echo '<meta http-equiv="refresh" content="0;URL=sayaclar.php?durum=duzenleme-basarili'.$d_k_d.'"> ';
				break;
				}
				?>	



				<?php if($islem == "duzenle"){?>
				
				<?php 
				// Seçilen içeriğin detaylarını getiriyoruz
				$idal = g("id");
				$icerik_getir=mysql_query("SELECT * FROM sayaclar WHERE id='$idal'"); 
				$getir=mysql_fetch_array($icerik_getir); 
				$baslik = $getir['baslik'];
				$icerik = $getir['icerik'];
				$seo_anahtarkelime = $getir['seo_anahtarkelime'];
				$seo_aciklama = $getir['seo_aciklama'];
				$resim = $getir['resim'];
				$veri_dil = $getir['veri_dil'];
				$goruntuleme = $getir['goruntuleme'];
				$gizlinot = $getir['gizlinot'];
				$icerik_durum = $getir['icerik_durum'];
				$m4 = $getir['m4'];
				
				?>
			
				<div class="col-lg-12">
                <div class="card card-outline-inverse">
                <div class="card-header">
                <h4 class="m-b-0 text-white"><?php echo "$baslik - sayacını düzenle";?></h4>
				
                </div>
				<form action="sayaclar.php?islem=yeni&ileri=duzenle&id=<?php echo "$idal$d_k_d";?>" method="post" enctype="multipart/form-data">
				
				<div class="row p-t-20">
				<div class="col-md-12">
                <div class="col-md-12">
                <div class="form-group">
                <label class="control-label">Başlık</label>
                <input type="text" name="baslik" class="form-control" value="<?php echo "$baslik";?>" required>
                <small class="form-control-feedback"> Bu başlık aynı zamanda seo url ile eşleştirilecektir. </small> </div>
                </div>
				
				<div class="col-md-12">
                <div class="form-group">
                <label class="control-label">Miktar</label>
                <input type="text" name="m4" class="form-control" value="<?php echo "$m4";?>">
				<small class="form-control-feedback"> Sayfanız için özel anahtar kelimeler kullanabilirsiniz </small> 
                </div>
                </div>


				<div class="col-md-12">
                <div class="form-group">
                <label class="control-label">Sayaç Simgesi</label>
				
				<div class="row">
				<div class="col-md-3">
				
				<input type="radio" id="user-circle" name="m5" value="user-circle">
				<label for="user-circle"><i class="fa fa-user-circle"></i></label><br>
				
				<input type="radio" id="eye" name="m5" value="eye">
				<label for="eye"><i class="fa fa-eye"></i></label><br>
				
				<input type="radio" id="eercast" name="m5" value="eercast">
				<label for="eercast"><i class="fa fa-eercast"></i></label><br>
				
				<input type="radio" id="bandcamp" name="m5" value="bandcamp">
				<label for="bandcamp"><i class="fa fa-bandcamp"></i></label><br>
				
				<input type="radio" id="telegram" name="m5" value="telegram">
				<label for="telegram"><i class="fa fa-telegram"></i></label><br>
				
				<input type="radio" id="grav" name="m5" value="grav">
				<label for="grav"><i class="fa fa-grav"></i></label><br>
				
				<input type="radio" id="podcast" name="m5" value="podcast">
				<label for="podcast"><i class="fa fa-podcast"></i></label><br>
				
				<input type="radio" id="shower" name="m5" value="shower">
				<label for="shower"><i class="fa fa-shower"></i></label><br>
				
				<input type="radio" id="vcard" name="m5" value="vcard">
				<label for="vcard"><i class="fa fa-vcard"></i></label><br>
				
				<input type="radio" id="handshake-o" name="m5" value="handshake-o">
				<label for="handshake-o"><i class="fa fa-handshake-o"></i></label><br>
				
				<input type="radio" id="bank" name="m5" value="bank">
				<label for="bank"><i class="fa fa-bank"></i></label><br>
				
				<input type="radio" id="bars" name="m5" value="bars">
				<label for="bars"><i class="fa fa-bars"></i></label><br>
				
				<input type="radio" id="bell" name="m5" value="bell">
				<label for="bell"><i class="fa fa-bell"></i></label><br>
				
				<input type="radio" id="bug" name="m5" value="bug">
				<label for="bug"><i class="fa fa-bug"></i></label><br>
				
				<input type="radio" id="bullseye" name="m5" value="bullseye">
				<label for="bullseye"><i class="fa fa-bullseye"></i></label><br>
				
				<input type="radio" id="bus" name="m5" value="bus">
				<label for="bus"><i class="fa fa-bus"></i></label><br>
				</div>
				
				<div class="col-md-3">
				<input type="radio" id="server" name="m5" value="server">
				<label for="server"><i class="fa fa-server"></i></label><br>
				
				<input type="radio" id="shopping-bag" name="m5" value="shopping-bag">
				<label for="shopping-bag"><i class="fa fa-shopping-bag"></i></label><br>
				
				<input type="radio" id="shield" name="m5" value="shield">
				<label for="shield"><i class="fa fa-shield"></i></label><br>
				
				<input type="radio" id="road" name="m5" value="road">
				<label for="road"><i class="fa fa-road"></i></label><br>
				
				<input type="radio" id="space-shuttle" name="m5" value="space-shuttle">
				<label for="space-shuttle"><i class="fa fa-space-shuttle"></i></label><br>
				
				<input type="radio" id="upload" name="m5" value="upload">
				<label for="upload"><i class="fa fa-upload"></i></label><br>
				
				<input type="radio" id="unlock" name="m5" value="unlock">
				<label for="unlock"><i class="fa fa-unlock"></i></label><br>
				
				<input type="radio" id="tree" name="m5" value="tree">
				<label for="tree"><i class="fa fa-tree"></i></label><br>
				
				<input type="radio" id="thumbs-o-up" name="m5" value="thumbs-o-up">
				<label for="thumbs-o-up"><i class="fa fa-thumbs-o-up"></i></label><br>
				
				<input type="radio" id="wheelchair" name="m5" value="wheelchair">
				<label for="wheelchair"><i class="fa fa-wheelchair"></i></label><br>
				
				<input type="radio" id="refresh" name="m5" value="refresh">
				<label for="refresh"><i class="fa fa-refresh"></i></label><br>
				
				<input type="radio" id="apple" name="m5" value="apple">
				<label for="apple"><i class="fa fa-apple"></i></label><br>
				
			
				
				<input type="radio" id="briefcase" name="m5" value="briefcase">
				<label for="briefcase"><i class="fa fa-briefcase"></i></label><br>
				
				<input type="radio" id="book" name="m5" value="book">
				<label for="book"><i class="fa fa-book"></i></label><br>
				
				<input type="radio" id="balance-scale" name="m5" value="balance-scale">
				<label for="balance-scale"><i class="fa fa-balance-scale"></i></label><br>
				</div>
				
				
				<div class="col-md-3">
				<input type="radio" id="crop" name="m5" value="crop">
				<label for="crop"><i class="fa fa-crop"></i></label><br>
				
				<input type="radio" id="flag" name="m5" value="flag">
				<label for="flag"><i class="fa fa-flag"></i></label><br>
				
				<input type="radio" id="heart-o" name="m5" value="heart-o">
				<label for="heart-o"><i class="fa fa-heart-o"></i></label><br>
				
				<input type="radio" id="hotel" name="m5" value="hotel">
				<label for="hotel"><i class="fa fa-hotel"></i></label><br>
				
				<input type="radio" id="legal" name="m5" value="legal">
				<label for="legal"><i class="fa fa-legal"></i></label><br>
				
				<input type="radio" id="magic" name="m5" value="magic">
				<label for="magic"><i class="fa fa-magic"></i></label><br>
				
				<input type="radio" id="map" name="m5" value="map">
				<label for="map"><i class="fa fa-map"></i></label><br>
				
				<input type="radio" id="map-signs" name="m5" value="map-signs">
				<label for="map-signs"><i class="fa fa-map-signs"></i></label><br>
				
				<input type="radio" id="motorcycle" name="m5" value="motorcycle">
				<label for="motorcycle"><i class="fa fa-motorcycle"></i></label><br>
				
				<input type="radio" id="paper-plane" name="m5" value="paper-plane">
				<label for="paper-plane"><i class="fa fa-paper-plane"></i></label><br>
				
				<input type="radio" id="pencil" name="m5" value="pencil">
				<label for="pencil"><i class="fa fa-pencil"></i></label><br>
				
				<input type="radio" id="power-off" name="m5" value="power-off">
				<label for="power-off"><i class="fa fa-power-off"></i></label><br>
				
				<input type="radio" id="plane" name="m5" value="plane">
				<label for="plane"><i class="fa fa-plane"></i></label><br>
				
				<input type="radio" id="random" name="m5" value="random">
				<label for="random"><i class="fa fa-random"></i></label><br>
				
				<input type="radio" id="plus" name="m5" value="plus">
				<label for="plus"><i class="fa fa-plus"></i></label><br>
				</div>
				
				
				<div class="col-md-3">
				<input type="radio" id="bar-chart-o" name="m5" value="bar-chart-o">
				<label for="bar-chart-o"><i class="fa fa-bar-chart-o"></i></label><br>
				
				<input type="radio" id="anchor" name="m5" value="anchor">
				<label for="anchor"><i class="fa fa-anchor"></i></label><br>
				
				<input type="radio" id="code" name="m5" value="code">
				<label for="code"><i class="fa fa-code"></i></label><br>
				
				<input type="radio" id="cogs" name="m5" value="cogs">
				<label for="cogs"><i class="fa fa-cogs"></i></label><br>
				
				<input type="radio" id="coffee" name="m5" value="coffee">
				<label for="coffee"><i class="fa fa-coffee"></i></label><br>
				
				<input type="radio" id="clock-o" name="m5" value="clock-o">
				<label for="clock-o"><i class="fa fa-clock-o"></i></label><br>
				
				<input type="radio" id="comment" name="m5" value="comment">
				<label for="comment"><i class="fa fa-comment"></i></label><br>
				
				<input type="radio" id="check" name="m5" value="check">
				<label for="check"><i class="fa fa-check"></i></label><br>
				
				<input type="radio" id="bolt" name="m5" value="bolt">
				<label for="bolt"><i class="fa fa-bolt"></i></label><br>
				
				<input type="radio" id="desktop" name="m5" value="desktop">
				<label for="desktop"><i class="fa fa-desktop"></i></label><br>
				
				<input type="radio" id="cubes" name="m5" value="cubes">
				<label for="cubes"><i class="fa fa-cubes"></i></label><br>
				
				<input type="radio" id="compass" name="m5" value="compass">
				<label for="compass"><i class="fa fa-compass"></i></label><br>
				
				<input type="radio" id="cutlery" name="m5" value="cutlery">
				<label for="cutlery"><i class="fa fa-cutlery"></i></label><br>
				
					<input type="radio" id="android" name="m5" value="android">
				<label for="android"><i class="fa fa-android"></i></label><br>
				
				<input type="radio" id="bullhorn" name="m5" value="bullhorn">
				<label for="bullhorn"><i class="fa fa-bullhorn"></i></label><br>
				
		
				</div>
				
				</div>
				
				<small class="form-control-feedback"> Anasayfada gösterilecek olan sayaç simgesi </small>
                </div>
                </div>
				
				</div>
                
            
				</div>
                
				<div class="col-md-12">
				<div class="row">
				<div class="col-md-12">
				
                <div class="form-group">
                <label class="control-label">İçerik Dili</label>
				<select name="veri_dil" class="form-control">
			
				<?php
				
				$dil_bulasd=mysql_query("SELECT * FROM diller WHERE id='$veri_dil'"); 
				$getir=mysql_fetch_array($dil_bulasd); 
				$id = $getir['id'];
				$dil_baslik_yaz = $getir['baslik'];
				echo '<option value="'.$id.'">'.$dil_baslik_yaz.' </option>';
			
				$dil_al = mysql_query("SELECT * FROM diller ORDER BY id ASC limit 0,999");
				while($yaz=mysql_fetch_array($dil_al)){
				$id = $yaz['id'];
				$baslik = $yaz['baslik'];
				
				if($veri_dil == $id){}else{
				echo '<option value="'.$id.'">'.$baslik.'</option>';
				}
				}
				?>
			
				</select>
				<small class="form-control-feedback">İçeriğin gösterileceği dili seçin</small>
                </div>
				
				</div>
				
				</div>
				</div>
				
                </div>
				
				
				
                <div class="card-body">
             
                <div class="form-actions">
                <?php if($kontrol_kullanici_yetki == "1"){?>
                <button type="submit" class="btn btn-primary"> <i class="fa fa-check"></i> Güncelle</button>
				<?php }else{echo '<a class="btn btn-primary text-white" data-toggle="modal" data-target="#uyari-modal"> <i class="fa fa-check"></i> Güncelle</a>'; }?>
                </div>
				</form>
                </div>
                </div>
                </div>
				<?php } ?>
				<!-- ################### -->
				<!-- İçerik Düzenleme Alanı -->
				<!-- ################### -->				
				
				
				
				<?php if(empty($islem)){?>
				<div class="table-responsive">
                <table class="table">
                <thead>
                <tr>
                <th>Başlık</th>
                <th>Miktar</th>
                <th>Tarih</th>
                <th>Ekleyen</th>
                <th>İşlemler</th>
                </tr>
                </thead>
                <tbody>
				<?php
				
				if(empty($dilgoster)){ $sayfalar_al = mysql_query("SELECT * FROM sayaclar WHERE veri_dil='1' ORDER BY id DESC limit 0,999");}else{
				$sayfalar_al = mysql_query("SELECT * FROM sayaclar WHERE veri_dil='$dilgoster' ORDER BY id DESC limit 0,999");}
				while($yaz=mysql_fetch_array($sayfalar_al)){
				$id = $yaz['id'];
				$baslik = $yaz['baslik'];
				$m4 = $yaz['m4'];
				$tarih = $yaz['tarih'];
				$ekleyen = $yaz['ekleyen'];
				$veri_dil = $yaz['veri_dil'];
				echo "
				<tr>
                <td>$baslik</td>
                <td>$m4</td>
                <td>$tarih</td>
                <td>$ekleyen</td>
                <td>
				<a href='sayaclar.php?islem=duzenle&id=$id$d_k_d'> <button class='btn btn-info btn-sm' title='Düzenle'><i class='fa fa-pencil-square-o' aria-hidden='true'></i></button></a> 
				"; if($kontrol_kullanici_yetki == "1"){echo "<a href='#' data-toggle='modal' data-target='#sil-modal$id'>";}else{echo "<a href='#' data-toggle='modal' data-target='#uyari-modal'>";}echo"<button class='btn btn-danger btn-sm' title='Sil'><i class='fa fa-trash-o' aria-hidden='true'></i></button>
				</td>
                </tr>
				";
				}?>
                
                <?php
				$sil_m_al = mysql_query("SELECT * FROM sayaclar ORDER BY id DESC limit 0,999");
				while($yaz=mysql_fetch_array($sil_m_al)){
				$id = $yaz['id'];
				$baslik = $yaz['baslik'];	
			
				echo '
			
				<div id="sil-modal'.$id.'" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
				<div class="modal-dialog">
				<div class="modal-content">
				<div class="modal-header">
				<h4 class="modal-title"><i class="fa fa-times" aria-hidden="true"></i> '.$baslik.' sayacını sil</h4>
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				</div>
				<div class="modal-body">
				<p>'.$baslik.' sayacını gerçekten silmek istiyormusunuz ?</p>
				</div>
				<div class="modal-footer">
				<button type="button" class="btn btn-default waves-effect" data-dismiss="modal">Hayır</button>
				<a href="sayaclar.php?sil=sil&id='.$id.''.$d_k_d.'"><button type="button" class="btn btn-danger waves-effect waves-light">Evet</button></a>
				</div>
				</div>
				</div>
				</div>
				';
				}?>   
				
                </tbody>
                </table>
                </div>
				<?php } ?>				
								
    
                </div>
                </div>
				</div>
                </div>
				</div>


	
<?php
include ("alt.php");
}
?>