diff options
author | polo <ordipolo@gmx.fr> | 2025-08-02 04:09:32 +0200 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2025-08-02 04:10:30 +0200 |
commit | 20e1d288035a274b48f0d2d26f547ad15e99761d (patch) | |
tree | 68198bf3804f39dc48c54d13759ac2a1cf37b15b /src | |
parent | 245f1c1f4f60f6841b557312ff49b2ee6bac9bf3 (diff) | |
download | cms-20e1d288035a274b48f0d2d26f547ad15e99761d.zip |
réorganisation 1: déplacement de trucs de index.php à post.php
Diffstat (limited to 'src')
-rw-r--r-- | src/controller/installation.php | 1 | ||||
-rw-r--r-- | src/controller/post.php | 17 |
2 files changed, 18 insertions, 0 deletions
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() | |||
33 | } | 33 | } |
34 | } | 34 | } |
35 | 35 | ||
36 | // inutilisée pour l'instant | ||
36 | function installation(): void | 37 | function installation(): void |
37 | { | 38 | { |
38 | /* -- droits des fichiers et dossiers -- */ | 39 | /* -- 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; | |||
9 | use App\Entity\Image; | 9 | use App\Entity\Image; |
10 | use Doctrine\Common\Collections\ArrayCollection; | 10 | use Doctrine\Common\Collections\ArrayCollection; |
11 | 11 | ||
12 | if(isset($_GET['action']) && $_GET['action'] === 'deconnexion') | ||
13 | { | ||
14 | disconnect($entityManager); | ||
15 | } | ||
16 | elseif(isset($_GET['action']) && $_GET['action'] === 'modif_mdp') | ||
17 | { | ||
18 | changePassword($entityManager); | ||
19 | } | ||
20 | elseif($_SESSION['admin'] && isset($_GET['page']) && isset($_GET['action']) && $_GET['action'] === 'modif_page' | ||
21 | && $_GET['page'] !== 'connexion' && $_GET['page'] !== 'article' && $_GET['page'] !== 'nouvelle_page' && $_GET['page'] !== 'menu_chemins') | ||
22 | { | ||
23 | // les contrôles de la 2è ligne devraient utiliser un tableau | ||
24 | MainBuilder::$modif_mode = true; | ||
25 | } | ||
26 | |||
27 | |||
28 | /* -- html form -- */ | ||
12 | if($_SERVER['REQUEST_METHOD'] === 'POST'){ | 29 | if($_SERVER['REQUEST_METHOD'] === 'POST'){ |
13 | // POST ordinaires non admin | 30 | // POST ordinaires non admin |
14 | 31 | ||