first commit
This commit is contained in:
commit
b216a187bd
34 changed files with 4829 additions and 0 deletions
36
admin/index.php
Normal file
36
admin/index.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
require_once 'init.php';
|
||||
|
||||
$connected = "false";
|
||||
|
||||
if (!isset($_GET["page"])) {
|
||||
header("Location: ?page=home");
|
||||
exit;
|
||||
}
|
||||
|
||||
$page = sanitizeInput($_GET["page"]);
|
||||
|
||||
// Vérifier l'authentification
|
||||
if (isAuthenticated()) {
|
||||
$admin = array(
|
||||
"username" => $_SESSION['username']
|
||||
);
|
||||
$connected = "true";
|
||||
} else {
|
||||
$page = "login";
|
||||
}
|
||||
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../Static/css/admin.css">
|
||||
<script type="module" src="../Static/js/admin.js" defer></script>
|
||||
<title>Administration</title>
|
||||
</head>
|
||||
<body<?= ($page == "login") ? " class='login-page'" : "" ?>>
|
||||
<?php require_once $page.".php" ?>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue