diff --git a/public/index.php b/public/index.php new file mode 100644 index 0000000..8e9f9cc --- /dev/null +++ b/public/index.php @@ -0,0 +1,55 @@ +query('SELECT COUNT(*) FROM articles'); +$total = (int)$totalStmt->fetchColumn(); +$pages = max(1, ceil($total / $perPage)); +$stmt = $pdo->prepare('SELECT id, titre, contenu, date_creation FROM articles ORDER BY date_creation DESC LIMIT :lim OFFSET :off'); +$stmt->bindValue(':lim', $perPage, PDO::PARAM_INT); +$stmt->bindValue(':off', $offset, PDO::PARAM_INT); +$stmt->execute(); +$articles = $stmt->fetchAll(); +?> + + + + + CMS Simplifié - Accueil + + + +
+

CMS Simplifié

+ +
+
+

Articles

+ +

Aucun article publié.

+ + +
+

+

...

+ Publié le +
+
+ + + +
+ + +