diff options
Diffstat (limited to 'src/controller/post.php')
| -rw-r--r-- | src/controller/post.php | 17 |
1 files changed, 17 insertions, 0 deletions
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 | ||
