<?
include_once 'system/head.php';
$q=mysql_fetch_assoc(mysql_query("select * from `ads` where `id`='$id'"));
if($q){
mysql_query("update `ads` set `oute`=`oute`+1 where `id`='$id'");
mysql_query("update `user` set `balans`=`balans`+1 where `id`='$user[id]'");
header('location: '.$row['link']);
}else{echo'<div class="menu">Ошибка идентификатора</div>';}
include_once 'system/foot.php';
?>