aboutsummaryrefslogtreecommitdiff
path: root/src/router.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2025-12-16 22:41:57 +0100
committerpolo <ordipolo@gmx.fr>2025-12-16 22:41:57 +0100
commit423755b019a09111b971e36c53e2557e2f5a704f (patch)
tree022c0a911133d676dd8e4e90379f8b186863fc88 /src/router.php
parent22da81bbcb9bb61fa484c9af6fbb667b685d2f9b (diff)
downloadcms-423755b019a09111b971e36c53e2557e2f5a704f.tar.gz
cms-423755b019a09111b971e36c53e2557e2f5a704f.tar.bz2
cms-423755b019a09111b971e36c53e2557e2f5a704f.zip
page emails, application du RGPD: table email et nettoyeur, renommage de $id_email
Diffstat (limited to 'src/router.php')
-rw-r--r--src/router.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/router.php b/src/router.php
index 15d5a4c..d2eba18 100644
--- a/src/router.php
+++ b/src/router.php
@@ -38,6 +38,12 @@ if($request->getMethod() === 'GET'){
38 CalendarController::getData($entityManager); 38 CalendarController::getData($entityManager);
39 } 39 }
40 40
41 // pages interdites
42 if(!$_SESSION['admin'] && in_array(CURRENT_PAGE, ['menu_paths', 'new_page', 'user_edit', 'emails'])){
43 header('Location: ' . new URL);
44 die;
45 }
46
41 if($_SESSION['admin'] === true){ 47 if($_SESSION['admin'] === true){
42 // ... 48 // ...
43 } 49 }
@@ -113,6 +119,13 @@ elseif($request->getMethod() === 'POST'){
113 ContactFormController::sendTestEmail($entityManager, $json); 119 ContactFormController::sendTestEmail($entityManager, $json);
114 } 120 }
115 121
122 /* -- page emails -- */
123 elseif($_GET['action'] === 'delete_email'){
124 ContactFormController::deleteEmail($entityManager, $json);
125 }
126 elseif($_GET['action'] === 'toggle_sensitive_email'){
127 ContactFormController::toggleSensitiveEmail($entityManager, $json);
128 }
116 129
117 /* -- upload d'image dans tinymce par copier-coller -- */ 130 /* -- upload d'image dans tinymce par copier-coller -- */
118 // collage de HTML contenant une ou plusieurs balises <img> 131 // collage de HTML contenant une ou plusieurs balises <img>