<?php
ob_start();
session_start();
$db = mysqli_connect("localhost", "u473191051_vc", "FalAdasi09", "u473191051_vb"); // veritabanı kullanıcı, sifre , veritabanı adı //
$db->set_charset("utf8");
$genel_ayar = mysqli_fetch_array(mysqli_query($db, "select * from site_ayar where id=1"));

$site_baslik = $genel_ayar["site_baslik"];
$site_url = $genel_ayar["site_url"];
$site_adi = $genel_ayar["site_adi"];
$site_key = $genel_ayar["site_key"];
$komisyon = $genel_ayar["komisyon"];
$footer = $genel_ayar["footer"];
$googlekod = $genel_ayar["googlekod"];
$site_aciklama = $genel_ayar["site_aciklama"];
$uyeidsession = $_SESSION["uyeid"];
$uye_bilgi_getir = mysqli_fetch_array(mysqli_query($db, "SELECT * FROM uyeler WHERE id = '$uyeidsession'"));

function seflink($text){
	$find = array("/Ğ/","/Ü/","/Ş/","/İ/","/Ö/","/Ç/","/ğ/","/ü/","/ş/","/ı/","/ö/","/ç/");
	$degis = array("G","U","S","I","O","C","g","u","s","i","o","c");
	$text = preg_replace("/[^0-9a-zA-ZÄzÜŞİÖÇğüşıöç]/"," ",$text);
	$text = preg_replace($find,$degis,$text);
	$text = preg_replace("/ +/"," ",$text);
	$text = preg_replace("/ /","-",$text);
	$text = preg_replace("/\s/","",$text);
	$text = strtolower($text);
	$text = preg_replace("/^-/","",$text);
	$text = preg_replace("/-$/","",$text);
	return $text;
}
?>
