Внедрение шаблонизатора. Решение самых идиотских ошибок вёрстки. Кое-где исправлены ошибки синтаксиса php.

This commit is contained in:
Igor Barkov (iwork)
2020-09-30 22:12:34 +03:00
parent 8b1a2e9b38
commit a4de6c51a3
41 changed files with 4688 additions and 5715 deletions
+5 -14
View File
@@ -25,6 +25,7 @@ function mail_send($to, $from_user, $from_email, $subject = '(No subject)', $mes
return mail($to, $subject, $message, $headers);
}
if ($login) {
$loginCheck = db::c()->query('SELECT email FROM users WHERE login = "?s"', $login)->fetch_assoc();
if ($loginCheck) {
@@ -55,8 +56,7 @@ if ($login) {
if ($changePassword) {
if (db::c()->query('SELECT 1 FROM users_recovery WHERE `hash` = "?s" AND `date` < "?s"', $changePassword, date('Y-m-d'))->getNumRows()) {
$allowChange = true;
}
else {
} else {
$statusMessage = ERROR_OLD_HASH;
}
}
@@ -72,16 +72,9 @@ if ($newPassword && $hashCheck) {
$statusMessage = ERROR_WRONG_HASH;
}
}
Template::header('Восстановление пароля');
?>
<!DOCTYPE html>
<html lang="ru_RU">
<head>
<meta charset="utf-8">
<link href="css/main.css" rel="stylesheet"/>
<title>Восстановление пароля</title>
</head>
<body>
<a href="/"> ← на главную</a>
<a href="/"> ← на главную</a>
<?php if (!empty($statusMessage)): ?>
<h3><?php echo $statusMessage; ?></h3>
<?php endif; ?>
@@ -101,6 +94,4 @@ if ($newPassword && $hashCheck) {
<input required name="loginid" placeholder="Имя персонажа" value="<?= $login ?>"><br>
<input type=submit>
</form>
<?php endif; ?>
</body>
</html>
<?php endif;