1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-03 10:02:47 +02:00

Possibilité de modification de la page d'accueil

This commit is contained in:
Yohann
2019-10-17 00:35:06 +02:00
parent a580086312
commit b571598a3c
5 changed files with 118 additions and 66 deletions

View File

@ -1,3 +1,16 @@
<?php
if (isset($_GET["edit"])) {
if (!isset($_SESSION["user_id"]) || $_SESSION["role"] != Role::ADMIN)
require_once "server_files/403.php";
if (isset($_POST["edit_page"])) {
$content = $_POST["content"];
$CONFIG->setIndexPage(htmlspecialchars($content));
header("Location: /");
exit(0);
}
}
require_once "server_files/views/index.php";