Файл: rega.php
Строк: 83
<?php
include 'inc/mysql.php';
include 'inc/check.php';
include ("inc/head.php");
if(isset($_SESSION['auth']) && $_SESSION['auth']==1){
header ("Location: home.php?");
exit;
}
$t = microtime(1);
echo '<div class="title-top">Берсерки Онлайн</div><div class="separ2"></div>';
echo'<div style="text-align:center;padding:3px" class="menu_link2"><div style="border:1px solid #131313;padding:1px;background:#232323;border-radius:3px;display:inline-block"><img width="140" height="140" src="pic/index/logo2.png" alt="" style="border:1px solid #1b1b1b;border-radius:3px;"/> </div></div><div class="separ2"></div>';
$req = mysql_query("SELECT * FROM `config` WHERE `registratoins` = 'of' ");
////////////////////////////
if (mysql_num_rows($req)==1){
echo '<div style="text-align:center;font-size:small;color:#a5a5a5" class="menu_link3">';
echo"<center>Регистрация игры закрыта по техническим причинам администраторами проекта!</div><div class='separ2'></div>";
echo '</center></form>';
echo'<center><a href="index.php?" class="menu_link"><img src="pic/main/rotate.png" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> На главную</a></center>';
include 'inc/nogi.php';
exit;
}
echo '<div style="text-align:center;font-size:small;color:#a5a5a5" class="menu_link3">';
$newpassword =uniqid("F");
$newpas=substr($newpassword,8);
$new=$newpas;
$password = $newpas;
$password = mysql_real_escape_string(trim($password));
$newpassword =uniqid("F");
$newpas=substr($newpassword,3);
$new=$newpas;
$dater = time();
$u=mysql_query("SELECT * FROM `account` ORDER by `id` DESC");
$dat=mysql_fetch_array($u);
$uids=$dat[id]+1;
$hp="500";
$mp="500";
if(!$err){
mysql_query("INSERT INTO `account` SET
`login` = 'Незнакомец$uids',
`password` = '$password',
`secret` = '$new',
`aktivations` = 'off',
`sex` = 'man',
`lvl` = '1',
`status` = 'user',
`hp` = '$hp',
`mp` = '$mp',
`hpall` = '$hp',
`mpall` = '$mp',
`datareg` = '$dater',
`inventar` = '8',
`arena` = '0',
`arena2` = '10',
`arena_status` = 'on',
`patrul` = 'off',
`shakta` = 'off',
`ozero` = 'off',
`bossl1` = '1000',
`bossl2` = '10000',
`bossl3` = '25000',
`ataka` = '100',
`zahita` = '100',
`x`='1',
`y`='1',
`x1`='7',
`y1`='6',
`regenerator` = '$dater'");
mysql_query("INSERT INTO `zadanuya` SET
`account` = '$uids',
`zadanie` = '0'");
mysql_query("INSERT INTO `dosuj` SET
`account` = '$uids'");
mysql_query("INSERT INTO `masterskaya` SET
`account` = '$uids'");
$_SESSION['id'] = mysql_insert_id();
$_SESSION['login']=$login;
$_SESSION['password']=$password;
$_SESSION['auth']=1;
header ("Location: gamefaq.php?go=post&id=1&topik=15");
exit;
}else{
foreach($err as $valhelp){
echo ''.$valhelp.' </b>'; }
}
include 'inc/nogi.php';
?>