@@ -5,20 +5,20 @@ |
||
5 | 5 | use core\HTML\flashmessage\FlashMessage; |
6 | 6 | use core\Navigation; |
7 | 7 | |
8 | - class AdminNavigation extends Navigation{ |
|
8 | + class AdminNavigation extends Navigation { |
|
9 | 9 | |
10 | 10 | public function setOrdreNavigation($nav) { |
11 | 11 | $dbc = App::getDb(); |
12 | 12 | $count_nav = count($nav); |
13 | 13 | |
14 | - for ($i=0 ; $i<$count_nav ; $i++) { |
|
14 | + for ($i = 0; $i < $count_nav; $i++) { |
|
15 | 15 | $lien = explode(".", $nav[$i]); |
16 | 16 | |
17 | 17 | if ($lien[1] == "page") { |
18 | - $dbc->update("ordre", $i+1)->from("navigation")->where("ID_page", "=", $lien[0])->set(); |
|
18 | + $dbc->update("ordre", $i + 1)->from("navigation")->where("ID_page", "=", $lien[0])->set(); |
|
19 | 19 | } |
20 | 20 | else { |
21 | - $dbc->update("ordre", $i+1)->from("navigation")->where("ID_module", "=", $lien[0])->set(); |
|
21 | + $dbc->update("ordre", $i + 1)->from("navigation")->where("ID_module", "=", $lien[0])->set(); |
|
22 | 22 | } |
23 | 23 | } |
24 | 24 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use core\HTML\flashmessage\FlashMessage; |
6 | 6 | use core\Navigation; |
7 | 7 | |
8 | - class AdminNavigation extends Navigation{ |
|
8 | + class AdminNavigation extends Navigation { |
|
9 | 9 | |
10 | 10 | public function setOrdreNavigation($nav) { |
11 | 11 | $dbc = App::getDb(); |
@@ -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 | } |
@@ -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; |
@@ -1,6 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace installation\controller; |
3 | - use core\functions\ChaineCaractere; |
|
4 | 3 | use core\HTML\flashmessage\FlashMessage; |
5 | 4 | use core\iniparser\IniParser; |
6 | 5 |
@@ -28,8 +28,7 @@ |
||
28 | 28 | $this->dbc = new \PDO($this->db_type.':host='.$this->db_host.';dbname='.$this->db_name, $this->db_user, $this->db_pass); |
29 | 29 | |
30 | 30 | $this->setinstallbdd(); |
31 | - } |
|
32 | - catch (\PDOException $e) { |
|
31 | + } catch (\PDOException $e) { |
|
33 | 32 | //on tente de créer la bdd |
34 | 33 | $erreur = "getErreur".$e->getCode(); |
35 | 34 | $this->$erreur(); |
@@ -70,7 +70,7 @@ |
||
70 | 70 | return $this->cache; |
71 | 71 | } |
72 | 72 | public function getDesactiverNavigation(){ |
73 | - return $this->desactiver_navigation; |
|
73 | + return $this->desactiver_navigation; |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | //pour la configuration des comptes |
@@ -69,7 +69,7 @@ |
||
69 | 69 | public function getCache() { |
70 | 70 | return $this->cache; |
71 | 71 | } |
72 | - public function getDesactiverNavigation(){ |
|
72 | + public function getDesactiverNavigation() { |
|
73 | 73 | return $this->desactiver_navigation; |
74 | 74 | } |
75 | 75 |
@@ -53,7 +53,7 @@ |
||
53 | 53 | public function getCache() { |
54 | 54 | return $this->cache; |
55 | 55 | } |
56 | - public function getDesactiverNavigation(){ |
|
56 | + public function getDesactiverNavigation() { |
|
57 | 57 | return $this->desactiver_navigation; |
58 | 58 | } |
59 | 59 |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | public function getPage() { |
24 | 24 | return $this->page; |
25 | 25 | } |
26 | - public function getModule(){ |
|
26 | + public function getModule() { |
|
27 | 27 | return $this->module; |
28 | 28 | } |
29 | 29 | public function getController() { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * Permets de générer l'url pour aller charger la page concernee pour le module blog |
56 | 56 | * appele également l'actoin à effectur dans la page |
57 | 57 | */ |
58 | - public function getUrl($url, $admin="app") { |
|
58 | + public function getUrl($url, $admin = "app") { |
|
59 | 59 | $explode = explode("/", $url); |
60 | 60 | $count = count($explode); |
61 | 61 | $debut_url = ""; |
@@ -23,7 +23,7 @@ |
||
23 | 23 | public function getPage() { |
24 | 24 | return $this->page; |
25 | 25 | } |
26 | - public function getModule(){ |
|
26 | + public function getModule() { |
|
27 | 27 | return $this->module; |
28 | 28 | } |
29 | 29 | public function getController() { |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> |
8 | 8 | <link rel="stylesheet" type="text/css" href="<?=WEBROOT?>admin/views/template/css/style.css"> |
9 | 9 | <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> |
10 | - <?php require_once(ROOT."admin/views/template/js/menu.php");?> |
|
10 | + <?php require_once(ROOT."admin/views/template/js/menu.php"); ?> |
|
11 | 11 | |
12 | 12 | <!-- Les librairies utlisées --> |
13 | 13 | <link rel="stylesheet" type="text/css" href="<?=LIBSWEBROOT?>popup/css/style.css"> |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | </head> |
18 | 18 | <?=\core\HTML\flashmessage\FlashMessage::getFlash(); ?> |
19 | 19 | <body> |
20 | - <nav class="menu <?php if (($_SESSION["menu_plie".CLEF_SITE] == "deplie") || (!isset($_SESSION["menu_plie".CLEF_SITE]))):?>active<?php endif;?>"> |
|
20 | + <nav class="menu <?php if (($_SESSION["menu_plie".CLEF_SITE] == "deplie") || (!isset($_SESSION["menu_plie".CLEF_SITE]))):?>active<?php endif; ?>"> |
|
21 | 21 | <div class="titre"> |
22 | 22 | <h1>Ribs V0.1</h1> |
23 | 23 | <i class="fa fa-bars"></i> |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | <a href="<?=ADMWEBROOT?>notifications"><i class="fa fa-bell <?php if ($admin->getNotification() == 1):?> animated infinite swing<?php endif; ?>"></i></a> |
40 | 40 | </div> |
41 | 41 | </div> |
42 | - <?php endif;?> |
|
42 | + <?php endif; ?> |
|
43 | 43 | <div class="colonne"> |
44 | 44 | <div class="config"> |
45 | 45 | <a href="<?=ADMWEBROOT?>configuration/index"><i class="fa fa-gear"></i></a> |
@@ -58,7 +58,9 @@ |
||
58 | 58 | <ul> |
59 | 59 | <div class="principal"> |
60 | 60 | <?php |
61 | - if (!isset($arr)) $arr = []; |
|
61 | + if (!isset($arr)) { |
|
62 | + $arr = []; |
|
63 | + } |
|
62 | 64 | echo $twig->render("template/left-navigation.html", array_merge(array_merge(array_merge(array_merge($arr, $constant), $_REQUEST), $_SESSION), $arr_admin)); |
63 | 65 | ?> |
64 | 66 |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | - if (!isset($page_root)) $page_root = "index.php"; |
|
2 | + if (!isset($page_root)) { |
|
3 | + $page_root = "index.php"; |
|
4 | + } |
|
3 | 5 | |
4 | 6 | //-------------------------- CONSTANTE POUR LES ROUTES ----------------------------------------------------------------------------// |
5 | 7 | //definit le chemin vers la racine du projet (depuis racine serveur web |
@@ -60,7 +60,9 @@ |
||
60 | 60 | private function getParentId($parent) { |
61 | 61 | $dbc = \core\App::getDb(); |
62 | 62 | |
63 | - if ($parent == "") return 0; |
|
63 | + if ($parent == "") { |
|
64 | + return 0; |
|
65 | + } |
|
64 | 66 | |
65 | 67 | $query = $dbc->select("ID_page")->from("page")->where("titre", " LIKE ", '"%'.$parent.'%"', "", true)->get(); |
66 | 68 |
@@ -41,6 +41,9 @@ discard block |
||
41 | 41 | return $bloc_editable; |
42 | 42 | } |
43 | 43 | |
44 | + /** |
|
45 | + * @param integer $parent |
|
46 | + */ |
|
44 | 47 | private function getOrdrePage($parent) { |
45 | 48 | if (($parent != "") || ($parent != 0)) { |
46 | 49 | $dbc = \core\App::getDb(); |
@@ -74,13 +77,13 @@ discard block |
||
74 | 77 | } |
75 | 78 | |
76 | 79 | /** |
77 | - * @param $nom_table |
|
78 | - * @param $nom_id_table |
|
79 | - * @param $champ |
|
80 | + * @param string $nom_table |
|
81 | + * @param string $nom_id_table |
|
82 | + * @param string $champ |
|
80 | 83 | * @param $value |
81 | - * @param $limit_char |
|
82 | - * @param $err_char |
|
83 | - * @param $err_egalite |
|
84 | + * @param integer $limit_char |
|
85 | + * @param string $err_char |
|
86 | + * @param string $err_egalite |
|
84 | 87 | * @param null $value_id_table |
85 | 88 | * @return string |
86 | 89 | * fonction qui permet de vérifier qu'il n'y ait pas d'erreur dans le champ spécifié ni de doublons |
@@ -348,7 +351,7 @@ discard block |
||
348 | 351 | |
349 | 352 | /** |
350 | 353 | * @param string $id |
351 | - * @param $value_id |
|
354 | + * @param string $value_id |
|
352 | 355 | * @param integer $affiche |
353 | 356 | */ |
354 | 357 | private function setAjoutLienNavigation($id, $value_id, $affiche) { |