diff --git a/functions/addProject.php b/functions/addProject.php index 1cff360..300f119 100644 --- a/functions/addProject.php +++ b/functions/addProject.php @@ -4,7 +4,7 @@ require_once 'databaseConnection.php'; // Pour faire cette fonction l'utilisateur doit être administrateur if (!isset($_SESSION['role']) || $_SESSION['role'] !== 'admin') { - header('Location: home.php'); + header('Location: ../pages/home.php'); exit; } @@ -32,7 +32,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ]); // Redirection vers projects.php ds que la requete est executée - header('Location: projects.php'); + header('Location: ../pages/projects.php'); exit; } catch (PDOException $e) { @@ -46,7 +46,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { } } else { // Si on y accède de façon peu légitime sans requête POST on refuse - header('Location: projects.php'); + header('Location: ../pages/projects.php'); exit; } ?> diff --git a/pages/projects.php b/pages/projects.php index 3235bd3..e6598e8 100644 --- a/pages/projects.php +++ b/pages/projects.php @@ -23,7 +23,7 @@ if (isset($_SESSION['role']) && $_SESSION['role'] === 'admin') { ?> -
+ @@ -47,4 +47,8 @@ if (isset($_SESSION['role']) && $_SESSION['role'] === 'admin') { ?> \ No newline at end of file