Refonte complète du projet

This commit is contained in:
2025-11-02 19:53:50 +01:00
commit 20df067b19
16 changed files with 326 additions and 0 deletions

18
includes/db.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
$host = 'localhost';
$db = 'cms_simplifie';
$user = 'root';
$pass = 'root';
$charset = 'utf8mb4';
$dsn = "mysql:host=$host;dbname=$db;charset=$charset";
$options = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
];
try {
$pdo = new PDO($dsn, $user, $pass, $options);
} catch (\PDOException $e) {
die("Erreur de connexion : " . $e->getMessage());
}

6
includes/footer.php Normal file
View File

@@ -0,0 +1,6 @@
</main>
<footer>
<p>&copy; 2025 Mini CMS. Tous droits réservés.</p>
</footer>
</body>
</html>

17
includes/header.php Normal file
View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>CMS</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Mini CMS</h1>
<nav>
<a href="index.php">Accueil</a>
<a href="add.php">Ajouter un article</a>
<a href="login.php">Connexion</a>
</nav>
</header>
<main>