Просмотр файла sad/str/redirect.php

Размер файла: 970B
<?php
/**********************************
*	@year: 2018				      *
*	@author: Klubv	              *
*   @icq: 611940693			      *
*	@link: http://baz23.ru        *
**********************************/
define('GAME_CMS', 1);

include ('../system/head.php');

$url = isset($_GET['url']) ? win(str_ireplace('http://', '', $_GET['url'])) : $_SERVER['HTTP_HOST'];

$sql = mysql_query("select * from `reklama` where `url`='".win($url)."' limit 1");



if (mysql_num_rows($sql)) {

$row = mysql_fetch_assoc($sql);

if (!isset($_COOKIE['reklama_'.$row['id']])) {

mysql_query("update `reklama` set `count`=`count`+'1', `count_all`=`count_all`+'1' where `url`='".win($url)."' limit 1");

setCookie ('reklama_'.$row['id'], time(), time() + 3600 * 24);

}

echo'<meta http-equiv="Refresh" content="0; url=http://'.$row['url'].'"/>';



} else {

echo'<meta http-equiv="Refresh" content="0; url=http://'.$row['url'].'"/>';

}



include ('../system/foot.php');

?>