@@ -1,8 +1,8 @@ discard block |
||
1 | -<?php require_once("nav.php");?> |
|
1 | +<?php require_once("nav.php"); ?> |
|
2 | 2 | |
3 | 3 | <h1>Aide sur les <?=\modules\bataille\app\controller\Aide::$batiment?> de type <?=\modules\bataille\app\controller\Aide::$parametre_router?></h1> |
4 | 4 | |
5 | -<?php for ($i=0 ; $i<$count ; $i++):?> |
|
5 | +<?php for ($i = 0; $i < $count; $i++):?> |
|
6 | 6 | <div> |
7 | 7 | <h3><?=$aide->getNomBatiment()[$i]?></h3> |
8 | 8 | |
@@ -16,22 +16,22 @@ discard block |
||
16 | 16 | |
17 | 17 | <?php if (count($aide->getNomBatimentConstruire()[$i]) > 0) :?> |
18 | 18 | <h4>Batiments nécéssaires pour le premier niveau</h4> |
19 | - <?php endif;?> |
|
19 | + <?php endif; ?> |
|
20 | 20 | |
21 | 21 | <?php if (count($aide->getNomBatimentConstruire()[$i]) > 1) :?> |
22 | - <?php for($x=0 ; $x<count($aide->getNomBatimentConstruire()[$i]) ; $x++): ?> |
|
22 | + <?php for ($x = 0; $x < count($aide->getNomBatimentConstruire()[$i]); $x++): ?> |
|
23 | 23 | <ul> |
24 | 24 | <li>Nom du batiment : <?=$aide->getNomBatimentConstruire()[$i][$x][0]?></li> |
25 | 25 | <li>Niveau du batiment : <?=$aide->getNiveauBatimentConstruire()[$i][$x][0]?></li> |
26 | 26 | </ul> |
27 | - <?php endfor;?> |
|
27 | + <?php endfor; ?> |
|
28 | 28 | <?php else: ?> |
29 | - <?php for ($j=0 ; $j<count($aide->getNomBatimentConstruire()[$i]) ; $j++): ?> |
|
29 | + <?php for ($j = 0; $j < count($aide->getNomBatimentConstruire()[$i]); $j++): ?> |
|
30 | 30 | <ul> |
31 | 31 | <li>Nom du batiment : <?=$aide->getNomBatimentConstruire()[$j]?></li> |
32 | 32 | <li>Niveau du batiment : <?=$aide->getNiveauBatimentConstruire()[$j]?></li> |
33 | 33 | </ul> |
34 | - <?php endfor;?> |
|
35 | - <?php endif;?> |
|
34 | + <?php endfor; ?> |
|
35 | + <?php endif; ?> |
|
36 | 36 | </div> |
37 | -<?php endfor;?> |
|
37 | +<?php endfor; ?> |
@@ -1,4 +1,4 @@ |
||
1 | -<?php require_once("nav.php");?> |
|
1 | +<?php require_once("nav.php"); ?> |
|
2 | 2 | |
3 | 3 | <h1>Bienvenue sur la page d'aide</h1> |
4 | 4 |
@@ -120,7 +120,7 @@ |
||
120 | 120 | public static function getTestAssezRessourceBase($nom_ressource, $ressource) { |
121 | 121 | $f = "get".ucfirst($nom_ressource); |
122 | 122 | |
123 | - if ($ressource > Bataille::getRessource()->$f()) { |
|
123 | + if ($ressource > Bataille::getRessource()->$f()) { |
|
124 | 124 | /*echo("$nom_ressource $ressource ".Bataille::getRessource()->getEau()." ---");*/ |
125 | 125 | return [$ressource, "rouge"]; |
126 | 126 | } |
@@ -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) |
@@ -55,11 +55,11 @@ discard block |
||
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | - for ($i=0 ; $i<count($pour_construire) ; $i++) { |
|
58 | + for ($i = 0; $i < count($pour_construire); $i++) { |
|
59 | 59 | //si plusieur batiment pour construire le batiment en question |
60 | 60 | $count = count($pour_construire[$i]); |
61 | 61 | if ($count > 1) { |
62 | - for ($j=0 ; $j<$count ; $j++) { |
|
62 | + for ($j = 0; $j < $count; $j++) { |
|
63 | 63 | $temp_nom[] = [$pour_construire[$i][$j][0]]; |
64 | 64 | $temp_niveau[] = [$pour_construire[$i][$j][2]]; |
65 | 65 | } |
@@ -86,25 +86,25 @@ discard block |
||
86 | 86 | |
87 | 87 | |
88 | 88 | //-------------------------- GETTER ----------------------------------------------------------------------------// |
89 | - public function getNomBatiment(){ |
|
89 | + public function getNomBatiment() { |
|
90 | 90 | return $this->nom_batiment; |
91 | 91 | } |
92 | - public function getNomBatimentSql(){ |
|
92 | + public function getNomBatimentSql() { |
|
93 | 93 | return $this->nom_batiment_sql; |
94 | 94 | } |
95 | - public function getNiveauBatiment(){ |
|
95 | + public function getNiveauBatiment() { |
|
96 | 96 | return $this->niveau_batiment; |
97 | 97 | } |
98 | - public function getTempsConstruction(){ |
|
98 | + public function getTempsConstruction() { |
|
99 | 99 | return $this->temps_construction; |
100 | 100 | } |
101 | - public function getRessourceConstruire(){ |
|
101 | + public function getRessourceConstruire() { |
|
102 | 102 | return $this->ressource_construire; |
103 | 103 | } |
104 | - public function getNomBatimentConstruire(){ |
|
104 | + public function getNomBatimentConstruire() { |
|
105 | 105 | return $this->nom_batiment_construire; |
106 | 106 | } |
107 | - public function getNiveauBatimentConstruire(){ |
|
107 | + public function getNiveauBatimentConstruire() { |
|
108 | 108 | return $this->niveau_batiment_construire; |
109 | 109 | } |
110 | 110 |
@@ -75,10 +75,10 @@ discard block |
||
75 | 75 | public function getMessage() { |
76 | 76 | return $this->message; |
77 | 77 | } |
78 | - public function getDateMessage(){ |
|
78 | + public function getDateMessage() { |
|
79 | 79 | return $this->date_message; |
80 | 80 | } |
81 | - public function getUrl(){ |
|
81 | + public function getUrl() { |
|
82 | 82 | return $this->url; |
83 | 83 | } |
84 | 84 | public function getIdExpediteur() { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | public function getPseudoReceveur() { |
94 | 94 | return $this->pseudo_receveur; |
95 | 95 | } |
96 | - public function getValues(){ |
|
96 | + public function getValues() { |
|
97 | 97 | return ["messagerie" => $this->values]; |
98 | 98 | } |
99 | 99 |
@@ -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 |