<?php
require_once ('inc/bd.php');
require_once ('inc/fun.php');
#############################
$id = num($_GET['id']);
#############################
$req = mysql_query("SELECT * FROM `reklama` WHERE `id` = '$id' LIMIT 1");
if (mysql_num_rows($req))
{
$res = mysql_fetch_assoc($req);
$count_link = $res['count'] + 1;
mysql_query("UPDATE `reklama` SET `count` = '" . $count_link . "' WHERE `id` = '$id'");
go($res['link']);
}
else
{
go($home.'/404.php');
}
?>