Внедрение шаблонизатора.

This commit is contained in:
Igor Barkov (iwork) 2020-09-30 17:36:55 +03:00
parent 6f903573d0
commit bc0992f281
1 changed files with 5 additions and 15 deletions

View File

@ -51,19 +51,9 @@ if ($username && $password) {
} else {
$error = ERROR_EMPTY_CREDENTIALS;
}
?>
<!doctype html>
<html lang="ru-RU">
<head>
<meta charset=UTF-8">
<link href="css/main.css" rel="stylesheet">
<title>Входим...</title>
</head>
<body>
<?php if (!empty($error)): ?>
<a href="/"> на главную</a>
<h1><?= $error ?></h1>
<?php endif; ?>
</body>
</html>
Template::header('Входим...');
if ($error) {
echo sprintf('<a href="/"> ← на главную</a><h1>%s</h1>', $error);
}