<?php
define('PROTECTOR', 1);

include('files/path.php');
include($path.'files/db.php');
include($path.'files/auth.php');
include($path.'files/func.php');
$textl='Новая игра';
include($path.'files/core.php');
include($path.'files/head.php');


$raaand=rand(100,10000);
$raand="user_$raaand";

$ip=htmlspecialchars(stripslashes($_SERVER['REMOTE_ADDR']));



if (($tkr < 1) && ($bip < 20) && ($_POST[nick] != "") && ($_POST[pass] != "") && ($_POST[repass] != "") && ($_POST[pass] == $_POST[repass]))
{

$dater=date("d F, Y", time());
$time=date("H:i:s", time());
$dater = str_replace("January","января",$dater);
$dater = str_replace("February","февраля",$dater);
$dater = str_replace("March","марта",$dater);
$dater = str_replace("April","апреля",$dater);
$dater = str_replace("May","мая",$dater);
$dater = str_replace("June","июня",$dater);
$dater = str_replace("July","июля",$dater);
$dater = str_replace("August","августа",$dater);
$dater = str_replace("September","сентября",$dater);
$dater = str_replace("October","октября",$dater);
$dater = str_replace("November","ноября",$dater);
$dater = str_replace("December","декабря",$dater);

}




mysql_query("INSERT INTO
`users` SET
`usr` = '$raand',
`pass` = '123456',
`email` = '',
`ip` = '$ip',
`pol` = 'm',
`storona` = 'white',
`lvl` = '1',
        `money` = '5000',
        `skill` = '6',
        `hp` = '150',
        `hpall` = '150',
        `mp` = '1000',
        `mpall` = '1000',
        `exp` = '0',
        `almaz` = '200',
        `sila` = '50',
        `lovk` = '50',
        `prot` = '50',
        `krit` = '0',
        `ukrit` = '50',
        `logotip` = '2',
        `pan` = '1',
        `klas` = 'wizard',
        `city` = 'fornost',
        `ref` = '$_GET[ref]',
        `activ` = 'off',
        `lvisit` = '$dater $time'");




mysql_query("INSERT INTO `mesto` SET `usr` = '$raand',`place` = 'main',`city` = '0'");
$date = time();
mysql_query("INSERT INTO regenerator SET usr = '$raand', last = '$date'");

$date = time();
//mysql_query("INSERT INTO `regenerator` SET `usr` = '$_POST[nick]', `last` = '$date'");
//mysql_query("INSERT INTO `mag` SET `usr` = '$raand', `yarost` ='0', `bronya`='0', `vihr`='0',`stoika` ='0', `vihr2`= '0'");
//mysql_query("INSERT INTO `set` SET `usr` = '$raand', `datareg` = '$date', `email` = '$_POST[email]', `brauser` = '$brauser', `referer` = '".mysql_real_escape_string($otkuda)."' , `prim` = 'on', `arenainv`= '0', `invmax`= '0'");


$actime=time()+3600;

/*mysql_query("INSERT INTO
`aurs` SET
`usr` = '$raand',
`actimer` = '$actime'");

mysql_query("INSERT INTO
`item_aura` SET
`usr` = '$raand',
`name` = 'Слабая аура шока',
`lat_name` = 'min_aura_shok',
`cena` = '15',
`umin` = '6',
`umax` = '17',
`actime` = '1800',
`status` = '1',
`kol` = '1'");*/



$time = date("H:i d.m.y");



$_SESSION['kol'] = $_SESSION['kol']+1;
$_SESSION['log'] = $raand;
$_SESSION['pas'] = 123456;
$_SESSION['klas'] = $_POST[klas];
$_SESSION['storona'] = $storona;



	header('Location: /');
	exit;



include($path.'files/end.php');
?>
