Compare commits

..

4 Commits

2 changed files with 18 additions and 18 deletions

View File

@ -1941,20 +1941,20 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
setcookie('btl', $this->info['battle'], time() + 86400); setcookie('btl', $this->info['battle'], time() + 86400);
} }
if (!isset($this->info['id'])) { // if (!isset($this->info['id'])) {
$this->info = Db::getRow('select * from users where login = ?', [$_COOKIE['login']]); // $this->info = Db::getRow('select * from users where login = ?', [$_COOKIE['login']]);
//
if ($this->info['dateEnter'] != $_SERVER['HTTP_USER_AGENT']) { // if ($this->info['dateEnter'] != $_SERVER['HTTP_USER_AGENT']) {
unset($this->info); // unset($this->info);
} // }
$this->btl_txt = $this->info['battle_text']; // $this->btl_txt = $this->info['battle_text'];
if (!isset($this->info['id'])) { // if (!isset($this->info['id'])) {
unset($this->info); // unset($this->info);
setcookie('login', '', time() - 60 * 60 * 24, '', Core\Config::get('host')); // setcookie('login', '', time() - 60 * 60 * 24, '', Core\Config::get('host'));
} else { // } else {
echo 'stats is lost.'; // echo 'stats is lost.';
} // }
} // }
if (isset($this->info['id'])) { if (isset($this->info['id'])) {
if ($this->info['invis'] == 1 || $this->info['invis'] > time()) { if ($this->info['invis'] == 1 || $this->info['invis'] > time()) {

View File

@ -37,18 +37,17 @@ if (isset($_POST['relogin'])) {
if ($lst_psw) { if ($lst_psw) {
$error = 'Высылать пароль можно не более одного раза в сутки.'; $error = 'Высылать пароль можно не более одного раза в сутки.';
} elseif ( } elseif (
str_replace('0', '', $_POST['redate']) == str_replace('0', '', $usr['bithday']) str_replace('0', '', date('d.m.Y', strtotime($_POST['redate']))) == str_replace('0', '', $usr['bithday'])
) { ) {
$error = '<br><br><br>Пароль от персонажа &quot;' . $usr['login'] . '&quot; был успешно выслан на E-mail указанный при регистрации! <br><br><br>';
$re = Db::getValue( $re = Db::getValue(
'select count(*) from logs_auth where uid = ? and type = 0 and depass != ?', 'select count(*) from logs_auth where uid = ? and type = 0 and depass != ?',
[$usr['id'], ''] [$usr['id'], '']
); );
if ($u['securetime'] < Config::get('securetime')) { if ($usr['securetime'] < Config::get('securetime')) {
unset($re); unset($re);
} }
if (!isset($re)) { if (!empty($re)) {
$newPassword = PassGen::new(); $newPassword = PassGen::new();
$title = 'Восстановление пароля от "' . $usr['login'] . '".'; $title = 'Восстановление пароля от "' . $usr['login'] . '".';
$txt = 'Добрый день.<br>'; $txt = 'Добрый день.<br>';
@ -75,6 +74,7 @@ if (isset($_POST['relogin'])) {
$error = $mail; $error = $mail;
} }
unset($mail); unset($mail);
$error = '<br><br><br>Пароль от персонажа &quot;' . $usr['login'] . '&quot; был успешно выслан на E-mail указанный при регистрации! <br><br><br>';
} }
} else { } else {
$error = 'Неверно указан день рождения.'; $error = 'Неверно указан день рождения.';