diff options
| author | polo <ordipolo@gmx.fr> | 2025-08-11 06:25:39 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-08-11 06:25:39 +0200 |
| commit | d7468fc363b5d028db84373d4abfa6d7d19bacb9 (patch) | |
| tree | 0235e6c7520bb16b939f3e753ccd45c94bfaef28 /src/view/FooterBuilder.php | |
| parent | 90673ef19133e037cf401773f4262ba3d7d050bf (diff) | |
| download | cms-d7468fc363b5d028db84373d4abfa6d7d19bacb9.tar.gz cms-d7468fc363b5d028db84373d4abfa6d7d19bacb9.tar.bz2 cms-d7468fc363b5d028db84373d4abfa6d7d19bacb9.zip | |
nouveau routeur! et contrôleurs et vues pour la connexion et la gestion du compte, début d'utilisation de Request et Response
Diffstat (limited to 'src/view/FooterBuilder.php')
| -rw-r--r-- | src/view/FooterBuilder.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/view/FooterBuilder.php b/src/view/FooterBuilder.php index 14f9cd7..8a519f8 100644 --- a/src/view/FooterBuilder.php +++ b/src/view/FooterBuilder.php | |||
| @@ -28,7 +28,7 @@ class FooterBuilder extends AbstractBuilder | |||
| 28 | if($_SESSION['admin']) | 28 | if($_SESSION['admin']) |
| 29 | { | 29 | { |
| 30 | $empty_admin_zone = 'empty_admin_zone'; | 30 | $empty_admin_zone = 'empty_admin_zone'; |
| 31 | $link_edit_page = new URL(['page' => CURRENT_PAGE]); | 31 | $link_edit_page = CURRENT_PAGE === 'article' ? new URL(['page' => 'accueil']) : new URL(['page' => CURRENT_PAGE]); |
| 32 | if(MainBuilder::$modif_mode){ | 32 | if(MainBuilder::$modif_mode){ |
| 33 | $mode = 'modification de page'; | 33 | $mode = 'modification de page'; |
| 34 | $div_admin = 'logged_in modif_mode'; | 34 | $div_admin = 'logged_in modif_mode'; |
| @@ -43,10 +43,10 @@ class FooterBuilder extends AbstractBuilder | |||
| 43 | $link_new_page = new URL(['page' => 'nouvelle_page']); | 43 | $link_new_page = new URL(['page' => 'nouvelle_page']); |
| 44 | $link_change_paths = new URL(['page' => 'menu_chemins']); | 44 | $link_change_paths = new URL(['page' => 'menu_chemins']); |
| 45 | 45 | ||
| 46 | $link_change_password = new URL(['from' => CURRENT_PAGE, 'action' => 'modif_mdp']); | 46 | $link_change_password = new URL(['page' => 'user_edit', 'from' => CURRENT_PAGE]); |
| 47 | isset($_GET['id']) ? $link_change_password->addParams(['id' => $_GET['id']]) : ''; | 47 | isset($_GET['id']) ? $link_change_password->addParams(['id' => $_GET['id']]) : ''; |
| 48 | 48 | ||
| 49 | $link_logout = new URL(['page' => CURRENT_PAGE, 'action' => 'deconnexion']); | 49 | $link_logout = new URL(['action' => 'deconnection', 'from' => CURRENT_PAGE]); |
| 50 | isset($_GET['id']) ? $link_logout->addParams(['id' => $_GET['id']]) : ''; | 50 | isset($_GET['id']) ? $link_logout->addParams(['id' => $_GET['id']]) : ''; |
| 51 | 51 | ||
| 52 | $zone_admin = '<div class="admin_buttons_zone"> | 52 | $zone_admin = '<div class="admin_buttons_zone"> |
| @@ -54,7 +54,7 @@ class FooterBuilder extends AbstractBuilder | |||
| 54 | '<div><a href="' . $link_new_page . '"><button>Nouvelle page</button></a></div>' . "\n" . | 54 | '<div><a href="' . $link_new_page . '"><button>Nouvelle page</button></a></div>' . "\n" . |
| 55 | '<div><a href="' . $link_edit_page . '"><button>' . $link_edit_label . '</button></a></div>' . "\n" . | 55 | '<div><a href="' . $link_edit_page . '"><button>' . $link_edit_label . '</button></a></div>' . "\n" . |
| 56 | '<div><a href="' . $link_change_paths . '"><button>Menu et chemins</button></a></div>' . "\n" . | 56 | '<div><a href="' . $link_change_paths . '"><button>Menu et chemins</button></a></div>' . "\n" . |
| 57 | '<div><a href="' . $link_change_password . '"><button>Changer de mot de passe</button></a></div>' . "\n" . | 57 | '<div><a href="' . $link_change_password . '"><button>Mon compte</button></a></div>' . "\n" . |
| 58 | '<div><a href="' . $link_logout . '"><button>Déconnexion</button></a></div>' . "\n" . | 58 | '<div><a href="' . $link_logout . '"><button>Déconnexion</button></a></div>' . "\n" . |
| 59 | '</div>' . "\n"; | 59 | '</div>' . "\n"; |
| 60 | } | 60 | } |
