finalisation de ma part :)

This commit is contained in:
2019-03-06 09:13:31 +01:00
parent 9df001d565
commit cc8ee929f8
13 changed files with 91 additions and 101 deletions

View File

@ -40,9 +40,9 @@ class Controller {
// return $instance->$function();
}
} elseif ($arr[0] === "editor" && isset($cl) && $cl == $class) {
if(!isset($_SESSION["author"]) || (isset($_SESSION["author"]) && ($_SESSION["author"]->getRole() != "ROLE_EDITOR" && $_SESSION["author"]->getRole() != "ROLE_ADMIN"))) header("Location: /login/?redirect=".$_SERVER["REQUEST_URI"]);
if(!isset($_SESSION["author"]) || (isset($_SESSION["author"]) && ($_SESSION["author"]->getRole() != "ROLE_EDITOR" && $_SESSION["author"]->getRole() != "ROLE_ADMIN"))) header("Location: /login/");
} elseif($arr[0] === "admin" && isset($cl) && $cl ==$class) {
if(!isset($_SESSION["author"]) || (isset($_SESSION["author"]) && $_SESSION["author"]->getRole() != "ROLE_ADMIN")) header("Location: /login/?redirect=".$_SERVER["REQUEST_URI"]);
if(!isset($_SESSION["author"]) || (isset($_SESSION["author"]) && $_SESSION["author"]->getRole() != "ROLE_ADMIN")) header("Location: /login/");
} elseif($arr[0] === "title" && isset($cl) && $cl == $class) {
array_shift($arr);
$_GET['page_title'] = join(" ", $arr);