@@ -76,8 +76,7 @@ |
||
76 | 76 | |
77 | 77 | if ($id_page != 0) { |
78 | 78 | $query = $dbc->query("SELECT balise_title, meta_description, ID_page FROM page WHERE ID_page=".$id_page); |
79 | - } |
|
80 | - else { |
|
79 | + } else { |
|
81 | 80 | $query = $dbc->query("SELECT balise_title, meta_description, ID_page FROM page WHERE url LIKE '$url'"); |
82 | 81 | } |
83 | 82 |
@@ -14,8 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | if($no_module === null) { |
16 | 16 | $query = $dbc->select()->from("navigation")->orderBy("ordre")->get(); |
17 | - } |
|
18 | - else { |
|
17 | + } else { |
|
19 | 18 | $query = $dbc->select()->from("navigation")->where("ID_page", " IS NOT ", "NULL")->orderBy("ordre")->get(); |
20 | 19 | } |
21 | 20 | |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | foreach ($query as $obj) { |
24 | 23 | if ($obj->ID_page === null) { |
25 | 24 | $navigation[] = $this->getLienNavigationModule($obj->ID_module); |
26 | - } |
|
27 | - else { |
|
25 | + } else { |
|
28 | 26 | $navigation[] = $this->getLienNavigationPage($obj->ID_page); |
29 | 27 | } |
30 | 28 | $last_ordre = $obj->ordre; |
@@ -130,8 +130,7 @@ discard block |
||
130 | 130 | foreach ($query as $obj) { |
131 | 131 | if ($obj->activer == 1) { |
132 | 132 | return true; |
133 | - } |
|
134 | - else { |
|
133 | + } else { |
|
135 | 134 | return false; |
136 | 135 | } |
137 | 136 | } |
@@ -183,8 +182,7 @@ discard block |
||
183 | 182 | |
184 | 183 | if ($activer == 1) { |
185 | 184 | $nav->setAjoutLien("ID_module", self::getUrlToId($url)); |
186 | - } |
|
187 | - else { |
|
185 | + } else { |
|
188 | 186 | $nav->setSupprimerLien("ID_module", self::getUrlToId($url)); |
189 | 187 | } |
190 | 188 | } |
@@ -36,12 +36,10 @@ discard block |
||
36 | 36 | if ($this->getTestInt($value) === true) { |
37 | 37 | $this->acces_administration = $value; |
38 | 38 | return true; |
39 | - } |
|
40 | - else if ($this->getTestInt($value) === false) { |
|
39 | + } else if ($this->getTestInt($value) === false) { |
|
41 | 40 | $this->erreur .= "<li>Le champs accès administration n'est pas au bon format</li>"; |
42 | 41 | return false; |
43 | - } |
|
44 | - else { |
|
42 | + } else { |
|
45 | 43 | return true; |
46 | 44 | } |
47 | 45 | |
@@ -59,12 +57,10 @@ discard block |
||
59 | 57 | if ($this->getTestInt($value) === true) { |
60 | 58 | $this->id_liste_droit_acces = $value; |
61 | 59 | return true; |
62 | - } |
|
63 | - else if ($this->getTestInt($value) === false) { |
|
60 | + } else if ($this->getTestInt($value) === false) { |
|
64 | 61 | $this->erreur .= "<li>Le champs accès administration n'est pas au bon format</li>"; |
65 | 62 | return false; |
66 | - } |
|
67 | - else { |
|
63 | + } else { |
|
68 | 64 | return true; |
69 | 65 | } |
70 | 66 |
@@ -66,8 +66,7 @@ discard block |
||
66 | 66 | $this->reload_cache = $obj->reload_cache; |
67 | 67 | $this->no_cache = $obj->no_cache; |
68 | 68 | } |
69 | - } |
|
70 | - else { |
|
69 | + } else { |
|
71 | 70 | $value = [ |
72 | 71 | "nom_fichier" => $this->page, |
73 | 72 | "reload_cache" => 0 |
@@ -108,16 +107,14 @@ discard block |
||
108 | 107 | require_once($this->chemin_cache); |
109 | 108 | |
110 | 109 | return true; |
111 | - } |
|
112 | - else { |
|
110 | + } else { |
|
113 | 111 | if ($this->no_cache == null) { |
114 | 112 | ob_start(); |
115 | 113 | } |
116 | 114 | |
117 | 115 | return false; |
118 | 116 | } |
119 | - } |
|
120 | - else { |
|
117 | + } else { |
|
121 | 118 | return false; |
122 | 119 | } |
123 | 120 | } |
@@ -55,8 +55,7 @@ discard block |
||
55 | 55 | if ($query) { |
56 | 56 | $obj = $query->fetchAll(PDO::FETCH_OBJ); |
57 | 57 | return $obj; |
58 | - } |
|
59 | - else { |
|
58 | + } else { |
|
60 | 59 | FlashMessage::setFlash("Une erreur est survenue en executant cette requette : ".$req); |
61 | 60 | } |
62 | 61 | } |
@@ -84,8 +83,7 @@ discard block |
||
84 | 83 | public function rechercherEgalite($table, $champ, $value, $id_table = null, $id = null) { |
85 | 84 | if ($id == null) { |
86 | 85 | $query = $this->getPdo()->query("SELECT COUNT($champ) as nb FROM $table WHERE $champ LIKE '$value'"); |
87 | - } |
|
88 | - else { |
|
86 | + } else { |
|
89 | 87 | $query = $this->getPdo()->query("SELECT COUNT($champ) as nb FROM $table WHERE $champ LIKE '$value' AND $id_table != $id"); |
90 | 88 | } |
91 | 89 | |
@@ -94,9 +92,10 @@ discard block |
||
94 | 92 | $nb = $obj["nb"]; |
95 | 93 | } |
96 | 94 | |
97 | - if ((isset($nb)) && ($nb != 0)) return true; |
|
98 | - } |
|
99 | - else { |
|
95 | + if ((isset($nb)) && ($nb != 0)) { |
|
96 | + return true; |
|
97 | + } |
|
98 | + } else { |
|
100 | 99 | return false; |
101 | 100 | } |
102 | 101 | } |
@@ -113,8 +112,7 @@ discard block |
||
113 | 112 | |
114 | 113 | if ($query->rowCount() > 0) { |
115 | 114 | return true; |
116 | - } |
|
117 | - else { |
|
115 | + } else { |
|
118 | 116 | return false; |
119 | 117 | } |
120 | 118 | } |
@@ -108,8 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | if ($no_bind === true) { |
110 | 110 | $this->conditions_table[] = $champ.$cond.$champ_test." ".$closure; |
111 | - } |
|
112 | - else { |
|
111 | + } else { |
|
113 | 112 | $this->conditions[] = $cond; |
114 | 113 | $this->addWhere($champ, $champ_test); |
115 | 114 | } |
@@ -121,7 +120,9 @@ discard block |
||
121 | 120 | * @param string $order |
122 | 121 | */ |
123 | 122 | public function orderBy($order, $type = null) { |
124 | - if ($type === null) $type = "ASC"; |
|
123 | + if ($type === null) { |
|
124 | + $type = "ASC"; |
|
125 | + } |
|
125 | 126 | |
126 | 127 | $this->order_by = " ORDER BY ".$order." ".$type." "; |
127 | 128 |
@@ -39,8 +39,7 @@ discard block |
||
39 | 39 | $acces_admin = $_SESSION['acces_admin']; |
40 | 40 | |
41 | 41 | unset($_SESSION['err_ajout_utilisateur']); |
42 | - } |
|
43 | - else { |
|
42 | + } else { |
|
44 | 43 | $nom = null; |
45 | 44 | $prenom = null; |
46 | 45 | $pseudo = null; |
@@ -67,8 +66,7 @@ discard block |
||
67 | 66 | $contenu_page = $_SESSION['contenu']; |
68 | 67 | |
69 | 68 | unset($_SESSION['err_modification_contenu']); |
70 | - } |
|
71 | - else if (($page == "gestion-contenus/modifier-contenu") || ($page == "gestion-contenus/inline")) { |
|
69 | + } else if (($page == "gestion-contenus/modifier-contenu") || ($page == "gestion-contenus/inline")) { |
|
72 | 70 | $id_page_courante = $_GET['id']; |
73 | 71 | |
74 | 72 | $contenu->getHeadPage($id_page_courante); |
@@ -85,8 +83,7 @@ discard block |
||
85 | 83 | if ($url == "") { |
86 | 84 | $url = "index"; |
87 | 85 | } |
88 | - } |
|
89 | - else { |
|
86 | + } else { |
|
90 | 87 | $balise_title = null; |
91 | 88 | $url = null; |
92 | 89 | $meta_description = null; |
@@ -124,8 +121,7 @@ discard block |
||
124 | 121 | $contenu_dynamique = $config->getContenusDynamique(); |
125 | 122 | $responsive = $config->getResponsive(); |
126 | 123 | $cache_config = $config->getCache(); |
127 | - } |
|
128 | - else { |
|
124 | + } else { |
|
129 | 125 | $config = new \core\Configuration(); |
130 | 126 | $nom_site = $config->getNomSite(); |
131 | 127 | $url_site = $config->getUrlSite(); |
@@ -161,8 +157,7 @@ discard block |
||
161 | 157 | $db_host_prod = $_SESSION["db_host_prod"]; |
162 | 158 | |
163 | 159 | unset($_SESSION['err_modification_configini']); |
164 | - } |
|
165 | - else { |
|
160 | + } else { |
|
166 | 161 | $developpement = $ini["developpment"]; |
167 | 162 | |
168 | 163 | $db_type_dev = $ini["dev"]["DB_TYPE"]; |
@@ -2,7 +2,7 @@ |
||
2 | 2 | $gestion_contenu = new \core\admin\contenus\GestionContenus(); |
3 | 3 | $droit_acces = new \core\admin\droitsacces\DroitAcces(); |
4 | 4 | |
5 | - if ((($droit_acces->getDroitAccesContenu("GESTION CONTENU PAGE", $_POST['id_page']) == true) && ($droit_acces->getModifContenu() != 0)) || ($droit_acces->getSuperAdmin() == 1)) { |
|
5 | + if ((($droit_acces->getDroitAccesContenu("GESTION CONTENU PAGE", $_POST['id_page']) == true) && ($droit_acces->getModifContenu() != 0)) || ($droit_acces->getSuperAdmin() == 1)) { |
|
6 | 6 | |
7 | 7 | $gestion_contenu->setModifierContenu($_GET['id_page'], $_GET['contenu']); |
8 | 8 |
@@ -24,8 +24,7 @@ |
||
24 | 24 | $_SESSION['acces_admin'] = $inscription->getAccesAdministration(); |
25 | 25 | //$id_liste_droit_acces = $_SESSION['id_liste_droit_acces']; |
26 | 26 | \core\HTML\flashmessage\FlashMessage::setFlash("<ul>".$inscription->getErreur()."</ul>"); |
27 | - } |
|
28 | - else { |
|
27 | + } else { |
|
29 | 28 | \core\HTML\flashmessage\FlashMessage::setFlash("L'utilisateur ".$inscription->getNom()." ".$inscription->getPrenom()."a bien été inscrit", "success"); |
30 | 29 | $inscription->setInscrireUtilisateur(); |
31 | 30 | } |