@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | |
16 | 16 | //-------------------------- GETTER ----------------------------------------------------------------------------// |
17 | - public function getBatiments(){ |
|
17 | + public function getBatiments() { |
|
18 | 18 | return $this->batiments; |
19 | 19 | } |
20 | 20 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | $nombre_emplacement = Bataille::getNombreEmplacementBase(); |
68 | 68 | |
69 | - for ($i=1 ; $i<($nombre_emplacement+1) ; $i++) { |
|
69 | + for ($i = 1; $i < ($nombre_emplacement + 1); $i++) { |
|
70 | 70 | $query = $dbc->select()->from("_bataille_batiment")->where("ID_base", "=", Bataille::getIdBase(), "AND") |
71 | 71 | ->where("emplacement", "=", $i) |
72 | 72 | ->orderBy("emplacement") |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $last_co = new \DateTime($last_co); |
86 | 86 | $last_co = $last_co->getTimestamp(); |
87 | 87 | |
88 | - $diff_temps = $today-$last_co; |
|
88 | + $diff_temps = $today - $last_co; |
|
89 | 89 | |
90 | 90 | //si la derniere actualisation ou connexion est supérieur à 30 sec |
91 | 91 | if ($diff_temps > 180) { |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | private function setAddRessource($nom_ressource, $ressrouce, $diff_temps) { |
106 | 106 | $dbc = App::getDb(); |
107 | 107 | |
108 | - $ressource = $ressrouce+(round((Bataille::getBatiment()->getProduction($nom_ressource)/3600)*$diff_temps)); |
|
108 | + $ressource = $ressrouce + (round((Bataille::getBatiment()->getProduction($nom_ressource) / 3600) * $diff_temps)); |
|
109 | 109 | $stockage_max = Bataille::getBatiment()->getStockageEntrepot(); |
110 | 110 | |
111 | 111 | if ($ressource > $stockage_max) { |
@@ -133,11 +133,11 @@ discard block |
||
133 | 133 | public function setRetirerRessource($eau, $electricite, $fer, $fuel, $nourriture) { |
134 | 134 | $dbc = App::getDb(); |
135 | 135 | |
136 | - $eau = $this->getEau()-$eau; |
|
137 | - $electricite = $this->getElectricite()-$electricite; |
|
138 | - $fer = $this->getFer()-$fer; |
|
139 | - $fuel = $this->getFuel()-$fuel; |
|
140 | - $nourriture = $this->getNourriture()-$nourriture; |
|
136 | + $eau = $this->getEau() - $eau; |
|
137 | + $electricite = $this->getElectricite() - $electricite; |
|
138 | + $fer = $this->getFer() - $fer; |
|
139 | + $fuel = $this->getFuel() - $fuel; |
|
140 | + $nourriture = $this->getNourriture() - $nourriture; |
|
141 | 141 | |
142 | 142 | |
143 | 143 | $dbc->update("eau", $eau) |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | <link rel="stylesheet" type="text/css" href="<?=LIBSWEBROOT?>reset_css/reset.css"> |
10 | 10 | <link rel="stylesheet" type="text/css" href="<?=WEBROOT?>admin/views/template/css/style.css"> |
11 | 11 | <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> |
12 | - <?php require_once(ROOT."admin/views/template/js/menu.php");?> |
|
12 | + <?php require_once(ROOT."admin/views/template/js/menu.php"); ?> |
|
13 | 13 | |
14 | 14 | <!-- Les librairies utlisées --> |
15 | 15 | <link rel="stylesheet" type="text/css" href="<?=LIBSWEBROOT?>popup/css/style.css"> |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | </head> |
20 | 20 | <?=\core\HTML\flashmessage\FlashMessage::getFlash(); ?> |
21 | 21 | <body> |
22 | - <nav class="menu <?php if (($_SESSION["menu_plie".CLEF_SITE] == "deplie") || (!isset($_SESSION["menu_plie".CLEF_SITE]))):?>active<?php endif;?>"> |
|
22 | + <nav class="menu <?php if (($_SESSION["menu_plie".CLEF_SITE] == "deplie") || (!isset($_SESSION["menu_plie".CLEF_SITE]))):?>active<?php endif; ?>"> |
|
23 | 23 | <div class="titre"> |
24 | 24 | <h1>Ribs V2.3.5.6</h1> |
25 | 25 | <i class="fa fa-bars"></i> |
@@ -41,14 +41,14 @@ discard block |
||
41 | 41 | <a href="<?=ADMWEBROOT?>notifications"><i class="fa fa-bell <?php if ($admin->getNotification() == 1):?> animated infinite swing<?php endif; ?>"></i></a> |
42 | 42 | </div> |
43 | 43 | </div> |
44 | - <?php endif;?> |
|
44 | + <?php endif; ?> |
|
45 | 45 | <?php if (($droit_acces->getSuperAdmin() == 1) || ($droit_acces->getDroitAccesPage("configuration/mon-compte"))):?> |
46 | 46 | <div class="colonne"> |
47 | 47 | <div class="config"> |
48 | 48 | <a href="<?=ADMWEBROOT?>configuration/index"><i class="fa fa-gear"></i></a> |
49 | 49 | </div> |
50 | 50 | </div> |
51 | - <?php endif;?> |
|
51 | + <?php endif; ?> |
|
52 | 52 | <div class="colonne"> |
53 | 53 | <div class="logout"> |
54 | 54 | <a href="<?=WEBROOT?>administrator/controller/core/auth/connexion/logout"><i class="fa fa-sign-out animated activate swing infinite"></i></a> |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | <ul> |
68 | 68 | <?php if ($droit_acces->getDroitAccesAction("CREATION COMPTE ADMIN")):?> |
69 | 69 | <li><i class="fa fa-user"></i><a href="<?=ADMWEBROOT?>gestion-comptes/creer-utilisateur">Créer un utilisateur</a></li> |
70 | - <?php endif;?> |
|
70 | + <?php endif; ?> |
|
71 | 71 | </ul> |
72 | 72 | </li> |
73 | 73 | <?php endif; ?> |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | <button id="supprimer-page-contenu" type="button" class="submit-contenu supprimer-page supprimer open-popup" popup="supprimer-page" href="<?=ADMWEBROOT?>gestion-contenus/modifier-contenu?id=<?=$id_page_courante?>"><i class="fa fa-times"></i>Annuler</button> |
18 | 18 | |
19 | 19 | |
20 | -<?php if ($config->getResponsive() == 1){?> |
|
20 | +<?php if ($config->getResponsive() == 1) {?> |
|
21 | 21 | <link rel="stylesheet" type="text/css" href="<?=WEBROOT?>admin/views/template/css/foundation-inline.css"> |
22 | 22 | <?php }?> |
23 | 23 | <link rel="stylesheet" type="text/css" href="<?=TPLWEBROOT?>css/page.css"> |
@@ -33,13 +33,13 @@ discard block |
||
33 | 33 | <script> |
34 | 34 | CKEDITOR.disableAutoInline = true; |
35 | 35 | |
36 | - <?php for($i=0 ; $i<$bloc_editable ; $i++):?> |
|
36 | + <?php for ($i = 0; $i < $bloc_editable; $i++):?> |
|
37 | 37 | $(document).ready(function() { |
38 | 38 | console.log("editor<?=$i?>"); |
39 | 39 | $("#editor<?=$i?>").attr("contenteditable", true); |
40 | 40 | }) |
41 | 41 | var editor<?=$i?> = CKEDITOR.inline("editor<?=$i?>", { customConfig: "<?=WEBROOT?>config/config_ckeditor.js" }); |
42 | 42 | CKFinder.setupCKEditor( editor<?=$i?>, "<?=LIBSWEBROOT?>ckfinder/" ); |
43 | - <?php endfor;?> |
|
43 | + <?php endfor; ?> |
|
44 | 44 | </script> |
45 | -<?php require_once(ROOT."admin/views/gestion-contenus/js/inline.php");?> |
|
46 | 45 | \ No newline at end of file |
46 | +<?php require_once(ROOT."admin/views/gestion-contenus/js/inline.php"); ?> |
|
47 | 47 | \ No newline at end of file |
@@ -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 |
@@ -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 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | public function getPage() { |
23 | 23 | return $this->page; |
24 | 24 | } |
25 | - public function getModule(){ |
|
25 | + public function getModule() { |
|
26 | 26 | return $this->module; |
27 | 27 | } |
28 | 28 | public function getController() { |
@@ -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 |
@@ -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($_POST['id_page'], $_POST['contenu']); |
8 | 8 |