1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2024-12-26 07:42:24 +00:00
plateforme-corres2math/server_files/controllers/index.php

17 lines
393 B
PHP
Raw Normal View History

<?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";