From 20e1d288035a274b48f0d2d26f547ad15e99761d Mon Sep 17 00:00:00 2001 From: polo Date: Sat, 2 Aug 2025 04:09:32 +0200 Subject: =?UTF-8?q?r=C3=A9organisation=201:=20d=C3=A9placement=20de=20truc?= =?UTF-8?q?s=20de=20index.php=20=C3=A0=20post.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controller/installation.php | 1 + src/controller/post.php | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) (limited to 'src') diff --git a/src/controller/installation.php b/src/controller/installation.php index acb87f1..d9ea44b 100644 --- a/src/controller/installation.php +++ b/src/controller/installation.php @@ -33,6 +33,7 @@ function phpDependancies() } } +// inutilisée pour l'instant function installation(): void { /* -- droits des fichiers et dossiers -- */ diff --git a/src/controller/post.php b/src/controller/post.php index bcafe6f..5d9500b 100644 --- a/src/controller/post.php +++ b/src/controller/post.php @@ -9,6 +9,23 @@ use App\Entity\Page; use App\Entity\Image; use Doctrine\Common\Collections\ArrayCollection; +if(isset($_GET['action']) && $_GET['action'] === 'deconnexion') +{ + disconnect($entityManager); +} +elseif(isset($_GET['action']) && $_GET['action'] === 'modif_mdp') +{ + changePassword($entityManager); +} +elseif($_SESSION['admin'] && isset($_GET['page']) && isset($_GET['action']) && $_GET['action'] === 'modif_page' + && $_GET['page'] !== 'connexion' && $_GET['page'] !== 'article' && $_GET['page'] !== 'nouvelle_page' && $_GET['page'] !== 'menu_chemins') +{ + // les contrôles de la 2è ligne devraient utiliser un tableau + MainBuilder::$modif_mode = true; +} + + +/* -- html form -- */ if($_SERVER['REQUEST_METHOD'] === 'POST'){ // POST ordinaires non admin -- cgit v1.2.3