Файл: go.php
Строк: 10
<?php
// mod Gemorroj
require 'moduls/config.php';
require 'moduls/header.php';
$q=mysql_query("SELECT `http` FROM `reklames` WHERE `id`='".int($_GET['id'])."' LIMIT 1",$mysql);
if(mysql_num_rows($q) == 1){
mysql_query("UPDATE `reklames` SET `kolls`=`kolls`+1 WHERE `id`='".int($_GET['id'])."'",$mysql);
mysql_query("INSERT INTO `reklames_log` SET `user`='".$_SERVER['HTTP_USER_AGENT']."', `id_link`='".int($_GET['id'])."', `ip`='".$_SERVER['REMOTE_ADDR']."', `time`='".$_SERVER['REQUEST_TIME']."'",$mysql);
header('Location: '.mysql_result($q,0));
}else{
header('Location: /index.php');
}
?>