diff --git a/app/controller/AdminController.php b/app/controller/AdminController.php index 006d0120e94577cad9f649cf155fc05d2a85342c..e6fb9af49efb446338e730fbefc9f4dee0f6b924 100644 --- a/app/controller/AdminController.php +++ b/app/controller/AdminController.php @@ -78,7 +78,7 @@ class AdminController extends Controller { if(isset($_FILES['image'])) { list($err, $image) = getImage($_FILES['image'], 512, 512); if ($err == 0) { - saveImage($image, ROOT . "/www/images/jeu/" . $_POST['slug_jeu'] . ".jpg"); + saveImage($image, ROOT . "/www/images/jeu/" . $slug . ".jpg"); } elseif($err == 2) { $_SESSION["addRequestErrCode"] = $err; // on stocke le code d'erreur header('Location:../modif'); // on redirige vers la page de formulaire (il faut faire un retour dans le dossier parent pour que ça fonctionne) diff --git a/app/controller/PartieController.php b/app/controller/PartieController.php index b278b3f4607e38927489e861c7ed42a35982875b..745cf54a7d5269633502df7fc632fa3f5efcf1da 100644 --- a/app/controller/PartieController.php +++ b/app/controller/PartieController.php @@ -401,7 +401,7 @@ class PartieController extends Controller self::error("<h1>Erreur : il n'y a pas assez d'équipes.</h1>", "stepe1"); die(); } - if (count($equipes) > $jeu_actuel->max_equipes) { + if (count($equipes) > $jeu_actuel->max_equipes && !is_null($jeu_actuel->max_equipes)) { self::error("<h1>Erreur : il y a trop d'équipes.</h1>", "stepe1"); die(); } diff --git a/app/view/Includes/header.include.html b/app/view/Includes/header.include.html index eaeec7f768c66a812a7eb26e533af310a57aa012..e765a626fc5dd823b3dad3c53d33bc1d2fcfb2ca 100644 --- a/app/view/Includes/header.include.html +++ b/app/view/Includes/header.include.html @@ -15,7 +15,7 @@ if(!isset($_SESSION)) { // si <link href='https://fonts.googleapis.com/css?family=Work+Sans' rel='stylesheet' type='text/css'> - <script>var BASE_URL = 'http://localhost/projet-web-2016/www';</script> + <script>var BASE_URL = '<?php echo BASE_URL; ?>';</script> <script src="<?php echo BASE_URL; ?>/js/jquery.min.js"></script> <script src="<?php echo BASE_URL; ?>/js/jquery.auto-complete.min.js"></script> <script src="<?php echo BASE_URL; ?>/js/autocompletion_form_jeux.js"></script> diff --git a/app/view/Index/display.html b/app/view/Index/display.html index 87a7ff076c59eb21c78dd4e0d07cbc49872a3400..8cc6f53b19b0bdb4ed36ccee7c240106bd03fc4b 100644 --- a/app/view/Index/display.html +++ b/app/view/Index/display.html @@ -27,7 +27,7 @@ <div class="col-6"> <h3 class="stat-title">Dernier inscrit :</h3> <aside class="profil-image"><a href="<?php echo BASE_URL; ?>/profil/<?php echo $this->last_member->slug; ?>"> - <img src="<?php echo BASE_URL; ?>/images/profil_42.jpg" alt="Photo de profil de phoenix" /> + <img src="<?php echo BASE_URL; ?>/images/avatar/<?php echo $this->last_member->slug; ?>.jpg" alt="Photo de profil de phoenix" /> </a> </aside> <ul class="col-4 pref"> diff --git a/app/view/Profil/display.html b/app/view/Profil/display.html index 8bbf2e29ffdb172d588e12260b966bb35aef1070..8c53c22a01ad7f2d495ae012b36c554fc546f6c1 100644 --- a/app/view/Profil/display.html +++ b/app/view/Profil/display.html @@ -15,9 +15,6 @@ <?php if(isset($_SESSION['connected']) && $_SESSION['connected'] == true) { ?> - <li>24 ans</li> - <li>ENSIIE</li> - <li>1A+++</li> <li><?php echo $this->profil->email; ?></li> </ul> <ul class="col-4 pref">