e59-website/html-old/admin.php
2024-03-15 15:04:10 +01:00

80 lines
2.0 KiB
PHP
Executable File

<?php
require "../include/variables.php";
require "../include/functions.php";
if($_SESSION['role'] < 3) {
header("Location: index.php");
http_response_code(404);
die();
}
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta name="robots" content="noindex">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./src/css/style.css">
<style>
@media (prefers-color-scheme: dark) {
.body {
<?=$theme_dark?>
}
}
@media (prefers-color-scheme: light) {
.body {
<?=$theme_light?>
}
}
</style>
<link rel="icon" href="./src/img/favicon.ico">
<title><?=$title?></title>
</head>
<body class="body">
<header>
<div class="pancontent">
<div class="athena-container">
<a href="<?=$root?>">
<img src="./src/img/athena-mono.png" class="athena">
</a>
</div>
<div class="content">
<div>
<div class="main-title">
<div class="title"><?=$header_title?></div>
<div class="subtitle"><?=$header_subtitle?></div>
</div>
</div>
</div>
</div>
</header>
<nav>
<div class="pancontent">
<?php nav($nav);?>
</div>
</nav>
<main>
<div class="content">
<div>
<div>
<?php
$markdownContent = file_get_contents('../content/admin.md');
require_once '../include/parsedown.php';
$parsedown = new Parsedown();
echo $parsedown->text($markdownContent);
?>
</div>
</div>
</div>
</main>
<footer>
<div class="content">
<div>
<div><?=$copyright?></div>
</div>
</div>
</footer>
</body>
</html>