@@ -44,7 +44,7 @@ |
||
44 | 44 | //definit le chemin sachant que l'on part de index.php |
45 | 45 | $chemin = str_replace("\\", "/", str_replace("index.php", "", $_SERVER['SCRIPT_NAME']).__NAMESPACE__."/view/"); |
46 | 46 | } |
47 | - else if (strstr($_SERVER['SCRIPT_NAME'], "installation.php")) { |
|
47 | + else if (strstr($_SERVER['SCRIPT_NAME'], "installation.php")) { |
|
48 | 48 | //definit le chemin sachant que l'on part de admin.php |
49 | 49 | $chemin = str_replace("\\", "/", str_replace("installation.php", "", $_SERVER['SCRIPT_NAME']).__NAMESPACE__."/view/"); |
50 | 50 | } |
@@ -17,11 +17,9 @@ discard block |
||
17 | 17 | |
18 | 18 | if ($type == "error") { |
19 | 19 | $icone = "<i class='fa fa-close'></i>"; |
20 | - } |
|
21 | - else if ($type == "success") { |
|
20 | + } else if ($type == "success") { |
|
22 | 21 | $icone = "<i class='fa fa-check'></i>"; |
23 | - } |
|
24 | - else { |
|
22 | + } else { |
|
25 | 23 | $icone = "<i class='fa fa-info'></i>"; |
26 | 24 | } |
27 | 25 | |
@@ -43,12 +41,10 @@ discard block |
||
43 | 41 | if (strstr($_SERVER['SCRIPT_NAME'], "index.php")) { |
44 | 42 | //definit le chemin sachant que l'on part de index.php |
45 | 43 | $chemin = str_replace("\\", "/", str_replace("index.php", "", $_SERVER['SCRIPT_NAME']).__NAMESPACE__."/view/"); |
46 | - } |
|
47 | - else if (strstr($_SERVER['SCRIPT_NAME'], "installation.php")) { |
|
44 | + } else if (strstr($_SERVER['SCRIPT_NAME'], "installation.php")) { |
|
48 | 45 | //definit le chemin sachant que l'on part de admin.php |
49 | 46 | $chemin = str_replace("\\", "/", str_replace("installation.php", "", $_SERVER['SCRIPT_NAME']).__NAMESPACE__."/view/"); |
50 | - } |
|
51 | - else { |
|
47 | + } else { |
|
52 | 48 | //definit le chemin sachant que l'on part de admin.php |
53 | 49 | $chemin = str_replace("\\", "/", str_replace("admin.php", "", $_SERVER['SCRIPT_NAME']).__NAMESPACE__."/view/"); |
54 | 50 | } |
@@ -7,8 +7,7 @@ |
||
7 | 7 | |
8 | 8 | if (isset($_POST['admin'])) { |
9 | 9 | Connexion::setLogin($pseudo, $mdp, WEBROOT."administrator/login", WEBROOT."administrator"); |
10 | - } |
|
11 | - else { |
|
10 | + } else { |
|
12 | 11 | Connexion::setLogin($pseudo, $mdp, WEBROOT."login", WEBROOT."index.php"); |
13 | 12 | } |
14 | 13 | ?> |
15 | 14 | \ No newline at end of file |
@@ -7,8 +7,7 @@ |
||
7 | 7 | |
8 | 8 | if (isset($_POST['admin'])) { |
9 | 9 | Connexion::setLogin($pseudo, $mdp, WEBROOT."administrator/login", WEBROOT."administrator"); |
10 | - } |
|
11 | - else { |
|
10 | + } else { |
|
12 | 11 | Connexion::setLogin($pseudo, $mdp, WEBROOT."login", WEBROOT."index.php"); |
13 | 12 | } |
14 | 13 | ?> |
15 | 14 | \ No newline at end of file |
@@ -21,8 +21,7 @@ discard block |
||
21 | 21 | foreach ($query as $obj) { |
22 | 22 | $params = $obj->mdp_params; |
23 | 23 | } |
24 | - } |
|
25 | - else { |
|
24 | + } else { |
|
26 | 25 | $params = self::$params; |
27 | 26 | } |
28 | 27 | |
@@ -74,8 +73,7 @@ discard block |
||
74 | 73 | |
75 | 74 | if ($id_identite != null) { |
76 | 75 | self::setSaveParams("$taille_bout1, $debut_bout2, $nb_aleatoire_mdp, $taille_bout2, $debut_bout1, ".ChaineCaractere::random(20), $id_identite); |
77 | - } |
|
78 | - else { |
|
76 | + } else { |
|
79 | 77 | self::$params = "$taille_bout1, $debut_bout2, $nb_aleatoire_mdp, $taille_bout2, $debut_bout1, ".ChaineCaractere::random(20); |
80 | 78 | } |
81 | 79 |
@@ -9,8 +9,7 @@ discard block |
||
9 | 9 | $db_user = $_SESSION['db_user']; |
10 | 10 | $db_pass = $_SESSION['db_pass']; |
11 | 11 | unset($_SESSION['err_db']); |
12 | - } |
|
13 | - else { |
|
12 | + } else { |
|
14 | 13 | $db_type = null; |
15 | 14 | $db_host = null; |
16 | 15 | $db_name = null; |
@@ -28,8 +27,7 @@ discard block |
||
28 | 27 | $mail_administrateur = $_SESSION['mail_administrateur']; |
29 | 28 | |
30 | 29 | unset($_SESSION['err_config']); |
31 | - } |
|
32 | - else { |
|
30 | + } else { |
|
33 | 31 | $nom_site = null; |
34 | 32 | $url_site = null; |
35 | 33 | $gerant_site = null; |
@@ -45,8 +43,7 @@ discard block |
||
45 | 43 | $pseudo = $_SESSION['pseudo']; |
46 | 44 | |
47 | 45 | unset($_SESSION['err_user']); |
48 | - } |
|
49 | - else { |
|
46 | + } else { |
|
50 | 47 | $nom = null; |
51 | 48 | $prenom = null; |
52 | 49 | $pseudo = null; |
@@ -75,13 +75,13 @@ |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
78 | - * @param $nom_table |
|
79 | - * @param $nom_id_table |
|
80 | - * @param $champ |
|
78 | + * @param string $nom_table |
|
79 | + * @param string $nom_id_table |
|
80 | + * @param string $champ |
|
81 | 81 | * @param $value |
82 | - * @param $limit_char |
|
83 | - * @param $err_char |
|
84 | - * @param $err_egalite |
|
82 | + * @param integer $limit_char |
|
83 | + * @param string $err_char |
|
84 | + * @param string $err_egalite |
|
85 | 85 | * @param null $value_id_table |
86 | 86 | * @return string |
87 | 87 | * fonction qui permet de vérifier qu'il n'y ait pas d'erreur dans le champ spécifié ni de doublons |
@@ -23,7 +23,9 @@ discard block |
||
23 | 23 | $query = $dbc->select("titre")->from("page")->where("ID_page", "=", $parent)->get(); |
24 | 24 | |
25 | 25 | if ((is_array($query)) && (count($query) > 0)) { |
26 | - foreach ($query as $obj) $this->parent_texte = $obj->titre; |
|
26 | + foreach ($query as $obj) { |
|
27 | + $this->parent_texte = $obj->titre; |
|
28 | + } |
|
27 | 29 | } |
28 | 30 | |
29 | 31 | return $this->parent_texte; |
@@ -92,8 +94,7 @@ discard block |
||
92 | 94 | if (strlen(utf8_decode($value)) > $limit_char) { |
93 | 95 | self::$erreur = true; |
94 | 96 | return "<li>$err_char</li>"; |
95 | - } |
|
96 | - else if ($dbc->rechercherEgalite($nom_table, $champ, $value, $nom_id_table, $value_id_table) == true) { |
|
97 | + } else if ($dbc->rechercherEgalite($nom_table, $champ, $value, $nom_id_table, $value_id_table) == true) { |
|
97 | 98 | self::$erreur = true; |
98 | 99 | return "<li>$err_egalite</li>"; |
99 | 100 | } |
@@ -175,13 +176,11 @@ discard block |
||
175 | 176 | if ($parent != "") { |
176 | 177 | $this->setAjoutLienNavigation("ID_page", $this->id_page, 1); |
177 | 178 | } |
178 | - } |
|
179 | - else { |
|
179 | + } else { |
|
180 | 180 | FlashMessage::setFlash("Impossible de créer cette page, veuillez réeseyer dans un moment. Si le problème persiste contactez votre administrateur."); |
181 | 181 | $this->erreur = true; |
182 | 182 | } |
183 | - } |
|
184 | - else { |
|
183 | + } else { |
|
185 | 184 | $this->setErreurContenus($balise_title, $url, $meta_description, $titre_page, $parent, $err_balise_title, $err_url, $err_meta_description, $err_titre_page); |
186 | 185 | } |
187 | 186 | } |
@@ -244,8 +243,7 @@ discard block |
||
244 | 243 | ->set(); |
245 | 244 | |
246 | 245 | $this->setModifierLienNavigation("ID_page", $id_page, $this->getParentId($parent), $affiche); |
247 | - } |
|
248 | - else { |
|
246 | + } else { |
|
249 | 247 | $this->setErreurContenus($balise_title, $url, $meta_description, $titre_page, $parent, $err_balise_title, $err_url, $err_meta_description, $err_titre_page); |
250 | 248 | } |
251 | 249 | } |
@@ -294,8 +292,7 @@ discard block |
||
294 | 292 | FlashMessage::setFlash("Impossible de supprimer cette page, veuillez contacter votre administrateur pour corriger ce problème"); |
295 | 293 | $this->erreur = true; |
296 | 294 | } |
297 | - } |
|
298 | - else { |
|
295 | + } else { |
|
299 | 296 | FlashMessage::setFlash("Impossible de supprimer cette page, veuillez contacter votre administrateur pour corriger ce problème"); |
300 | 297 | $this->erreur = true; |
301 | 298 | } |
@@ -321,8 +318,7 @@ discard block |
||
321 | 318 | if ($parent != "") { |
322 | 319 | $nav = new Navigation(); |
323 | 320 | $nav->setSupprimerLien($id, $id_page); |
324 | - } |
|
325 | - else if (($affiche == 1) && ($parent == "")) { |
|
321 | + } else if (($affiche == 1) && ($parent == "")) { |
|
326 | 322 | $this->setAjoutLienNavigation($id, $id_page, $affiche); |
327 | 323 | } |
328 | 324 | } |