Файл: goreg.php
Строк: 147
<?
include "files/ini.php";
echo'
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta forua="true" http-equiv="Cache-Control" content="no-cache,no-store,must-revalidate"/><title>LineageII</title></head>
<link rel="stylesheet" href="dizain/style.css" type="text/css" />
<center>
';
include_once("files/ini.php");
echo'</head>
<body>
<table>
<tr>
<td class="lt1"></td>
<td class="t1"><div><b>LineageII</b></div></td>
<td class="rt1"></td>
</tr>
<tr>
<td class="l"></td>
<td class="centertd"><div class="a">';
$login = htmlspecialchars(stripslashes(addslashes($_POST['login'])));
$pass = htmlspecialchars(stripslashes(addslashes($_POST['pass'])));
$pol = htmlspecialchars(stripslashes(addslashes($_POST['pol'])));
if ((preg_match("/[^A-z0-9]/", $login)) or (strlen($login)<3) or (strlen($login)>10)){echo"<br/>Ник может быть не более 10 и не менее3 символов латинского алфавита<br/><br/>"; exit;}
if(empty($login)){header ("Location: reg.php?errorloginpust"); exit;}
if(empty($pass)){header ("Location: reg.php?errorpaspust"); exit;}
if(eregi("[^A-zA-Za-z0-9-]",$login)){ header ("Location: reg.php?errorlogin"); exit;}
if(eregi("[^a-z0-9-]",$pass)){ header ("Location: reg.php?errorpass"); exit;}
if($kod!==$reff){ header ("Location: reg.php?kod"); exit;}
$brow=htmlspecialchars(stripslashes(getenv('HTTP_USER_AGENT')));
$ip=htmlspecialchars(stripslashes($_SERVER['REMOTE_ADDR']));
if(empty($login) || empty($pass) || empty($pol)) {echo' Данные необходимые для регистрации введены некорректно!<br/>';
echo'<a href="reg.php">Назад</a><br/>';
include_once"files/down.php";
exit;}
if($rassa==gnom){
if($klas==wizard){
echo"Гномы не могут быть магами.<br/>
<a href="reg.php">Вернуться к регистрации</a><br/>";
echo'<td class="r"></td>
</tr>
<tr>
<td class="lb"></td>
<td valign="top" class="bb"></td>
<td class="rb"></td>
</tr></table></body></html>'; exit;}}
if($rassa==kamael){
if($klas==wizard){
echo"Камаэли не могут быть магами.<br/>
<a href="reg.php">Вернуться к регистрации</a><br/>";
echo'<td class="r"></td>
</tr>
<tr>
<td class="lb"></td>
<td valign="top" class="bb"></td>
<td class="rb"></td>
</tr></table></body></html>';
exit;}}
$data=date("d F, Y", time());
$time=date("H:i:s", time());
$data = str_replace("January","января",$data);
$data = str_replace("February","февраля",$data);
$data = str_replace("March","марта",$data);
$data = str_replace("April","апреля",$data);
$data = str_replace("May","мая",$data);
$data = str_replace("June","июня",$data);
$data = str_replace("July","июля",$data);
$data = str_replace("August","августа",$data);
$data = str_replace("September","сентября",$data);
$data = str_replace("October","октября",$data);
$data = str_replace("November","ноября",$data);
$data = str_replace("December","декабря",$data);
function check($mess){
$mess=str_replace("|","",$mess);
$mess=str_replace("||","",$mess);
$mess=htmlspecialchars($mess);
$mess=str_replace("'","'",$mess);
$mess=str_replace(""",""",$mess);
$mess=str_replace("$","$",$mess);
$mess=str_replace("\","\", $mess);
$mess=str_replace("!","!", $mess);
$mess=str_replace("[","[", $mess);
$mess=str_replace("]","]", $mess);
$mess=str_replace("@","@", $mess);
$mess=stripslashes($mess);
return $mess; }
$login = htmlspecialchars(stripslashes($login));
$login=str_replace("GM","", $login);
$login=str_replace("gm","", $login);
$login=check($login);
$pass=check($pass);
$brow=check($brow);
$ip=check($ip);
$rassa=check($rassa);
$klas=check($klas);
$pol=check($pol);
$password = ($pas);
if($rassa=="human"){$gorod="Talking Island Village"; $hp="50"; }
if($rassa=="gnom"){$gorod="Dwarven Village"; $hp="100"; }
if($rassa=="elf"){$gorod="Elven Village"; $hp="60"; }
if($rassa=="darkelf"){$gorod="Dark Elven Village"; $hp="75"; }
if($rassa=="ork"){$gorod="Orc Village"; $hp="78"; }
if($rassa=="kamael"){$gorod="Kamael Village"; $hp="100"; }
if($klas=="wizard"){$mp="50";}
if($klas=="fighert"){$mp="50";}
$mp="50";
$data=date("d F, Y", time());
$time=date("H:i:s", time());
$data = str_replace("January","января",$data);
$data = str_replace("February","февраля",$data);
$data = str_replace("March","марта",$data);
$data = str_replace("April","апреля",$data);
$data = str_replace("May","мая",$data);
$data = str_replace("June","июня",$data);
$data = str_replace("July","июля",$data);
$data = str_replace("August","августа",$data);
$data = str_replace("September","сентября",$data);
$data = str_replace("October","октября",$data);
$data = str_replace("November","ноября",$data);
$data = str_replace("December","декабря",$data);
$query_users_login_reg = mysql_query("select * from `users` where `udata0`='".$login."';");
$users_login_reg = mysql_fetch_array($query_users_login_reg);
if($udata0==$login)
{
echo "<b>Такой логин уже</b><br/>";
}
if(!empty($users_login_reg['udata0']))
{
die
("Такой персонаж уже зарегистрирован<br/><anchor>".$lang['again']."<prev/></anchor></p></card></wml>");
}
$qe=mysql_num_rows(mysql_query("SELECT * FROM `users` WHERE `udata0`='$login' LIMIT 1"));
if($qe==1){echo'Ошибка такой логин уже занят';exit;}
$textsddas=$login.':||:'.$password.':||:'.$pol.':||:5:||:5:||:5:||:0:||:0:||:0:||:0:||:Пусто:||:Пусто:||:Пусто:||:Пусто:||::||:1:||:50:||:50:||:'.$email.':||:0:||::||::||::||::||::||::||:'.$rassa.':||:'.$klas.':||:'.$data.' '.$time.':||:'.$mp.':||:'.$mp.':||:0:||::||::||:0:||::||::||:Traning Room:||:0:||:0:||:Пусто:||:Пусто:||::||:1:||::||:Пусто:||:Пусто:||:dark:||::||:7:||::||::||::||::||::||::||::||::||::||::||:';
$reg_data=date("G:j.n.y");
mysql_query("insert into users values(0,'$login','$pass','$pol','55','55','5','0','0','0','0','Пусто','Пусто','Пусто','Пусто','','1','50','50','$email','0','Dark Elven Village','','','','','','$rassa','$klas','$data $time','$mp','$mp','0','','','0','','','The Shilen Temple','0','0','Пусто','Пусто','','1','','Пусто','Пусто','dark','0','0','0','5','5','5','5','5','5','5','$ip','5','5','0','5','5','5','5','5','5','$refs','$ip','5','0','0','0','0','5','5','Пусто','Пусто','Пусто','Пусто','Пусто','0','0','Пусто','0','0','0','5','5','','0','5','5','5','0','0','0','5','5','5');");
$query_users = mysql_query("select * from `users` where `udata0`='".$login."';");
$users_login = mysql_fetch_array($query_users);
$id = $users_login['id'];
$password = $users_login['pass'];
print"Поздравляю! Вы успешно зарегистрированы.<br/>";
echo'<form method="post" action="enter?">';
echo "Ваш ник:<br/>";
echo "<input name="log" value="$login" maxlength="20" title="$login" emptyok="true"/><br/>";
echo "Пароль:<br/>";
echo "<input name="pas" value="$pass" type="pass" maxlength="20" title="$pass" emptyok="true"/><br/><br>";
echo '<input class="button" type="submit" value="Войти в игру"/></form><br/>';
mysql_query("INSERT INTO
`item` SET
`uda0` = '25',
`uda1` = '0',
`uda2` = 'ringright',
`uda3` = 'NG',
`uda4` = 'Shadow Item: Blue Coral Ring',
`uda5` = 'Shadow Item Blue Coral Ring.gif',
`uda6` = '1',
`uda7` = '".$login."'");
mysql_query("INSERT INTO
`item` SET
`uda0` = '25',
`uda1` = '0',
`uda2` = 'ringleft',
`uda3` = 'NG',
`uda4` = 'Shadow Item: Blue Coral Ring',
`uda5` = 'Shadow Item Blue Coral Ring.gif',
`uda6` = '1',
`uda7` = '".$login."'");
mysql_query("INSERT INTO
`item` SET
`uda0` = '25',
`uda1` = '0',
`uda2` = 'earringleft',
`uda3` = 'NG',
`uda4` = 'Shadow Item: Coral Earring',
`uda5` = 'Shadow Item Coral Earring.gif',
`uda6` = '1',
`uda7` = '".$login."'");
mysql_query("INSERT INTO
`item` SET
`uda0` = '25',
`uda1` = '0',
`uda2` = 'earringright',
`uda3` = 'NG',
`uda4` = 'Shadow Item: Coral Earring',
`uda5` = 'Shadow Item Coral Earring.gif',
`uda6` = '1',
`uda7` = '".$login."'");
mysql_query("INSERT INTO
`item` SET
`uda0` = '25',
`uda1` = '0',
`uda2` = 'necklace',
`uda3` = 'NG',
`uda4` = 'Shadow Item: Necklace of Devotion',
`uda5` = 'Shadow Item Necklace of Devotion.gif',
`uda6` = '1',
`uda7` = '".$login."'");
mysql_query("INSERT INTO
`item` SET
`uda0` = '25',
`uda1` = '0',
`uda2` = 'nogi',
`uda3` = 'NG',
`uda4` = 'Shadow Item: Mithril Boots',
`uda5` = 'Shadow Item Mithril Boots.gif',
`uda6` = '1',
`uda7` = '".$login."'");
mysql_query("INSERT INTO
`item` SET
`uda0` = '25',
`uda1` = '0',
`uda2` = 'gloves',
`uda3` = 'NG',
`uda4` = 'Shadow Item: Reinforced Leather Gloves',
`uda5` = 'Shadow Item Reinforced Leather Gloves.gif',
`uda6` = '1',
`uda7` = '".$login."'");
mysql_query("INSERT INTO
`item` SET
`uda0` = '25',
`uda1` = '0',
`uda2` = 'body',
`uda3` = 'NG',
`uda4` = 'Shadow Item: Blood Plate Armor',
`uda5` = 'Shadow Item Blood Plate Armor.gif',
`uda6` = '1',
`uda7` = '".$login."'");
mysql_query("INSERT INTO
`item` SET
`uda0` = '25',
`uda1` = '0',
`uda2` = 'shield',
`uda3` = 'NG',
`uda4` = 'Shadow Item: Hoplon',
`uda5` = 'Shadow Item Hoplon.gif',
`uda6` = '1',
`uda7` = '".$login."'");
mysql_query("INSERT INTO
`item` SET
`uda0` = '25',
`uda1` = '0',
`uda2` = 'weapon',
`uda3` = 'NG',
`uda4` = 'Shadow Item: Orcish Sword',
`uda5` = 'Shadow Item Orcish Sword.gif',
`uda6` = '1',
`uda7` = '".$login."'");
mysql_query("INSERT INTO
`item` SET
`uda0` = '25',
`uda1` = '0',
`uda2` = 'golova',
`uda3` = 'NG',
`uda4` = 'Shadow Item: Chain Helmet',
`uda5` = 'Shadow Item Chain Helmet.gif',
`uda6` = '1',
`uda7` = '".$login."'");
mysql_query("INSERT INTO `mag` VALUES ('', '50', '5', '100' , 'active' , 'combat' , '' , 'Магия для новичков' , 'New mags', 'New mags', 'mag', '$login' )") or die(mysql_error());
$actime=time()+1800;
mysql_query("INSERT INTO
`aurs` SET
`usr` = '".$login."',
`sila` = '50',
`actimer` = '$actime',
`name` = 'Повышена атака'");
mysql_query("INSERT INTO
`aurs` SET
`usr` = '".$login."',
`sila` = '50',
`actimer` = '$actime',
`name` = 'Повышена зашита'");
echo'<td class="r"></td>
</tr>
<tr>
<td class="lb"></td>
<td valign="top" class="bb"></td>
<td class="rb"></td>
</tr></table></body></html>';
?>