Файл: Arh/inc/head.php
Строк: 80
<?php
defined('WBCAT') or die('Restricted access');
ob_start();
session_start();
error_reporting(E_ALL & ~E_NOTICE);
require_once ('config.php');
require_once ('func.php');
require_once ('online.php');
// Проверяем ip-адрес на наличие бана
#############################
if(isset($_SERVER['HTTP_X_REAL_IP'])) {
$ip2 = $_SERVER['HTTP_X_REAL_IP'];
} else {
$ip2 = $_SERVER['REMOTE_ADDR'];
}
$ip2 = ip2int($ip2);
$isset = mysql_query("SELECT COUNT(*) FROM `ban_ip` WHERE `ip`='".$ip2."' LIMIT 1");
if (mysql_result($isset,0) > 0) {
$res = mysql_fetch_array(mysql_query("SELECT `ip`,`reason`,`type`,`url` FROM `ban_ip` WHERE `ip`='".$ip2."' LIMIT 1"));
// Полная блокировка
if ($res['type'] == 1) {
echo 'Ваш ip-адрес забанен ! Причина <br/> '.( !empty($res['reason']) ? $res['reason'] : 'причина не указана' ).' ';
exit;
}
// Редирект по ссылке
if ($res['type'] == 2) {
header("Location: " . $res['url']);
exit;
}
}
#############################
// Проверка переменных id,site
#############################
if ($loc == 'cat') {
if ($id) {
$req = mysql_query("SELECT * FROM `cat` WHERE `id` = '$id' LIMIT 1");
if (mysql_num_rows($req) == 0 ) {
echo 'Категория не найдена';
exit;
}
$title = mysql_result(mysql_query("SELECT `title` FROM `cat` WHERE `id` = '$id'"),0,'title');
}
if ($site) {
$req = mysql_query("SELECT * FROM `sites` WHERE `id` = '$site' LIMIT 1");
if (mysql_num_rows($req) == 0 ) {
echo 'Сайт не найден';
exit;
}
$title = mysql_result(mysql_query("SELECT `name` FROM `sites` WHERE `id` = '$site'"),0,'name');
}
}
#############################
$title = isset($title) ? $title : 'Белый каталог';
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" type="text/css" href="'.$home.'/themes/'.$set_module['theme'].'/style.css">
';
echo '
<title>'.$title.'</title></head>
<html><body>
<script type="text/javascript">
var _tmr = _tmr || [];
_tmr.push({id: "2545131", type: "pageView", start: (new Date()).getTime()});
(function (d, w) {
var ts = d.createElement("script"); ts.type = "text/javascript"; ts.async = true;
ts.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//top-fwz1.mail.ru/js/code.js";
var f = function () {var s = d.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ts, s);};
if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); }
})(document, window);
</script>
<script type="text/javascript"><!--
new Image().src = "//counter.yadro.ru/hit?r"+
escape(document.referrer)+((typeof(screen)=="undefined")?"":
";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?
screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
";"+Math.random();//--></script>
';
echo '<div class="head"><a href="http://empire-host.ru/?ref=51222"><font color="red">Хостинг предоставлен Empire-Host</font></a></div>';
echo '<div class="maintxt"><div class="center"><img src="'.$home.'/images/logo.png" alt="logo" height="40" width="220"/></div></div></div>';
echo '<div class=" currentpage ">На правах рекламы:
<script charset="utf-8" src="http://linkwall.ru/links/get/7759.js"></script>
<noscript><a href="http://linkwall.ru/links/add/7759.html">Купить ссылку</a></noscript>
</br>
</a>';
include("adv.php");
echo'</div>';
?>