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);
}
if (!isset($this->info['id'])) {
$this->info = Db::getRow('select * from users where login = ?', [$_COOKIE['login']]);
if ($this->info['dateEnter'] != $_SERVER['HTTP_USER_AGENT']) {
unset($this->info);
}
$this->btl_txt = $this->info['battle_text'];
if (!isset($this->info['id'])) {
unset($this->info);
setcookie('login', '', time() - 60 * 60 * 24, '', Core\Config::get('host'));
} else {
echo 'stats is lost.';
}
}
// if (!isset($this->info['id'])) {
// $this->info = Db::getRow('select * from users where login = ?', [$_COOKIE['login']]);
//
// if ($this->info['dateEnter'] != $_SERVER['HTTP_USER_AGENT']) {
// unset($this->info);
// }
// $this->btl_txt = $this->info['battle_text'];
// if (!isset($this->info['id'])) {
// unset($this->info);
// setcookie('login', '', time() - 60 * 60 * 24, '', Core\Config::get('host'));
// } else {
// echo 'stats is lost.';
// }
// }
if (isset($this->info['id'])) {
if ($this->info['invis'] == 1 || $this->info['invis'] > time()) {

View File

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