first commit

This commit is contained in:
2025-11-02 18:08:53 +01:00
commit cb045fb9e1
23 changed files with 1363 additions and 0 deletions

38
admin/login.php Normal file
View File

@@ -0,0 +1,38 @@
<?php
require '../include/db.php';
require '../include/authenticator.php';
$error = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (checkLogin($pdo, $_POST['login'], $_POST['password'])) {
header('Location: board.php');
exit;
} else {
$error = 'Identifiants incorrects';
}
}
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Connexion</title>
<link rel="stylesheet" href="../assets/login.css">
</head>
<body>
<nav>
<a href="../index.php">Accueil</a>
</nav>
<main>
<h1>Connexion</h1>
<form method="post">
<input type="text" name="login" placeholder="Login" required><br>
<input type="password" name="password" placeholder="Mot de passe" required><br>
<button type="submit">Se connecter</button>
</form>
</main>
<p class="error"><?= $error ?></p>
</body>
</html>