@@ -33,6 +33,9 @@ discard block |
||
| 33 | 33 | return $bloc_editable; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | + /** |
|
| 37 | + * @param integer $parent |
|
| 38 | + */ |
|
| 36 | 39 | private function getOrdrePage($parent) { |
| 37 | 40 | if (($parent != "") || ($parent != 0)) { |
| 38 | 41 | $dbc = \core\App::getDb(); |
@@ -66,13 +69,13 @@ discard block |
||
| 66 | 69 | } |
| 67 | 70 | |
| 68 | 71 | /** |
| 69 | - * @param $nom_table |
|
| 70 | - * @param $nom_id_table |
|
| 71 | - * @param $champ |
|
| 72 | + * @param string $nom_table |
|
| 73 | + * @param string $nom_id_table |
|
| 74 | + * @param string $champ |
|
| 72 | 75 | * @param $value |
| 73 | - * @param $limit_char |
|
| 74 | - * @param $err_char |
|
| 75 | - * @param $err_egalite |
|
| 76 | + * @param integer $limit_char |
|
| 77 | + * @param string $err_char |
|
| 78 | + * @param string $err_egalite |
|
| 76 | 79 | * @param null $value_id_table |
| 77 | 80 | * @return string |
| 78 | 81 | * fonction qui permet de vérifier qu'il n'y ait pas d'erreur dans le champ spécifié ni de doublons |
@@ -52,7 +52,9 @@ discard block |
||
| 52 | 52 | private function getParentId($parent) { |
| 53 | 53 | $dbc = \core\App::getDb(); |
| 54 | 54 | |
| 55 | - if ($parent == "") return 0; |
|
| 55 | + if ($parent == "") { |
|
| 56 | + return 0; |
|
| 57 | + } |
|
| 56 | 58 | |
| 57 | 59 | $query = $dbc->select("ID_page")->from("page")->where("titre", " LIKE ", '"%'.$parent.'%"', "", true)->get(); |
| 58 | 60 | |
@@ -83,8 +85,7 @@ discard block |
||
| 83 | 85 | if (strlen(utf8_decode($value)) > $limit_char) { |
| 84 | 86 | $this->erreur = true; |
| 85 | 87 | return "<li>$err_char</li>"; |
| 86 | - } |
|
| 87 | - else if ($dbc->rechercherEgalite($nom_table, $champ, $value, $nom_id_table, $value_id_table) == true) { |
|
| 88 | + } else if ($dbc->rechercherEgalite($nom_table, $champ, $value, $nom_id_table, $value_id_table) == true) { |
|
| 88 | 89 | $this->erreur = true; |
| 89 | 90 | return "<li>$err_egalite</li>"; |
| 90 | 91 | } |
@@ -167,13 +168,11 @@ discard block |
||
| 167 | 168 | if ($parent == "") { |
| 168 | 169 | $this->setAjoutLienNavigation("ID_page", $this->id_page, 1); |
| 169 | 170 | } |
| 170 | - } |
|
| 171 | - else { |
|
| 171 | + } else { |
|
| 172 | 172 | FlashMessage::setFlash("Impossible de créer cette page, veuillez réeseyer dans un moment. Si le problème persiste contactez votre administrateur."); |
| 173 | 173 | $this->erreur = true; |
| 174 | 174 | } |
| 175 | - } |
|
| 176 | - else { |
|
| 175 | + } else { |
|
| 177 | 176 | $this->setErreurContenus($balise_title, $url, $meta_description, $titre_page, $parent, $err_balise_title, $err_url, $err_meta_description, $err_titre_page); |
| 178 | 177 | $this->erreur = true; |
| 179 | 178 | } |
@@ -219,8 +218,7 @@ discard block |
||
| 219 | 218 | if ($parent == "") { |
| 220 | 219 | $this->setAjoutLienNavigation("ID_page", $this->id_page, 1); |
| 221 | 220 | } |
| 222 | - } |
|
| 223 | - else { |
|
| 221 | + } else { |
|
| 224 | 222 | $this->setErreurContenus($balise_title, $url, $titre_page, $parent, $err_balise_title, $err_url, $err_titre_page); |
| 225 | 223 | $this->erreur = true; |
| 226 | 224 | } |
@@ -284,8 +282,7 @@ discard block |
||
| 284 | 282 | ->set(); |
| 285 | 283 | |
| 286 | 284 | $this->setModifierLienNavigation("ID_page", $id_page, $this->getParentId($parent), $affiche); |
| 287 | - } |
|
| 288 | - else { |
|
| 285 | + } else { |
|
| 289 | 286 | $this->setErreurContenus($balise_title, $url, $meta_description, $titre_page, $parent, $err_balise_title, $err_url, $err_meta_description, $err_titre_page); |
| 290 | 287 | } |
| 291 | 288 | } |
@@ -334,8 +331,7 @@ discard block |
||
| 334 | 331 | FlashMessage::setFlash("Impossible de supprimer cette page, veuillez contacter votre administrateur pour corriger ce problème"); |
| 335 | 332 | $this->erreur = true; |
| 336 | 333 | } |
| 337 | - } |
|
| 338 | - else { |
|
| 334 | + } else { |
|
| 339 | 335 | FlashMessage::setFlash("Impossible de supprimer cette page, veuillez contacter votre administrateur pour corriger ce problème"); |
| 340 | 336 | $this->erreur = true; |
| 341 | 337 | } |
@@ -361,8 +357,7 @@ discard block |
||
| 361 | 357 | if ($parent != "") { |
| 362 | 358 | $nav = new Navigation(); |
| 363 | 359 | $nav->setSupprimerLien($id, $id_page); |
| 364 | - } |
|
| 365 | - else if (($affiche == 1) && ($parent == "")) { |
|
| 360 | + } else if (($affiche == 1) && ($parent == "")) { |
|
| 366 | 361 | $this->setAjoutLienNavigation($id, $id_page, $affiche); |
| 367 | 362 | } |
| 368 | 363 | } |
@@ -368,7 +368,7 @@ |
||
| 368 | 368 | |
| 369 | 369 | /** |
| 370 | 370 | * @param $nom_batiment_sql |
| 371 | - * @param $niveau |
|
| 371 | + * @param integer $niveau |
|
| 372 | 372 | * @return array |
| 373 | 373 | * recuperation des ressources nécéssaire pour construire le batiment |
| 374 | 374 | */ |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | return $this->ressource_construire; |
| 47 | 47 | } |
| 48 | 48 | public function getInfoBatiment(){ |
| 49 | - return $this->info_batiment; |
|
| 49 | + return $this->info_batiment; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | public function getNomBatimentConstruction() { |
@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | public function getRessourceConstruire() { |
| 47 | 47 | return $this->ressource_construire; |
| 48 | 48 | } |
| 49 | - public function getInfoBatiment(){ |
|
| 49 | + public function getInfoBatiment() { |
|
| 50 | 50 | return $this->info_batiment; |
| 51 | 51 | } |
| 52 | - public function getInfoBatimentNext(){ |
|
| 52 | + public function getInfoBatimentNext() { |
|
| 53 | 53 | return $this->info_batiment_next; |
| 54 | 54 | } |
| 55 | 55 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | if ((is_array($query)) && (count($query) > 0)) { |
| 82 | 82 | foreach ($query as $obj) { |
| 83 | 83 | if ($obj->construction == 1) { |
| 84 | - return $obj->niveau-1; |
|
| 84 | + return $obj->niveau - 1; |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | return $obj->niveau; |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | if ($niveau > 0) { |
| 150 | 150 | $query = $dbc1->select("stockage")->from("entrepot")->where("ID_entrepot", "=", $niveau)->get(); |
| 151 | 151 | |
| 152 | - if ((is_array($query)) && (count($query) > 0)){ |
|
| 152 | + if ((is_array($query)) && (count($query) > 0)) { |
|
| 153 | 153 | foreach ($query as $obj) { |
| 154 | 154 | return $obj->stockage; |
| 155 | 155 | } |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | $this->niveau_batiment = $this->niveau_batiment + 1; |
| 191 | 191 | } |
| 192 | 192 | $niveau_batiment_base = $this->niveau_batiment; |
| 193 | - $max_level = $this->getInfoUpgradeBatiment(); |
|
| 193 | + $max_level = $this->getInfoUpgradeBatiment(); |
|
| 194 | 194 | } |
| 195 | 195 | else { |
| 196 | 196 | //on test voir si le bat est au niveau max et si il peut avoir un addon |
@@ -264,12 +264,12 @@ discard block |
||
| 264 | 264 | $id_batiment = $obj->ID_batiment; |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | - if ($this->date_fin_construction-$today <= 0) { |
|
| 267 | + if ($this->date_fin_construction - $today <= 0) { |
|
| 268 | 268 | $this->setTerminerConstruction($id_batiment); |
| 269 | 269 | } |
| 270 | 270 | else { |
| 271 | 271 | Bataille::setValues([ |
| 272 | - "date_fin_construction" => $this->date_fin_construction-$today, |
|
| 272 | + "date_fin_construction" => $this->date_fin_construction - $today, |
|
| 273 | 273 | "nom_batiment_construction" => $this->nom_batiment_construction |
| 274 | 274 | ]); |
| 275 | 275 | } |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | //et compare la liste des batiments qu'il faut pour construire le batiment |
| 319 | 319 | //a ceux qui sont deja construit dans la base |
| 320 | 320 | //si tous les batments qu'il faut son batis on autorise la construction du batiment |
| 321 | - for ($i=0 ; $i<$c_all_batiment ; $i++) { |
|
| 321 | + for ($i = 0; $i < $c_all_batiment; $i++) { |
|
| 322 | 322 | if (!in_array($all_batiment[$i], $batiment_construit)) { |
| 323 | 323 | $query = $dbc1->select("pour_construire") |
| 324 | 324 | ->select("temps_construction") |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | else if (count($pour_construire) > 1) { |
| 359 | 359 | $ok_construction = false; |
| 360 | 360 | //test si tous les batiments sont construits et on le niveau nécéssaire |
| 361 | - for ($j=0 ; $j<count($pour_construire) ; $j++) { |
|
| 361 | + for ($j = 0; $j < count($pour_construire); $j++) { |
|
| 362 | 362 | if (in_array($pour_construire[$j][1], $batiment_construit)) { |
| 363 | 363 | if ($pour_construire[$j][2] <= $this->getNiveauBatiment($pour_construire[$j][1])) { |
| 364 | 364 | $ok_construction = true; |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | private function getRessourceConstruireBatiment($nom_batiment_sql, $niveau) { |
| 403 | 403 | $dbc1 = Bataille::getDb(); |
| 404 | 404 | |
| 405 | - $niveau = $niveau+1; |
|
| 405 | + $niveau = $niveau + 1; |
|
| 406 | 406 | |
| 407 | 407 | $query = $dbc1->select("ressource_construire")->from($nom_batiment_sql)->where("ID_".$nom_batiment_sql, "=", $niveau)->get(); |
| 408 | 408 | |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | */ |
| 436 | 436 | private function getTestBatimentConstruction($nom_batiment) { |
| 437 | 437 | if (ChaineCaractere::FindInString($nom_batiment, " en construction") == true) { |
| 438 | - return [substr($nom_batiment, 0, (0-strlen(" en construction"))), true]; |
|
| 438 | + return [substr($nom_batiment, 0, (0 - strlen(" en construction"))), true]; |
|
| 439 | 439 | } |
| 440 | 440 | |
| 441 | 441 | return [$nom_batiment, false]; |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | $dbc1 = Bataille::getDb(); |
| 451 | 451 | |
| 452 | 452 | //récupération du temps et des ressources pour construire |
| 453 | - $query = $dbc1->select()->from($this->nom_batiment_sql)->where("ID_".$this->nom_batiment_sql, "=", $this->niveau_batiment+1)->get(); |
|
| 453 | + $query = $dbc1->select()->from($this->nom_batiment_sql)->where("ID_".$this->nom_batiment_sql, "=", $this->niveau_batiment + 1)->get(); |
|
| 454 | 454 | |
| 455 | 455 | //si on a quelque chose cela veut dire qu'on est pas encore au lvl max du batiment |
| 456 | 456 | if ((is_array($query)) && (count($query) > 0)) { |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | ->where("ID_".$this->nom_batiment_sql, "=", $this->niveau_batiment) |
| 472 | 472 | ->get(); |
| 473 | 473 | |
| 474 | - if ((is_array($query)) && (count($query) > 0)){ |
|
| 474 | + if ((is_array($query)) && (count($query) > 0)) { |
|
| 475 | 475 | foreach ($query as $obj) { |
| 476 | 476 | $this->info_batiment = $xml->$nom_batiment_sql->phrase.$obj->$champ; |
| 477 | 477 | } |
@@ -480,10 +480,10 @@ discard block |
||
| 480 | 480 | //récupération de la phrase pour le niveau suivant |
| 481 | 481 | $query = $dbc1->select($xml->$nom_batiment_sql->champ) |
| 482 | 482 | ->from($this->nom_batiment_sql) |
| 483 | - ->where("ID_".$this->nom_batiment_sql, "=", $this->niveau_batiment+1) |
|
| 483 | + ->where("ID_".$this->nom_batiment_sql, "=", $this->niveau_batiment + 1) |
|
| 484 | 484 | ->get(); |
| 485 | 485 | |
| 486 | - if ((is_array($query)) && (count($query) > 0)){ |
|
| 486 | + if ((is_array($query)) && (count($query) > 0)) { |
|
| 487 | 487 | foreach ($query as $obj) { |
| 488 | 488 | $this->info_batiment_next = $xml->$nom_batiment_sql->phrase_suivant.$obj->$champ; |
| 489 | 489 | } |
@@ -552,7 +552,7 @@ discard block |
||
| 552 | 552 | $query = $dbc1->select("ressource_construire") |
| 553 | 553 | ->select("temps_construction") |
| 554 | 554 | ->from($this->nom_batiment_sql) |
| 555 | - ->where("ID_".$this->nom_batiment_sql, "=", $this->niveau_batiment+1) |
|
| 555 | + ->where("ID_".$this->nom_batiment_sql, "=", $this->niveau_batiment + 1) |
|
| 556 | 556 | ->get(); |
| 557 | 557 | |
| 558 | 558 | foreach ($query as $obj) { |
@@ -562,7 +562,7 @@ discard block |
||
| 562 | 562 | |
| 563 | 563 | //on insere la construction dans la table batiment si new batiment |
| 564 | 564 | if ($un_batiment == 0) { |
| 565 | - $dbc->insert("niveau", $this->niveau_batiment+1) |
|
| 565 | + $dbc->insert("niveau", $this->niveau_batiment + 1) |
|
| 566 | 566 | ->insert("emplacement", $emplacement) |
| 567 | 567 | ->insert("nom_batiment", $nom_batiment) |
| 568 | 568 | ->insert("nom_batiment_sql", $this->nom_batiment_sql) |
@@ -574,7 +574,7 @@ discard block |
||
| 574 | 574 | $this->id_batiment = $dbc->lastInsertId(); |
| 575 | 575 | } |
| 576 | 576 | else { |
| 577 | - $dbc->update("niveau", $this->niveau_batiment+1) |
|
| 577 | + $dbc->update("niveau", $this->niveau_batiment + 1) |
|
| 578 | 578 | ->update("construction", 1) |
| 579 | 579 | ->from("_bataille_batiment") |
| 580 | 580 | ->where("ID_batiment", "=", $this->id_batiment, "AND") |
@@ -589,7 +589,7 @@ discard block |
||
| 589 | 589 | $today = $today->getTimestamp(); |
| 590 | 590 | |
| 591 | 591 | //date de la fin de la construction en seconde |
| 592 | - $fin_construction = $today+$temps_construction; |
|
| 592 | + $fin_construction = $today + $temps_construction; |
|
| 593 | 593 | |
| 594 | 594 | $dbc->insert("date_fin", $fin_construction) |
| 595 | 595 | ->insert("emplacement_construction", $emplacement) |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | use core\App; |
| 4 | 4 | use core\functions\ChaineCaractere; |
| 5 | 5 | use core\HTML\flashmessage\FlashMessage; |
| 6 | - use Nette\Utils\DateTime; |
|
| 7 | 6 | |
| 8 | 7 | class Batiment { |
| 9 | 8 | //pour quand on recup un batiment |
@@ -90,8 +90,7 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | return $obj->niveau; |
| 92 | 92 | } |
| 93 | - } |
|
| 94 | - else { |
|
| 93 | + } else { |
|
| 95 | 94 | return 0; |
| 96 | 95 | } |
| 97 | 96 | } |
@@ -108,10 +107,18 @@ discard block |
||
| 108 | 107 | $id_base = Bataille::getIdBase(); |
| 109 | 108 | } |
| 110 | 109 | |
| 111 | - if ($ressource == "eau") $nom_batiment = "centrale_eau"; |
|
| 112 | - if ($ressource == "electricite") $nom_batiment = "centrale_electrique"; |
|
| 113 | - if ($ressource == "fuel") $nom_batiment = "station_pompage_fuel"; |
|
| 114 | - if ($ressource == "fer") $nom_batiment = "station_forage"; |
|
| 110 | + if ($ressource == "eau") { |
|
| 111 | + $nom_batiment = "centrale_eau"; |
|
| 112 | + } |
|
| 113 | + if ($ressource == "electricite") { |
|
| 114 | + $nom_batiment = "centrale_electrique"; |
|
| 115 | + } |
|
| 116 | + if ($ressource == "fuel") { |
|
| 117 | + $nom_batiment = "station_pompage_fuel"; |
|
| 118 | + } |
|
| 119 | + if ($ressource == "fer") { |
|
| 120 | + $nom_batiment = "station_forage"; |
|
| 121 | + } |
|
| 115 | 122 | |
| 116 | 123 | $niveau = $this->getNiveauBatiment($nom_batiment, $id_base); |
| 117 | 124 | |
@@ -132,15 +139,13 @@ discard block |
||
| 132 | 139 | foreach ($query as $obj) { |
| 133 | 140 | $prod_addon = $obj->production; |
| 134 | 141 | } |
| 135 | - } |
|
| 136 | - else { |
|
| 142 | + } else { |
|
| 137 | 143 | $prod_addon = 0; |
| 138 | 144 | } |
| 139 | 145 | |
| 140 | 146 | return $prod + $prod_addon; |
| 141 | 147 | } |
| 142 | - } |
|
| 143 | - else { |
|
| 148 | + } else { |
|
| 144 | 149 | return 20; |
| 145 | 150 | } |
| 146 | 151 | } |
@@ -166,8 +171,7 @@ discard block |
||
| 166 | 171 | return $obj->stockage; |
| 167 | 172 | } |
| 168 | 173 | } |
| 169 | - } |
|
| 170 | - else { |
|
| 174 | + } else { |
|
| 171 | 175 | return 1000; |
| 172 | 176 | } |
| 173 | 177 | } |
@@ -203,8 +207,7 @@ discard block |
||
| 203 | 207 | } |
| 204 | 208 | $niveau_batiment_base = $this->niveau_batiment; |
| 205 | 209 | $max_level = $this->getInfoUpgradeBatiment(); |
| 206 | - } |
|
| 207 | - else { |
|
| 210 | + } else { |
|
| 208 | 211 | //on test voir si le bat est au niveau max et si il peut avoir un addon |
| 209 | 212 | if (ChaineCaractere::FindInString($nom_batiment, "addon")) { |
| 210 | 213 | $query = $dbc1->select("nom_table")->from("liste_batiment")->where("nom", "=", $nom_batiment)->get(); |
@@ -218,12 +221,10 @@ discard block |
||
| 218 | 221 | |
| 219 | 222 | $max_level = $this->getInfoUpgradeBatiment(); |
| 220 | 223 | $niveau_batiment_base = 10; |
| 221 | - } |
|
| 222 | - else { |
|
| 224 | + } else { |
|
| 223 | 225 | $max_level = 0; |
| 224 | 226 | } |
| 225 | - } |
|
| 226 | - else { |
|
| 227 | + } else { |
|
| 227 | 228 | $max_level = 0; |
| 228 | 229 | } |
| 229 | 230 | } |
@@ -277,8 +278,7 @@ discard block |
||
| 277 | 278 | |
| 278 | 279 | if ($this->date_fin_construction-$today <= 0) { |
| 279 | 280 | $this->setTerminerConstruction($id_batiment); |
| 280 | - } |
|
| 281 | - else { |
|
| 281 | + } else { |
|
| 282 | 282 | Bataille::setValues([ |
| 283 | 283 | "date_fin_construction" => $this->date_fin_construction-$today, |
| 284 | 284 | "nom_batiment_construction" => $this->nom_batiment_construction |
@@ -341,8 +341,7 @@ discard block |
||
| 341 | 341 | foreach ($query as $obj) { |
| 342 | 342 | if ($obj->pour_construire != null) { |
| 343 | 343 | $pour_construire = unserialize($obj->pour_construire); |
| 344 | - } |
|
| 345 | - else { |
|
| 344 | + } else { |
|
| 346 | 345 | $pour_construire = []; |
| 347 | 346 | } |
| 348 | 347 | |
@@ -365,21 +364,18 @@ discard block |
||
| 365 | 364 | ]; |
| 366 | 365 | } |
| 367 | 366 | } |
| 368 | - } |
|
| 369 | - else if (count($pour_construire) > 1) { |
|
| 367 | + } else if (count($pour_construire) > 1) { |
|
| 370 | 368 | $ok_construction = false; |
| 371 | 369 | //test si tous les batiments sont construits et on le niveau nécéssaire |
| 372 | 370 | for ($j=0 ; $j<count($pour_construire) ; $j++) { |
| 373 | 371 | if (in_array($pour_construire[$j][1], $batiment_construit)) { |
| 374 | 372 | if ($pour_construire[$j][2] <= $this->getNiveauBatiment($pour_construire[$j][1])) { |
| 375 | 373 | $ok_construction = true; |
| 376 | - } |
|
| 377 | - else { |
|
| 374 | + } else { |
|
| 378 | 375 | $ok_construction = false; |
| 379 | 376 | break; |
| 380 | 377 | } |
| 381 | - } |
|
| 382 | - else { |
|
| 378 | + } else { |
|
| 383 | 379 | $ok_construction = false; |
| 384 | 380 | break; |
| 385 | 381 | } |
@@ -396,8 +392,7 @@ discard block |
||
| 396 | 392 | "temps_construction" => $temps_construction |
| 397 | 393 | ]; |
| 398 | 394 | } |
| 399 | - } |
|
| 400 | - else { |
|
| 395 | + } else { |
|
| 401 | 396 | $ressource = $this->getRessourceConstruireBatiment($all_batiment[$i], 0); |
| 402 | 397 | |
| 403 | 398 | $batiment_construire[] = [ |
@@ -507,8 +502,7 @@ discard block |
||
| 507 | 502 | $this->info_batiment_next = $xml->$nom_batiment_sql->phrase_suivant.$obj->$champ; |
| 508 | 503 | } |
| 509 | 504 | } |
| 510 | - } |
|
| 511 | - else { |
|
| 505 | + } else { |
|
| 512 | 506 | $this->info_batiment = ""; |
| 513 | 507 | $this->info_batiment_next = ""; |
| 514 | 508 | } |
@@ -553,8 +547,7 @@ discard block |
||
| 553 | 547 | $ressource = $this->getRessourceConstruireBatiment($nom_batiment_sql, 0); |
| 554 | 548 | $this->nom_batiment_sql = $nom_batiment_sql; |
| 555 | 549 | $this->niveau_batiment = 0; |
| 556 | - } |
|
| 557 | - else { |
|
| 550 | + } else { |
|
| 558 | 551 | //si c'est le lvl 0 de l'addon |
| 559 | 552 | if ($this->niveau_batiment == 0) { |
| 560 | 553 | $un_batiment = 0; |
@@ -565,8 +558,7 @@ discard block |
||
| 565 | 558 | //si pas assez de ressource |
| 566 | 559 | if (in_array("rouge", $ressource[0])) { |
| 567 | 560 | FlashMessage::setFlash("Pas assez de ressources pour construire ce batiment"); |
| 568 | - } |
|
| 569 | - else { |
|
| 561 | + } else { |
|
| 570 | 562 | //recuperation du temps de construction |
| 571 | 563 | $query = $dbc1->select("ressource_construire") |
| 572 | 564 | ->select("temps_construction") |
@@ -591,8 +583,7 @@ discard block |
||
| 591 | 583 | ->set(); |
| 592 | 584 | |
| 593 | 585 | $this->id_batiment = $dbc->lastInsertId(); |
| 594 | - } |
|
| 595 | - else { |
|
| 586 | + } else { |
|
| 596 | 587 | $dbc->update("niveau", $this->niveau_batiment+1) |
| 597 | 588 | ->update("construction", 1) |
| 598 | 589 | ->from("_bataille_batiment") |
@@ -619,8 +610,7 @@ discard block |
||
| 619 | 610 | //on retire les ressources de la base |
| 620 | 611 | Bataille::getRessource()->setUpdateRessource($ressource_construction[2], $ressource_construction[3], $ressource_construction[0], $ressource_construction[1], 0, "-"); |
| 621 | 612 | } |
| 622 | - } |
|
| 623 | - else { |
|
| 613 | + } else { |
|
| 624 | 614 | FlashMessage::setFlash("Un batiment est déjà en construction, vous ne pouvez pas en construire un autre !"); |
| 625 | 615 | } |
| 626 | 616 | } |
@@ -1,5 +1,7 @@ discard block |
||
| 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 |
@@ -46,15 +48,13 @@ discard block |
||
| 46 | 48 | if (($ini["installation"] == 1) && ($page_root != "installation.php")) { |
| 47 | 49 | header("location:".WEBROOT."installation-ribs"); |
| 48 | 50 | } |
| 49 | - } |
|
| 50 | - else { |
|
| 51 | + } else { |
|
| 51 | 52 | header("location:".WEBROOT."installation"); |
| 52 | 53 | } |
| 53 | 54 | |
| 54 | 55 | if ($ini["developpment"] == 1) { |
| 55 | 56 | $tab = "dev"; |
| 56 | - } |
|
| 57 | - else { |
|
| 57 | + } else { |
|
| 58 | 58 | $tab = "prod"; |
| 59 | 59 | } |
| 60 | 60 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | //-------------------------- GETTER ----------------------------------------------------------------------------// |
| 26 | 26 | public static function getValues() { |
| 27 | - return ["bataille" => self::$values]; |
|
| 27 | + return ["bataille" => self::$values]; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | //initilisation of all classes of battle |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | /** |
| 81 | - * @return mixed |
|
| 81 | + * @return string|null |
|
| 82 | 82 | * recupere la date de la derniere connexion |
| 83 | 83 | */ |
| 84 | 84 | public static function getLastConnexion() { |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
| 114 | - * @param $nom_ressource |
|
| 114 | + * @param string $nom_ressource |
|
| 115 | 115 | * @param $ressource |
| 116 | 116 | * @return array |
| 117 | 117 | * fonction qui permet de renvyer la couleur rouge si pas assez de ressource pour construire le batiment |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | /** |
| 138 | 138 | * @param $id_base |
| 139 | - * @return number |
|
| 139 | + * @return integer|null |
|
| 140 | 140 | * fonction qui renvoi le temps de trajet entre la base du joueur et une autre base |
| 141 | 141 | */ |
| 142 | 142 | public static function getDureeTrajet($id_base) { |
@@ -120,7 +120,7 @@ discard block |
||
| 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 [ |
| 126 | 126 | "ressource" => $ressource, |
@@ -146,10 +146,10 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | //calcul des distances séparant les deux bases en x et y |
| 148 | 148 | //cette dstance sera multipliée par 10 sur x et y puis ajoutée pour avoir le temps du trajte en seconde |
| 149 | - $calc_x = abs($base_joueur['posx']-$base_autre['posx']); |
|
| 150 | - $calc_y = abs($base_joueur['posy']-$base_autre['posy']); |
|
| 149 | + $calc_x = abs($base_joueur['posx'] - $base_autre['posx']); |
|
| 150 | + $calc_y = abs($base_joueur['posy'] - $base_autre['posy']); |
|
| 151 | 151 | |
| 152 | - $temps_voyage = ($calc_x*15)+($calc_y*15); |
|
| 152 | + $temps_voyage = ($calc_x * 15) + ($calc_y * 15); |
|
| 153 | 153 | |
| 154 | 154 | return $temps_voyage; |
| 155 | 155 | } |
@@ -124,7 +124,9 @@ discard block |
||
| 124 | 124 | ->get(); |
| 125 | 125 | |
| 126 | 126 | if ((is_array($query)) && (count($query) == 1)) { |
| 127 | - foreach ($query as $obj) return $obj->ID_base; |
|
| 127 | + foreach ($query as $obj) { |
|
| 128 | + return $obj->ID_base; |
|
| 129 | + } |
|
| 128 | 130 | } |
| 129 | 131 | } |
| 130 | 132 | |
@@ -169,8 +171,7 @@ discard block |
||
| 169 | 171 | |
| 170 | 172 | if ($id_base === null) { |
| 171 | 173 | $query = $dbc->select()->from("_bataille_last_connexion")->where("ID_identite", "=", self::getIdIdentite())->get(); |
| 172 | - } |
|
| 173 | - else { |
|
| 174 | + } else { |
|
| 174 | 175 | $query = $dbc->select("_bataille_last_connexion.last_connexion")->from("_bataille_base") |
| 175 | 176 | ->from("_bataille_last_connexion") |
| 176 | 177 | ->from("identite") |
@@ -287,7 +288,9 @@ discard block |
||
| 287 | 288 | ->get(); |
| 288 | 289 | |
| 289 | 290 | if ((is_array($query)) && (count($query) == 1)) { |
| 290 | - foreach ($query as $obj) return $obj->ID_base; |
|
| 291 | + foreach ($query as $obj) { |
|
| 292 | + return $obj->ID_base; |
|
| 293 | + } |
|
| 291 | 294 | } |
| 292 | 295 | |
| 293 | 296 | return 0; |
@@ -303,7 +306,9 @@ discard block |
||
| 303 | 306 | $query = $dbc->select("nombre_joueur")->from("_bataille_nombre_joueur")->where("ID_nombre_joueur", "=", 1)->get(); |
| 304 | 307 | |
| 305 | 308 | if ((is_array($query)) && (count($query) == 1)) { |
| 306 | - foreach ($query as $obj) return $obj->nombre_joueur; |
|
| 309 | + foreach ($query as $obj) { |
|
| 310 | + return $obj->nombre_joueur; |
|
| 311 | + } |
|
| 307 | 312 | } |
| 308 | 313 | |
| 309 | 314 | return 0; |
@@ -321,11 +326,12 @@ discard block |
||
| 321 | 326 | |
| 322 | 327 | if ($id_base === null) { |
| 323 | 328 | $id_identite = self::getIdIdentite(); |
| 324 | - } |
|
| 325 | - else { |
|
| 329 | + } else { |
|
| 326 | 330 | $query = $dbc->select("ID_identite")->from("_bataille_base")->where("ID_base", "=", $id_base)->get(); |
| 327 | 331 | |
| 328 | - foreach ($query as $obj) $id_identite = $obj->ID_identite; |
|
| 332 | + foreach ($query as $obj) { |
|
| 333 | + $id_identite = $obj->ID_identite; |
|
| 334 | + } |
|
| 329 | 335 | } |
| 330 | 336 | |
| 331 | 337 | $dbc->update("last_connexion", date("Y-m-d H:i:s")) |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | |
| 16 | 16 | //-------------------------- GETTER ----------------------------------------------------------------------------// |
| 17 | 17 | public function getBatiments(){ |
| 18 | - return $this->batiments; |
|
| 18 | + return $this->batiments; |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | /** |
@@ -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") |
@@ -81,8 +81,7 @@ discard block |
||
| 81 | 81 | "niveau" => $obj->niveau, |
| 82 | 82 | "emplacement" => $i |
| 83 | 83 | ]; |
| 84 | - } |
|
| 85 | - else { |
|
| 84 | + } else { |
|
| 86 | 85 | $batiments[] = [ |
| 87 | 86 | "nom_batiment" => $obj->nom_batiment, |
| 88 | 87 | "nom_batiment_sql" => $obj->nom_batiment_sql, |
@@ -91,8 +90,7 @@ discard block |
||
| 91 | 90 | ]; |
| 92 | 91 | } |
| 93 | 92 | } |
| 94 | - } |
|
| 95 | - else { |
|
| 93 | + } else { |
|
| 96 | 94 | $batiments[] = [ |
| 97 | 95 | "nom_batiment" => "A construire", |
| 98 | 96 | "nom_batiment_sql" => "a_construire", |
@@ -76,10 +76,10 @@ discard block |
||
| 76 | 76 | return $this->message; |
| 77 | 77 | } |
| 78 | 78 | public function getDateMessage(){ |
| 79 | - return $this->date_message; |
|
| 79 | + return $this->date_message; |
|
| 80 | 80 | } |
| 81 | 81 | public function getUrl(){ |
| 82 | - return $this->url; |
|
| 82 | + return $this->url; |
|
| 83 | 83 | } |
| 84 | 84 | public function getIdExpediteur() { |
| 85 | 85 | return $this->id_expediteur; |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | return $this->pseudo_receveur; |
| 95 | 95 | } |
| 96 | 96 | public function getValues(){ |
| 97 | - return ["messagerie" => $this->values]; |
|
| 97 | + return ["messagerie" => $this->values]; |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | /** |
@@ -76,10 +76,10 @@ discard block |
||
| 76 | 76 | public function getMessage() { |
| 77 | 77 | return $this->message; |
| 78 | 78 | } |
| 79 | - public function getDateMessage(){ |
|
| 79 | + public function getDateMessage() { |
|
| 80 | 80 | return $this->date_message; |
| 81 | 81 | } |
| 82 | - public function getUrl(){ |
|
| 82 | + public function getUrl() { |
|
| 83 | 83 | return $this->url; |
| 84 | 84 | } |
| 85 | 85 | public function getIdExpediteur() { |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | public function getPseudoReceveur() { |
| 95 | 95 | return $this->pseudo_receveur; |
| 96 | 96 | } |
| 97 | - public function getValues(){ |
|
| 97 | + public function getValues() { |
|
| 98 | 98 | return ["messagerie" => $this->values]; |
| 99 | 99 | } |
| 100 | 100 | |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | $destinataires = explode(",", $destinataire); |
| 292 | 292 | $c = count($destinataires); |
| 293 | 293 | |
| 294 | - for ($i=0 ; $i<$c ; $i++) { |
|
| 294 | + for ($i = 0; $i < $c; $i++) { |
|
| 295 | 295 | if ($this->getIdIdentiteExist($destinataires[$i]) !== false) { |
| 296 | 296 | $destinataires[] = $this->getIdIdentiteExist($destinataires[$i]); |
| 297 | 297 | } |
@@ -33,11 +33,9 @@ discard block |
||
| 33 | 33 | if ($type_boite !== null) { |
| 34 | 34 | if ($type_boite == "boite réception") { |
| 35 | 35 | $this->getBoiteReception(); |
| 36 | - } |
|
| 37 | - else if ($type_boite == "messages envoyés") { |
|
| 36 | + } else if ($type_boite == "messages envoyés") { |
|
| 38 | 37 | $this->getMessagesEnvoyes(); |
| 39 | - } |
|
| 40 | - else if ($type_boite == "messages supprimés") { |
|
| 38 | + } else if ($type_boite == "messages supprimés") { |
|
| 41 | 39 | $this->getMessageSupprimes(); |
| 42 | 40 | } |
| 43 | 41 | |
@@ -240,8 +238,7 @@ discard block |
||
| 240 | 238 | "supprimer" => $obj->supprimer |
| 241 | 239 | ]; |
| 242 | 240 | } |
| 243 | - } |
|
| 244 | - else { |
|
| 241 | + } else { |
|
| 245 | 242 | return false; |
| 246 | 243 | } |
| 247 | 244 | } |
@@ -294,17 +291,14 @@ discard block |
||
| 294 | 291 | for ($i=0 ; $i<$c ; $i++) { |
| 295 | 292 | if ($this->getIdIdentiteExist($destinataires[$i]) !== false) { |
| 296 | 293 | $destinataires[] = $this->getIdIdentiteExist($destinataires[$i]); |
| 297 | - } |
|
| 298 | - else { |
|
| 294 | + } else { |
|
| 299 | 295 | return false; |
| 300 | 296 | } |
| 301 | 297 | } |
| 302 | - } |
|
| 303 | - else { |
|
| 298 | + } else { |
|
| 304 | 299 | if ($this->getIdIdentiteExist($destinataire) !== false) { |
| 305 | 300 | $destinataires[] = $this->getIdIdentiteExist($destinataire); |
| 306 | - } |
|
| 307 | - else { |
|
| 301 | + } else { |
|
| 308 | 302 | return false; |
| 309 | 303 | } |
| 310 | 304 | } |
@@ -35,8 +35,7 @@ discard block |
||
| 35 | 35 | if (isset($_GET['page'])) { |
| 36 | 36 | $titre_page = "Administration du site"; |
| 37 | 37 | $description_page = "Administration du site"; |
| 38 | - } |
|
| 39 | - else { |
|
| 38 | + } else { |
|
| 40 | 39 | $titre_page = "Administration du site"; |
| 41 | 40 | $description_page = "Administration du site"; |
| 42 | 41 | } |
@@ -66,25 +65,21 @@ discard block |
||
| 66 | 65 | //si c'est un controleur de base on va cerhcer dans core/admin |
| 67 | 66 | if ($core !== false) { |
| 68 | 67 | require_once(ROOT.$lien.".php"); |
| 69 | - } |
|
| 70 | - else if ($module !== false) { |
|
| 68 | + } else if ($module !== false) { |
|
| 71 | 69 | $explode = explode("/", $lien, 3); |
| 72 | 70 | |
| 73 | 71 | require_once(ROOT.$explode[0]."/".$explode[1]."/admin/controller/".$explode[2].".php"); |
| 74 | - } |
|
| 75 | - else { |
|
| 72 | + } else { |
|
| 76 | 73 | require_once("admin/controller/".$lien.".php"); |
| 77 | 74 | } |
| 78 | 75 | } |
| 79 | 76 | //pour la page de login |
| 80 | 77 | else if ($page == "login") { |
| 81 | 78 | require("admin/views/template/login_admin.php"); |
| 82 | - } |
|
| 83 | - else { |
|
| 79 | + } else { |
|
| 84 | 80 | if (!isset($_SESSION["idlogin".CLEF_SITE])) { |
| 85 | 81 | Connexion::setObgConnecte(WEBROOT."administrator/login"); |
| 86 | - } |
|
| 87 | - else { |
|
| 82 | + } else { |
|
| 88 | 83 | if (\core\functions\ChaineCaractere::FindInString($page, "modules/") == true) { |
| 89 | 84 | //utilisé pour initialiser les modules |
| 90 | 85 | $page_module = $page; |
@@ -99,8 +94,7 @@ discard block |
||
| 99 | 94 | if (($droit_acces->getDroitAccesPage("gestion-comptes/index") == false) && ($page == "gestion-comptes")) { |
| 100 | 95 | FlashMessage::setFlash("L'accès à cette page n'est pas activé, veuillez contacter votre administrateur pour y avoir accès"); |
| 101 | 96 | header("location:".WEBROOT."administrator"); |
| 102 | - } |
|
| 103 | - else if (($droit_acces->getDroitAccesPage("gestion-droits-acces/index") == false) && ($page == "gestion-droits-acces")) { |
|
| 97 | + } else if (($droit_acces->getDroitAccesPage("gestion-droits-acces/index") == false) && ($page == "gestion-droits-acces")) { |
|
| 104 | 98 | FlashMessage::setFlash("L'accès à cette page n'est pas activé, veuillez contacter votre administrateur pour y avoir accès"); |
| 105 | 99 | header("location:".WEBROOT."administrator"); |
| 106 | 100 | } |
@@ -108,8 +102,7 @@ discard block |
||
| 108 | 102 | if (($droit_acces->getDroitAccesPage($page) == false) && (!isset($page_module))) { |
| 109 | 103 | FlashMessage::setFlash("Vous n'avez pas les droits pour accéder à cette page, contacter votre gérant pour y avoir accès"); |
| 110 | 104 | header("location:".WEBROOT."administrator"); |
| 111 | - } |
|
| 112 | - else { |
|
| 105 | + } else { |
|
| 113 | 106 | $cache = new \core\Cache($page, 1); |
| 114 | 107 | $admin = new Admin($_SESSION["idlogin".CLEF_SITE]); |
| 115 | 108 | |
@@ -121,14 +114,12 @@ discard block |
||
| 121 | 114 | } |
| 122 | 115 | } |
| 123 | 116 | } |
| 124 | - } |
|
| 125 | - else { |
|
| 117 | + } else { |
|
| 126 | 118 | Connexion::setObgConnecte(WEBROOT."administrator/login"); |
| 127 | 119 | |
| 128 | 120 | if (!isset($_SESSION["idlogin".CLEF_SITE])) { |
| 129 | 121 | Connexion::setObgConnecte(WEBROOT."administrator/login"); |
| 130 | - } |
|
| 131 | - else { |
|
| 122 | + } else { |
|
| 132 | 123 | $page = "index"; |
| 133 | 124 | $admin = new Admin($_SESSION["idlogin".CLEF_SITE]); |
| 134 | 125 | require(ROOT."admin/controller/initialise_all.php"); |
@@ -35,8 +35,7 @@ discard block |
||
| 35 | 35 | if ((isset($_GET['page'])) && ($_GET['page'] != null)) { |
| 36 | 36 | $page = $_GET['page']; |
| 37 | 37 | $contenu->getHeadPage(0, $page); |
| 38 | - } |
|
| 39 | - else { |
|
| 38 | + } else { |
|
| 40 | 39 | $contenu->getHeadPage(1); |
| 41 | 40 | } |
| 42 | 41 | |
@@ -70,17 +69,14 @@ discard block |
||
| 70 | 69 | //si c'est un controleur de base on va cerhcer dans core/admin |
| 71 | 70 | if ($core !== false) { |
| 72 | 71 | require_once(ROOT.$lien.".php"); |
| 73 | - } |
|
| 74 | - else if ($module !== false) { |
|
| 72 | + } else if ($module !== false) { |
|
| 75 | 73 | $explode = explode("/", $lien, 3); |
| 76 | 74 | |
| 77 | 75 | require_once(ROOT.$explode[0]."/".$explode[1]."/app/controller/".$explode[2].".php"); |
| 78 | - } |
|
| 79 | - else { |
|
| 76 | + } else { |
|
| 80 | 77 | require_once("app/controller/".$lien.".php"); |
| 81 | 78 | } |
| 82 | - } |
|
| 83 | - else { |
|
| 79 | + } else { |
|
| 84 | 80 | $cache = new \core\Cache($page); |
| 85 | 81 | |
| 86 | 82 | $router_module = new RouterModule(); |
@@ -98,8 +94,7 @@ discard block |
||
| 98 | 94 | echo("<pre>"); |
| 99 | 95 | print_r($arr); |
| 100 | 96 | echo("</pre>"); |
| 101 | - } |
|
| 102 | - else { |
|
| 97 | + } else { |
|
| 103 | 98 | $contenu->getContenuPage(); |
| 104 | 99 | $contenu_page = $contenu->getContenu(); |
| 105 | 100 | |
@@ -122,8 +117,7 @@ discard block |
||
| 122 | 117 | } |
| 123 | 118 | $cache->setEnd(); |
| 124 | 119 | } |
| 125 | - } |
|
| 126 | - else { |
|
| 120 | + } else { |
|
| 127 | 121 | $contenu->getContenuPage(); |
| 128 | 122 | $contenu_page = $contenu->getContenu(); |
| 129 | 123 | |
@@ -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; ?> |