Вход Регистрация
Файл: gamele.ru/reg.php
Строк: 298
<?php
session_start
();
include(
$_SERVER["DOCUMENT_ROOT"]."/includes/config.inc.php");
include(
DROOT."/includes/functions.php");

if(!empty(
$_COOKIE['RefID']) or !empty($_SESSION['RefID'])){
    
$pers GetUserFID(intval((($_COOKIE['RefID'])?$_COOKIE['RefID']:$_SESSION['RefID'])),1);
}

if(!empty(
$_POST)){
    if(!empty(
$_POST['nickname'])){
        if (
$_POST["nickname"] == "" or strlen($_POST["nickname"]) < or strlen($_POST["nickname"]) > 21 or $_POST["nickname"]=='невидимка' or $_POST["nickname"]=='%clan%'){
            
$msg '<span class="redtitle_st"><strong>Ошибка! Введите корректный Логин.</strong></span><br />';
            
$err 1;
        }
    }
    if (!(
preg_match("/^[0-9a-zA-Z_ -=]+$/i"$_POST["nickname"]) or preg_match("/^[0-9а-яА-Я_ -=]+$/i"$_POST["nickname"]))){
        
$msg '<span class="redtitle_st"><strong>Ошибка! Логин содержит недопустимые смиволы!</strong></span><br />';
        
$err 1;
    }
    
$CHECK GetUser(preg_replace("/'/","",$_POST["nickname"]));
    if(!empty(
$CHECK)){
        
$msg '<span class="redtitle_st"><strong>Ошибка! Логин "'.preg_replace("/'/","",$_POST["nickname"]).'" уже занят!</strong></span><br />';
        
$err 1;
    }
    if(empty(
$_POST['name'])){
        
$msg '<span class="redtitle_st"><strong>Ошибка! Введите имя.</strong></span><br />';
        
$err 1;
    }
    if(empty(
$_POST['country'])){
        
$msg '<span class="redtitle_st"><strong>Ошибка! Введите страну.</strong></span><br />';
        
$err 1;
    }
    if(empty(
$_POST['city'])){
        
$msg '<span class="redtitle_st"><strong>Ошибка! Введите город.</strong></span><br />';
        
$err 1;
    }
    if(
$_POST['bday'] == "n" or $_POST['bmouth'] == "n" or $_POST['byear'] == "n"){
        
$msg '<span class="redtitle_st"><strong>Ошибка! Введите дату рождения.</strong></span><br />';
        
$err=1;
    }
    if(
$_POST['sex'] == "n"){
        
$msg '<span class="redtitle_st"><strong>Ошибка! Укажите свой пол.</strong></span><br />';
        
$err 1;
    }
    if(
$_POST['bmonth'] == "2"){
        if(
$_POST['bday'] == "31" or $_POST['bday'] == "30" ){
            
$msg '<span class="redtitle_st"><strong>Ошибка! Такой даты не существует.</strong></span><br />';
            
$err 1;
        }
    }
    if(
$_POST['agree'] != "ok"){
        
$msg '<span class="redtitle_st"><strong>Ошибка! Примите пользовательское соглашение.</strong></span><br />';
        
$err 1;
    }
    
    if(
strlen($_POST['psw_f']) <= 7){
        
$msg '<span class="redtitle_st"><strong>Ошибка! Пароль меньше 8 знаков.</strong></span><br />';
        
$err 1;
    }else{
        if(
$_POST['psw_f'] != $_POST['psw_s']){
            
$msg '<span class="redtitle_st"><strong>Ошибка! Пароли не совпадают.</strong></span><br />';
            
$err 1;
        }
    }
    if (
$_COOKIE["register"]) {
    
$msg '<span class="redtitle_st"><strong>Регистрация с одного компьютера только раз в 6 часов.</strong></span><br />';
    
$err=1;
    }
    if(
$err != 1){
        
$RegForm 1;
        include(
DROOT."/includes/functions/HonorGates.php");
        
mysql_query("INSERT INTO `user` (`login`,`pass`,`email`,`name`,`country`,`city`,`bday`,`sex`,`thotem`,`bdaypers`,`obraz`,`ip`,`RegIp`".(($pers['id'])?',`referal`':'').") VALUES ('".htmlspecialchars($_POST['nickname'])."','".md5($_POST['psw_f'])."','".htmlspecialchars($_POST['email'])."','".htmlspecialchars($_POST['name'])."','".htmlspecialchars($_POST['country'])."','".htmlspecialchars($_POST['city'])."','".(intval($_POST['bday']).".".intval($_POST['bmonth']).".".intval($_POST['byear'])).$birst."','".htmlspecialchars($_POST['sex'])."','".rand(0,11)."','".time()."','".htmlspecialchars($_POST['sex']).".gif"."','".getIP()."','".getIP()."'".(($pers['id'])?",'".$pers['id']."'":'').")");
        
$msg '<span class="redtitle_st"><strong>Спасибо за регистрацию!</strong></span><br />';
    }
}
?>

