<?php

die();

function getIP()
{
    if (isset($_SERVER['HTTP_X_REAL_IP'])) {
        return $_SERVER['HTTP_X_REAL_IP'];
    }
    return $_SERVER['REMOTE_ADDR'];
}

if (!isset($_GET['test'])) {
    if ($_SERVER['HTTP_CF_CONNECTING_IP'] != $_SERVER['SERVER_ADDR'] && $_SERVER['HTTP_CF_CONNECTING_IP'] != '127.0.0.1') {
        die('Hello pussy!');
    }
    if (getIP() != $_SERVER['SERVER_ADDR'] && getIP() != '127.0.0.1' && getIP() != '' && getIP() != '5.187.7.71') {
        die(getIP() . '<br>' . $_SERVER['SERVER_ADDR']);
    }
}

define('GAME', true);

include('_incl_data/__config.php');
include('_incl_data/class/__db_connect.php');
include('_incl_data/class/__user.php');
include('_incl_data/class/__magic.php');

//Подаем турнир для 2-3 уровней
$inc = mysql_query('INSERT INTO `zayvki` (
	`comment`,`noatack`,`city`,`creator`,`type`,`time_start`,`timeout`,`min_lvl_1`,`min_lvl_2`,`max_lvl_1`,`max_lvl_2`,`noinc`,`razdel`,`time`,`fastfight`,`maxplayers`
) VALUES

( "<i><font color=green>Автозаявка! </b>(Без ЕКР)<b></font></i>","1","capitalcity","0","51","300","120","8","8","8","8","1","5","' . time() . '","0","30" ),
( "<i><font color=green>Автозаявка! </b>(Без ЕКР)<b></font></i>","1","capitalcity","0","51","300","120","8","8","21","21","1","5","' . time() . '","0","30" )


');

if ($inc) {
    echo 'true';
} else {
    echo 'false';
}
