@@ -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(); |
@@ -2,5 +2,5 @@ |
||
2 | 2 | include_once(ROOT.'libs/ckeditor/ckeditor.php'); |
3 | 3 | require_once(ROOT.'libs/ckfinder/ckfinder.php'); |
4 | 4 | $ckeditor = new CKEditor(); |
5 | - $ckeditor->basePath = WEBROOT.'libs/ckeditor/'; |
|
5 | + $ckeditor->basePath = WEBROOT.'libs/ckeditor/'; |
|
6 | 6 | CKFinder::SetupCKEditor($ckeditor, WEBROOT.'libs/ckfinder/'); |
7 | 7 | \ No newline at end of file |
@@ -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 |
@@ -31,13 +31,13 @@ |
||
31 | 31 | <script> |
32 | 32 | CKEDITOR.disableAutoInline = true; |
33 | 33 | |
34 | - <?php for($i=0 ; $i<$bloc_editable ; $i++):?> |
|
34 | + <?php for ($i = 0; $i < $bloc_editable; $i++):?> |
|
35 | 35 | $(document).ready(function() { |
36 | 36 | console.log("editor<?=$i?>"); |
37 | 37 | $("#editor<?=$i?>").attr("contenteditable", true); |
38 | 38 | }) |
39 | 39 | var editor<?=$i?> = CKEDITOR.inline("editor<?=$i?>", { customConfig: "<?=WEBROOT?>config/config_ckeditor.js" }); |
40 | 40 | CKFinder.setupCKEditor( editor<?=$i?>, "<?=LIBSWEBROOT?>ckfinder/" ); |
41 | - <?php endfor;?> |
|
41 | + <?php endfor; ?> |
|
42 | 42 | </script> |
43 | -<?php require_once(ROOT."admin/views/gestion-contenus/js/inline.php");?> |
|
44 | 43 | \ No newline at end of file |
44 | +<?php require_once(ROOT."admin/views/gestion-contenus/js/inline.php"); ?> |
|
45 | 45 | \ No newline at end of file |
@@ -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> |
@@ -91,7 +91,9 @@ |
||
91 | 91 | </div> |
92 | 92 | |
93 | 93 | <?php |
94 | - if (!isset($arr)) $arr = []; |
|
94 | + if (!isset($arr)) { |
|
95 | + $arr = []; |
|
96 | + } |
|
95 | 97 | //echo $twig->render("template/left-navigation.html", array_merge(array_merge(array_merge(array_merge($arr, $constant), $_REQUEST), $_SESSION), $arr_admin)); |
96 | 98 | ?> |
97 | 99 |