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