<h2>Tournois</h2> <section class="tournaments"> <?php use lib\content\Image; use lib\lan\Game; use lib\lan\Tournament; $tournaments = Tournament::getTournaments(); foreach ($tournaments as $tournament) { ?> <article> <img src="<?php echo Image::thumb('250', '360', 'uploads/', $tournament->getGame()->getCover(), 'fill'); ?> " alt="" /> <div class="name"><?php echo $tournament->getName(); ?> </div> <div class="ss-name">Jeu : <?php echo $tournament->getGame()->getName(); ?> </div> <p class="description"><?php echo $tournament->getDescription(); ?> </p> </article> <?php } ?>
$bf3Tour = new Tournament($bf3); $bf3Tour->addSchedule('Matin', new Schedule(1353567600, 1353582000)); //22.11.2012 8h00 - 12h00 $bf3Tour->setName('Tournois Battlefield 3'); $bf3Tour->setDescription('Ruée en escouade 4vs4 sur carte aléatoires- Equipes de 4 personnes - Compte BF3 et DLC Close Quarters requis'); $l4dTour = new Tournament($l4d); $l4dTour->addSchedule('Après-Midi', new Schedule(1353589200, 1353603600)); //22.11.2012 14h00 - 18h00 $l4dTour->setName('Tournois Left for Dead'); $l4dTour->setDescription('Survie 4vs4 en 5 manches sur carte aléatoire - Equipes de 4 personnes - Jeu fourni sur place'); Tournament::saveTournament($bf3Tour); Tournament::saveTournament($l4dTour); //Test des elements utilisés dans le frontend $gamesList = Game::getGames(); $countGames = Game::countGames(); $tourList = Tournament::getTournaments(); $countTour = Tournament::countTournaments(); //Autres test du moteur, non implanté dans le frontend $me = new User(); $me->setName('Karl'); $me->setSurname('Woditsch'); $me->setMail('*****@*****.**'); $me->setLogin(uniqid()); $me->setPassword('1234'); User::saveUser($me); $userList = User::getUsers(); $countUsers = User::countUsers(); $team = new Team(); $team->setName('Les winneurs'); $team->setDescription('Equipe de test'); $team->addPlayer($me);