AJOUT CMS

This commit is contained in:
2025-11-02 14:12:16 +01:00
commit 1525b28f60
21 changed files with 560 additions and 0 deletions

27
admin/login.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
require '../include/db.php';
require '../include/auth.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></head>
<body>
<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>
<p style="color:red;"><?= $error ?></p>
</body>
</html>