Просмотр файла go.php

Размер файла: 1.16Kb
<?php
include "inc.php";
include "config.php";
Error_Reporting(E_ALL & ~E_NOTICE);
$who = getenv(REMOTE_ADDR);
$datte = date("d-m-Y");
$count = @mysql_query("select `id`, `from` from `users` where `url`='$url' and `activ`='yes' limit 1;");
$its = @mysql_fetch_array($count);
$fch = @mysql_query("select `id` from `logs` where `ip`='$who' and `type`='out' and `cid`='".$its['id']."';");
if (@mysql_num_rows($fch) == 0)
{
if (@mysql_num_rows($count) !== 0)
  {
  @mysql_query("insert into `logs` values(0,'$who','out','$datte','".$its['id']."');");
  $nov = $its['from']+1;
  @mysql_query("update `users` set `from`='$nov' where `id`='".$its['id']."' and `url`='$url' and `activ`='yes';");
  }

}
include "head.php";
print "<div align=\"center\"><div class=a>";
print "$catalog";
print "</div>";
print "<div align=\"center\">";
if (@mysql_num_rows($count) == 0)
{
	print "<div class=foot>Сайта с таким адресом нет в каталоге!!!</div><br/>";
}
else
{
print "<meta http-equiv='refresh' content='0.1;URL=$url'/>";
print "Загрузка....<br/>";
}
print "</div>";
include "foot.php";
print "</div>";
print "</body></html>";
?>