File size: 564B
<?
include("modul/config.php"); include("modul/fun.php");
$id=intval($_GET['id']);
$query=mysql_query("SELECT * FROM `files` WHERE `id`=$id");
$m=mysql_fetch_array($query); if(is_file(''.$m['infolder'].'/'.$m['name'].'')) {
if(empty($_COOKIE['doulin']) or $_COOKIE['doulin']!=$id) {
$time=time();
mysql_query('UPDATE `files` SET `loads`="'.($m['loads']+1).'", `posload`="'.date("y.m.d H:i:s").'", timeload='.$time.' WHERE `id`="'.$id.'"');
setcookie('doulin',$id,time()+600);
}
header('Location: http://games.doulin.h2m.ru/'.$m['infolder'].'/'.$m['name'].'');
}
?>