Файл: anifun.ru/files/refferal.php
Строк: 12
<?
############################################
## By Holopsicon
## https://psgame.net
############################################
if($name_script!=="/st.php" and $name_script!=="/adc.php" and $name_script!=="/moder_panel.php"){
#######сщитаем рефов фрейма#######
/**/ $refs = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM `l2ps_referer` WHERE `ip` = ? and `referer` = ?", array($ip,$referer));
$day = date("d", time());
if(empty($refs)){
DB::$dbs->query("INSERT INTO `l2ps_referer` (`id`,`ip`,`browser`,`day`,`referer`,`request_url`,`time`) VALUES (?,?,?,?,?,?,?)", array(NULL,$ip,$browser,$day,$referer,$request_url,$dmy));
}
#######конец#######
$guest = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM `guest` WHERE `ip` = ?", array($ip));
if(empty($guest)){
$timeg = time() + 100000;
DB::$dbs->query("INSERT INTO `guest` (`ip`, `time`) VALUES (?, ?)", array($ip, $timeg));
}
DB::$dbs->query("DELETE FROM `guest` WHERE `time` < ? ", array(time()));
}
?>