• Гость, поддержи форум! Нажимай на рекламу!
Поддержи проект! Нажми!
Fruit-Farm SM Version

Fruit-Farm SM Version 1.0.0

Нет прав для скачивания
#21
I do not know what exactly happens, when registering a new user, everything works correctly, however in the database the email data is not entered, the rest of the data is entered correctly, I have looked at the code several times and it seems What is all right, I do not know why that does not work, any ideas?
Thank you

# Регистрация
$csrfCheck = $func->csrfVerify();
if(isset($_POST["signup"]) and $csrfCheck == TRUE){
$validate = GUMP::is_valid($_POST, array(
'captcha' => 'required',
'login' => 'required|alpha_numeric|max_len,20|min_len,4',
'email' => 'required|valid_email',
'password' => 'required|max_len,20|min_len,4|alpha_numeric',
'repass' => 'required|max_len,20|min_len,4|alpha_numeric',
));

if($validate == true) {
$captcha = $_POST["captcha"];
$email = $_POST["email"];
$login = $_POST["login"];
$password = $_POST["password"];
$securePass = $func->md5Password($_POST["password"]);
$repass = $func->md5Password($_POST["repass"]);

if(isset($_SESSION["captcha"]) AND strtolower($_SESSION["captcha"]) == strtolower($_POST["captcha"])){
unset($_SESSION["captcha"]);
$ip = $func->UserIP;
$rules = isset($_POST["rules"]) ? true : false;
$time = time();
$referer_id = (isset($_COOKIE["i"]) AND intval($_COOKIE["i"]) > 0 AND intval($_COOKIE["i"]) < 1000000) ? intval($_COOKIE["i"]) : 1;
$referer_name = "";
if($referer_id != 1){
$db->Query("SELECT user FROM db_users_a WHERE id = '$referer_id' LIMIT 1");
if($db->NumRows() > 0){$referer_name = $db->FetchRow();}
else{ $referer_id = 1; $referer_name = "Admin"; }
}else{ $referer_id = 1; $referer_name = "Admin"; }
if($rules){
if($email !== false){
if($login !== false){
if($password !== false){
if($password = $repass){
$db->Query("SELECT COUNT(*) FROM db_users_a WHERE user = '$login'");
if($db->FetchRow() == 0){
# Регаем пользователя
$db->Query("INSERT INTO db_users_a (user, email, pass, referer, referer_id, date_reg, ip) VALUES ('$login','{$email}','$securePass','$referer_name','$referer_id','$time',INET_ATON('$ip'))");
$lid = $db->LastInsert();
$db->Query("INSERT INTO db_users_b (id, user, a_t, last_sbor) VALUES ('$lid','$login','1', '".time()."')");
# Вставляем статистику
$db->Query("UPDATE db_stats SET all_users = all_users +1 WHERE id = '1'");
# Отправляем на почту
$sender = new Isender;
$sender -> SendAfterReg($login,$email, $password);
$_SESSION["user_id"] = $lid;
$_SESSION["user"] = $login;
$_SESSION["referer_id"] = $referer_id;
Header("Location: /account");
?></section>
<div class="clr"></div>
<?PHP
return;
}else $showError = $lang['error_messages']['usernameInUse'];
}else $showError = $lang['error_messages']['passwordMatch'];
}else $showError = $lang['error_messages']['emptyPassword'];
}else $showError = $lang['error_messages']['emptyLogin'];
}else $showError = $lang['error_messages']['emailInvalid'];
}else $showError = $lang['error_messages']['tosConfirm'];
}else $showError = $lang['error_messages']['captcha'];
}else{
$showError = $lang['error_messages']['invalidData'];
}
}
?>
 

Вложения

#22
Вот что выдаёт
Warning: require_once(__DIR__/composer/autoload_real.php) [function.require-once]: failed to open stream: No such file or directory in D:\home\test\www\vendor\autoload.php on line 5

Fatal error: require_once() [function.require]: Failed opening required '__DIR__/composer/autoload_real.php' (include_path='.;/usr/local/php5/PEAR') in D:\home\test\www\vendor\autoload.php on line 5
 
Поддержи проект! Нажми!