first commit
This commit is contained in:
16
includes/db.php
Normal file
16
includes/db.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
$host = 'localhost';
|
||||
$dbname = 'cms_simplifie';
|
||||
$username = 'root';
|
||||
$password = '';
|
||||
|
||||
try {
|
||||
$pdo = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8", $username, $password);
|
||||
|
||||
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
} catch (PDOException $e) {
|
||||
die("Erreur de connexion à la base de données : " . $e->getMessage());
|
||||
}
|
||||
?>
|
||||
6
includes/footer.php
Normal file
6
includes/footer.php
Normal file
@@ -0,0 +1,6 @@
|
||||
</main>
|
||||
<footer>
|
||||
<p>© <?= date('Y') ?> - CMS Simplifié</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
16
includes/header.php
Normal file
16
includes/header.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>CMS Simplifié</title>
|
||||
<link rel="stylesheet" href="../assets/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Mon CMS Simplifié</h1>
|
||||
<nav>
|
||||
<a href="../public/index.php">Accueil</a>
|
||||
<a href="../admin/login.php">Administration</a>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
Reference in New Issue
Block a user