<?php
include"baglan.php";
function oturumkontrolana(){
	 if (empty($_SESSION["eposta"])){
		 echo '<script language="javascript">window.location="girisyap";</script>'; die();
	 }
	 
}
$tarih = date("d.m.Y");
$saat = date("H:i");

$ayar_kaydi= $db->query("SELECT * FROM ayar Where id='1'")->fetch(PDO::FETCH_ASSOC);
$ayar= $db->query("SELECT * FROM ayar Where id='1'")->fetch(PDO::FETCH_ASSOC);
$izin= $db->query("SELECT * FROM yonetici_izin Where id='1'")->fetch(PDO::FETCH_ASSOC);
$sayfa= $db->query("SELECT * FROM sayfalar Where seo='hakkimizda'")->fetch(PDO::FETCH_ASSOC);

$post= $db->query("SELECT * FROM yonetici Where id='1'")->fetch(PDO::FETCH_ASSOC);

$goster2=$db->query("select * from icon where id='1'")->fetch(PDO::FETCH_ASSOC);



$idd=$_SESSION['id'];
$hesabim=$db->query("select * from yonetici where id='$idd'")->fetch(PDO::FETCH_ASSOC);


$banner=$db->query("select * from bannerler where id='1'")->fetch(PDO::FETCH_ASSOC);













$isimler=$db->query("select * from isimler where id='1'")->fetch(PDO::FETCH_ASSOC);
/*
$idd=$hizmetd_dizi["id"];
$ip=$_SERVER["REMOTE_ADDR"];
$sor=$db->query("select * from ip_adresi where ip='$ip' and urun_id='$idd'")->fetch(PDO::FETCH_ASSOC);
	if($sor==false){
		if($sor["urun_id"]!=$hizmetd_dizi["id"]){
		$urun_id=$hizmetd_dizi["id"];
		$query=$db->prepare("insert into ip_adresi set ip = :ip, urun_id = :urun_id, zaman = :zaman");
		$insert=$query->execute(array("ip" =>$ip, "urun_id" =>$urun_id, "zaman" =>$tarih ));	
		
		$hitsayisi=$hizmetd_dizi["hit"]+1;
		
		
		$artir = $db->prepare("UPDATE hizmetler SET
		hit = :hit
		WHERE id = :id");
		$update = $artir->execute(array(
			 "hit" => $hitsayisi,
			 "id" => $id
		));
		}
	}
*/



?>