Файл: go.php
Строк: 51
<?
include_once 'sys/includes/start.php';
include_once 'sys/includes/compress.php';
include_once 'sys/includes/sess.php';
include_once 'sys/includes/home.php';
include_once 'sys/includes/settings.php';
include_once 'sys/includes/db_connect.php';
include_once 'sys/includes/ipua.php';
include_once 'sys/includes/fnc.php';
include_once 'sys/includes/user.php';
$set['title']='Переход по ссылке';
include_once 'sys/includes/header.php';
title();
if (!isset($_GET['go']) || (mysql_result(mysql_query("SELECT COUNT(*) FROM `rekl` WHERE `id` = '".intval($_GET['go'])."'"),0)==0 && !preg_match('#^https?://#',@base64_decode($_GET['go']))))
{
header("Location: index.php?".SID);
exit;
}
if (preg_match('#^(ht|f)tps?://#',base64_decode($_GET['go'])))
{
if (isset($_SESSION['adm_auth']))unset($_SESSION['adm_auth']);
header("Location: ".base64_decode($_GET['go']));
exit;
}else{
$rekl=mysql_fetch_assoc(mysql_query("SELECT * FROM `rekl` WHERE `id` = '".intval($_GET['go'])."'"));
mysql_query("UPDATE `rekl` SET `count` = '".($rekl['count']+1)."' WHERE `id` = '$rekl[id]'");
if (isset($_SESSION['adm_auth']))
{
unset($_SESSION['adm_auth']);
}
header("Refresh: 2; url=$rekl[link]");
echo "<div class='forum_tema'>";
echo "За содержание рекламируемого ресурса<br />";
echo "администрация сайта ".strtoupper($_SERVER['HTTP_HOST'])." ответственности не несёт.<br />";
echo "</div>";
echo "<div class='u_menu'>";
echo "<b><a href='".$rekl['link']."'>Переход</a></b><br />";
echo "</div>";
echo "<div class='aut'>";
echo "Переходов: ".$rekl['count']."<br />";
echo "</div>";
}
include_once 'sys/includes/footer.php';
?>