Исправлена ошибка в рассчётах завтрашнего числа.
This commit is contained in:
parent
c70f681078
commit
aea6563285
@ -25,7 +25,7 @@ $login = filter_input(INPUT_POST, 'loginid', FILTER_SANITIZE_SPECIAL_CHARS);
|
|||||||
if ($login) {
|
if ($login) {
|
||||||
$sql = db::c()->query('SELECT `login`, `email` FROM `users` WHERE `login` = "?s"', $login)->fetch_assoc();
|
$sql = db::c()->query('SELECT `login`, `email` FROM `users` WHERE `login` = "?s"', $login)->fetch_assoc();
|
||||||
$newpass = random_password();
|
$newpass = random_password();
|
||||||
$lasttime = date('Y-m-d', strtotime($Date . ' + 1 days'));
|
$lasttime = date('Y-m-d', strtotime('+1days'));
|
||||||
$ip = $_SERVER['REMOTE_ADDR'];
|
$ip = $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
if ($sql['login'] && db::c()->query('INSERT INTO `confirmpasswd` (`login`, `passwd`, `date`, `ip`, `active`) VALUES ("?s", "?s", "?s", "?s", "?s")', $sql['login'], $newpass, $lasttime, $ip)) {
|
if ($sql['login'] && db::c()->query('INSERT INTO `confirmpasswd` (`login`, `passwd`, `date`, `ip`, `active`) VALUES ("?s", "?s", "?s", "?s", "?s")', $sql['login'], $newpass, $lasttime, $ip)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user