<?php require_once 'autoload.php'; $session = new \website\utils\Session(); if ($session->isLogged()) { header('Location: .'); exit; } $method = $_SERVER['REQUEST_METHOD']; $loginStatus = null; if ($method == 'POST' && isset($_POST['login']) && isset($_POST['password'])) { $login = $_POST['login']; $password = $_POST['password']; $loginStatus = $session->login($login, $password); if ($loginStatus === true) { header('Location: .'); exit; } } $session->flushAndClose(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <meta name="description" content=""> <meta name="author" content=""> <link rel="icon" href="favicon.ico">