mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-07 03:29:19 +02:00
28 lines
867 B
PHP
28 lines
867 B
PHP
<?php
|
|
require_once __DIR__ . "/../../bootstrap.php";
|
|
require_once __DIR__ . '/../../src/AdminAuth.php';
|
|
AdminAuth::requireLogin();
|
|
require_once __DIR__ . '/../../src/Database.php';
|
|
|
|
$pageTitle = "Contenus";
|
|
|
|
if (empty($_SESSION['csrf_token'])) {
|
|
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
|
|
}
|
|
|
|
try {
|
|
$db = new Database();
|
|
$pages = $db->getAllPages();
|
|
$aproposKeys = $db->getAllAproposContents();
|
|
$formHelpBlocks = $db->getAllFormHelpBlocks();
|
|
} catch (Exception $e) {
|
|
error_log("Error loading contenus: " . $e->getMessage());
|
|
die("Erreur lors du chargement des contenus.");
|
|
}
|
|
|
|
$isAdmin = true; $bodyClass = 'admin-body';
|
|
require_once APP_ROOT . '/templates/head.php';
|
|
include APP_ROOT . '/templates/header.php';
|
|
include APP_ROOT . '/templates/admin/contenus.php';
|
|
require_once APP_ROOT . '/templates/admin/footer.php';
|