@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | if (is_array($query) && (count($query) > 0)) { |
70 | 70 | foreach ($query as $obj) { |
71 | - $sous_menu[] = [$obj->ID_page, $obj->titre, $obj->url, $obj->balise_title,]; |
|
71 | + $sous_menu[] = [$obj->ID_page, $obj->titre, $obj->url, $obj->balise_title, ]; |
|
72 | 72 | } |
73 | 73 | } |
74 | 74 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | if (is_array($query) && (count($query) > 0)) { |
91 | 91 | foreach ($query as $obj) { |
92 | - return [$obj->nom_module,$obj->url]; |
|
92 | + return [$obj->nom_module, $obj->url]; |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $dbc = App::getDb(); |
107 | 107 | |
108 | 108 | if ($afficher != null) { |
109 | - $dbc->insert($id, $value_id)->insert("ordre", $this->last_ordre+1)->into("navigation")->set(); |
|
109 | + $dbc->insert($id, $value_id)->insert("ordre", $this->last_ordre + 1)->into("navigation")->set(); |
|
110 | 110 | } |
111 | 111 | } |
112 | 112 |
@@ -31,8 +31,7 @@ discard block |
||
31 | 31 | identite.ID_identite = $id_identite |
32 | 32 | ORDER BY page.ordre |
33 | 33 | "); |
34 | - } |
|
35 | - else { |
|
34 | + } else { |
|
36 | 35 | $query = $dbc->query("SELECT ID_page, titre, balise_title, parent, url FROM page ORDER BY ordre"); |
37 | 36 | } |
38 | 37 | |
@@ -54,7 +53,9 @@ discard block |
||
54 | 53 | if ($parent != "") { |
55 | 54 | $query = $dbc->query("SELECT titre FROM page WHERE ID_page=".$parent); |
56 | 55 | if ((is_array($query)) && (count($query) > 0)) { |
57 | - foreach ($query as $obj) $this->parent_texte = $obj->titre; |
|
56 | + foreach ($query as $obj) { |
|
57 | + $this->parent_texte = $obj->titre; |
|
58 | + } |
|
58 | 59 | } |
59 | 60 | |
60 | 61 | return $this->parent_texte; |
@@ -182,13 +183,11 @@ discard block |
||
182 | 183 | $dbc->prepare("INSERT INTO page (titre, contenu, url, meta_description, balise_title, ordre, parent, affiche) VALUES (:titre, :contenu, :url, :meta_description, :balise_title, :ordre, :parent, :affiche)", $value); |
183 | 184 | $this->id_page = $dbc->lastInsertId(); |
184 | 185 | $this->setAjoutLienNavigation("ID_page", $this->id_page , 1); |
185 | - } |
|
186 | - else { |
|
186 | + } else { |
|
187 | 187 | FlashMessage::setFlash("Impossible de créer cette page, veuillez réeseyer dans un moment. Si le problème persiste contactez votre administrateur."); |
188 | 188 | $this->erreur = true; |
189 | 189 | } |
190 | - } |
|
191 | - else { |
|
190 | + } else { |
|
192 | 191 | $_SESSION['balise_title'] = $balise_title; |
193 | 192 | $_SESSION['url'] = $url; |
194 | 193 | $_SESSION['meta_description'] = $meta_description; |
@@ -261,8 +260,7 @@ discard block |
||
261 | 260 | |
262 | 261 | $dbc->prepare("UPDATE page SET titre=:titre_page, contenu=:contenu, url=:url, meta_description=:meta_description, balise_title=:balise_title, parent=:parent, affiche=:affiche WHERE ID_page=:id_page", $value); |
263 | 262 | $this->setModifierLienNavigation("ID_page", $id_page, $this->getParentId($parent), $affiche); |
264 | - } |
|
265 | - else { |
|
263 | + } else { |
|
266 | 264 | $_SESSION['balise_title'] = $balise_title; |
267 | 265 | $_SESSION['url'] = $url; |
268 | 266 | $_SESSION['meta_description'] = $meta_description; |
@@ -314,8 +312,7 @@ discard block |
||
314 | 312 | FlashMessage::setFlash("Impossible de supprimer cette page, veuillez contacter votre administrateur pour corriger ce problème"); |
315 | 313 | $this->erreur = true; |
316 | 314 | } |
317 | - } |
|
318 | - else { |
|
315 | + } else { |
|
319 | 316 | FlashMessage::setFlash("Impossible de supprimer cette page, veuillez contacter votre administrateur pour corriger ce problème"); |
320 | 317 | $this->erreur = true; |
321 | 318 | } |
@@ -332,8 +329,7 @@ discard block |
||
332 | 329 | if ($parent != "") { |
333 | 330 | $nav = new Navigation(); |
334 | 331 | $nav->setSupprimerLien($id, $id_page); |
335 | - } |
|
336 | - else if (($affiche == 1) && ($parent == "")) { |
|
332 | + } else if (($affiche == 1) && ($parent == "")) { |
|
337 | 333 | $this->setAjoutLienNavigation($id, $id_page, $affiche); |
338 | 334 | } |
339 | 335 | } |
@@ -1,17 +1,17 @@ |
||
1 | 1 | <nav class="nav-page"> |
2 | 2 | <div class="inner"> |
3 | 3 | <ul> |
4 | - <?php $nav = new \core\Navigation();foreach ($nav->getNavigation() as $nav):?> |
|
4 | + <?php $nav = new \core\Navigation(); foreach ($nav->getNavigation() as $nav):?> |
|
5 | 5 | <li><a href="<?=ADMWEBROOT?>gestion-contenus/modifier-contenu?id=<?=$nav[0]?>" title="<?=$nav[3]?>"><?=$nav[1]?></a> |
6 | 6 | <?php if (count($nav[4]) > 0):?> |
7 | 7 | <ul> |
8 | 8 | <?php foreach ($nav[4] as $snav):?> |
9 | 9 | <li><a href="<?=ADMWEBROOT?>gestion-contenus/modifier-contenu?id=<?=$snav[0]?>" title="<?=$snav[3]?>"><?=$snav[1]?></a></li> |
10 | - <?php endforeach;?> |
|
10 | + <?php endforeach; ?> |
|
11 | 11 | </ul> |
12 | - <?php endif;?> |
|
12 | + <?php endif; ?> |
|
13 | 13 | </li> |
14 | - <?php endforeach;?> |
|
14 | + <?php endforeach; ?> |
|
15 | 15 | </ul> |
16 | 16 | </div> |
17 | 17 | </nav> |