<!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=windows-1251" />
</head>
<link type="text/css" rel="stylesheet" href="/global.css" />
<span id='modalb'><br><br><br><br><br>
<form action="" method="post">
<LINK href=/css/game.css rel=STYLESHEET type=text/css>
<table width="90%" border="0" align="center" cellpadding="1" cellspacing="0">
    <tr>
      <td><table width="90%" border="0" align="center" cellpadding="1" cellspacing="0">
        <tr>
          <td><table width="90%" border="0" align="center" cellpadding="2" cellspacing="0">
            <tr>
              <td colspan="2"><br /><br /><br /><? echo $msg;?>
                <font class="weaponch"><b>Важно!</b> Иметь более одного персонажа запрещено.</font></td>
            </tr>
            <tr>
              <td valign="top"><font class="weaponch"><b>Никнейм</b> (Логин) <font color="#cc0000">*</font></font></td>
              <td valign="top"><input name="nickname" value="<?php echo $_POST['nickname']; ?>" type="text" class="LogintextBox4" maxlength="20"></td>
            </tr>
            <tr>
              <td valign="top"><font class="weaponch"><b>Пароль</b> <font color="#cc0000">*</font><br>
                минимум 8 символов</font></td>
              <td valign="top"><input name="psw_f" type="password" class="LogintextBox4" maxlength="30"></td>
            </tr>
            <tr>
              <td valign="top"><font class="weaponch"><b>Еще раз пароль</b> <font color="#cc0000">*</font></font></td>
              <td valign="top"><input name="psw_s" type="password" class="LogintextBox4" maxlength="30"></td>
            </tr>
            <tr>
              <td valign="top"><font class="weaponch"><b>Ваш e-mail</b> <font color="#cc0000">*</font></font></td>
              <td valign="top"><input name="email" value="<?php echo $_POST['email']; ?>" type="text" class="LogintextBox4" maxlength="30"></td>
            </tr>
            <tr>
              <td valign="top"><font class="weaponch"><b>Ваше имя</b> <font color="#cc0000">*</font></font></td>
              <td valign="top"><input name="name" value="<?php echo $_POST['name']; ?>" type="text" class="LogintextBox4" maxlength="30"></td>
            </tr>
            <tr>
              <td valign="top"><font class="weaponch"><b>Страна</b> <font color="#cc0000">*</font></font></td>
              <td valign="top"><input name="country" value="<?php echo $_POST['country']; ?>" type="text" class="LogintextBox4" maxlength="20"></td>
            </tr>
            <tr>
              <td valign="top"><font class="weaponch"><b>Город</b> <font color="#cc0000">*</font></font></td>
              <td valign="top"><input name="city" value="<?php echo $_POST['city']; ?>" type="text" class="LogintextBox4" maxlength="20"></td>
            </tr>
            <tr>
              <td valign="top"><font class="weaponch"><b>Дата рождения</b> <font color="#cc0000">*</font></font></td>
              <td valign="top"><select name="bday" class="LogintextBox6">
                <option value="n" selected="selected"></option>
<?php
for($i=1;$i<32;$i++){
    echo
"                <option value="".$i.""> ".(($i>9)?$i:'0'.$i)." </option>n";
}
?>
              </select>
              <select name="bmonth" class="LogintextBox6">
                <option value="n" selected="selected"></option>
<?php
for($i=1;$i<13;$i++){
    echo
"                <option value="".$i.""> ".(($i>9)?$i:'0'.$i)." </option>n";
}
?>
              </select>
              <select name="byear" class="LogintextBox6">
                <option value="n" selected="selected"></option>
<?php
for($i=1950;$i<=(date("Y")-7);$i++){
    echo
"                <option value="".$i.""> ".$i." </option>n";
}
?>
              </select></td>
            </tr>
            <tr>
              <td valign="top"><font class="weaponch"><b>Ваш пол</b> <font color="#cc0000">*</font></font></td>
              <td valign="top"><select name="sex" class="LogintextBox4">
                <option value="n">Выберите</option>
                <option value="male">-- Мужской</option>
                <option value="female">-- Женский</option>
              </select></td>
            </tr>
            <tr>
              <td valign="top"><font class="weaponch"><b>Я принимаю</b> <font color="#cc0000">*</font></font></td>
              <td valign="top"><font class="weaponch">
                <input type="checkbox" name="agree" value="ok">
                <a href="#javascript:helpwin('zakon.html')">Законы и Соглашение GameLE.Ru</a></font></td>
            </tr>
            <tr>
              <td colspan="2"><div align="center"><font class="forumwe">
             <input type="image" src="http://image.gamele.ru/newreg.gif" width="139" height="15" border="0">
              </font></div></td>
            </tr>
          </table></td>
        </tr>
      </table></td>
    </tr>
  </table></div>
  </form>
</body>
</html>
Онлайн: 0
Реклама