@@ -5,11 +5,9 @@ |
||
| 5 | 5 | |
| 6 | 6 | if ($menu_active == "plie") { |
| 7 | 7 | $_SESSION["menu_plie".CLEF_SITE] = "deplie"; |
| 8 | - } |
|
| 9 | - else { |
|
| 8 | + } else { |
|
| 10 | 9 | $_SESSION["menu_plie".CLEF_SITE] = "plie"; |
| 11 | 10 | } |
| 12 | - } |
|
| 13 | - else { |
|
| 11 | + } else { |
|
| 14 | 12 | $_SESSION["menu_plie".CLEF_SITE] = "plie"; |
| 15 | 13 | } |
| 16 | 14 | \ No newline at end of file |
@@ -18,12 +18,10 @@ |
||
| 18 | 18 | |
| 19 | 19 | //si c'est un controleur de base on va cerhcer dans core/admin |
| 20 | 20 | require_once("installation/controller/".$lien.".php"); |
| 21 | - } |
|
| 22 | - else { |
|
| 21 | + } else { |
|
| 23 | 22 | require("installation/views/template/principal.php"); |
| 24 | 23 | } |
| 25 | - } |
|
| 26 | - else { |
|
| 24 | + } else { |
|
| 27 | 25 | $page = "installation/views/index"; |
| 28 | 26 | require("installation/controller/initialise_all.php"); |
| 29 | 27 | require("installation/views/template/principal.php"); |
@@ -25,8 +25,7 @@ |
||
| 25 | 25 | |
| 26 | 26 | try { |
| 27 | 27 | $this->dbc = new \PDO($this->db_type.':host='.$this->db_host.';dbname='.$this->db_name, $this->db_user, $this->db_pass); |
| 28 | - } |
|
| 29 | - catch (\PDOException $e) { |
|
| 28 | + } catch (\PDOException $e) { |
|
| 30 | 29 | //on tente de créer la bdd |
| 31 | 30 | $erreur = "getErreur".$e->getCode(); |
| 32 | 31 | $this->$erreur(); |
@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace core\contenus; |
| 3 | 3 | |
| 4 | - use core\functions\ChaineCaractere; |
|
| 5 | 4 | use core\RedirectError; |
| 6 | 5 | |
| 7 | 6 | |
@@ -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 |
@@ -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; |
@@ -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 | } |
@@ -16,7 +16,9 @@ |
||
| 16 | 16 | $query = $dbc->select("titre")->from("page")->where("ID_page", "=", $parent)->get(); |
| 17 | 17 | |
| 18 | 18 | if ((is_array($query)) && (count($query) > 0)) { |
| 19 | - foreach ($query as $obj) $this->parent_texte = $obj->titre; |
|
| 19 | + foreach ($query as $obj) { |
|
| 20 | + $this->parent_texte = $obj->titre; |
|
| 21 | + } |
|
| 20 | 22 | } |
| 21 | 23 | |
| 22 | 24 | return $this->parent_texte; |