diff --git a/article.php b/article.php index e69de29..b7935b8 100644 --- a/article.php +++ b/article.php @@ -0,0 +1,49 @@ +prepare($sql); +$stmt->execute([$id_article]); + +$article = $stmt->fetch(PDO::FETCH_ASSOC); + +if ($article === false) { + die("Erreur 404 : L'article demandé est introuvable."); +} +?> + + + + + <?php print htmlspecialchars($article['titre']); ?> + + + + ← Retour à l'accueil + +
+ +
+

+ +

+ Publié le : +

+ +
+ +
+
+ + + \ No newline at end of file diff --git a/dashboard.php b/dashboard.php new file mode 100644 index 0000000..ef5ae08 --- /dev/null +++ b/dashboard.php @@ -0,0 +1,40 @@ + + + + + + Tableau de Bord - Admin + + + +
+

Tableau de Bord

+

Bienvenue, ! (ID: )

+ +
+ +
+ +
+

Gestion des articles

+

C'est ici que vous pourrez bientôt gérer vos articles.

+ + +
+ + + \ No newline at end of file diff --git a/login.php b/login.php new file mode 100644 index 0000000..a30cb85 --- /dev/null +++ b/login.php @@ -0,0 +1,71 @@ +prepare($sql); + $stmt->execute([$login_saisi]); + $utilisateur = $stmt->fetch(PDO::FETCH_ASSOC); + + if ($utilisateur && password_verify($password_saisi, $utilisateur['password'])) { + + $_SESSION['user_id'] = $utilisateur['id']; + $_SESSION['user_login'] = $utilisateur['login']; + + header('Location: dashboard.php'); + exit; + } else { + $erreur_message = "Login ou mot de passe incorrect."; + } + } +} +?> + + + + + + Connexion - Admin + + + +

Zone Admin

+ + + + + +
+
+ + +
+
+ + +
+
+ +
+
+ + + \ No newline at end of file diff --git a/logout.php b/logout.php new file mode 100644 index 0000000..cc07c4a --- /dev/null +++ b/logout.php @@ -0,0 +1,8 @@ + \ No newline at end of file