feat: Changement font + debut Lobby
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
b95a1791f7
commit
c9880c95d9
Binary file not shown.
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
class ControllerUserLobby
|
||||
{
|
||||
private $mdLobby;
|
||||
|
||||
private $twig;
|
||||
private $vues;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
global $dns, $user, $pass, $vues, $twig;
|
||||
session_start();
|
||||
try {
|
||||
$this->twig =$twig;
|
||||
$this->vues = $vues;
|
||||
|
||||
$this->mdLobby = new ModelLobby();
|
||||
|
||||
$lobbies = $this->mdLobby->getlobbies();
|
||||
|
||||
|
||||
echo $twig->render($vues["lobby"], [
|
||||
'lobbies' => $lobbies,
|
||||
]);
|
||||
|
||||
} catch (PDOException $e) {
|
||||
// Gérez les erreurs PDO ici
|
||||
} catch (Exception $e2) {
|
||||
// Gérez d'autres erreurs ici
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>Math'Educ</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="/css/global.css">
|
||||
</head>
|
||||
|
||||
<body id="bodyStyle">
|
||||
<div class="container mt-5">
|
||||
|
||||
<div class="container d-flex justify-content-between">
|
||||
<h1 style="color: white;">Liste des Lobbies</h1>
|
||||
<div class="btn">
|
||||
<a type="button" class="btn btn-primary" href="">ajouter un Lobby</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<h4>Lobby</h4>
|
||||
<h4>Nombre de joueurs</h4>
|
||||
<h4></h4>
|
||||
</li>
|
||||
{% for lobby in lobbies %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<h6>{{lobby.name}}</h6>
|
||||
<h6>{{lobby.nbPlayer}}/6</h6>
|
||||
<div class="btn">
|
||||
<a type="button" class="btn btn-primary" href="">Rejoindre</a>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<div class="modal fade" id="modalquestions">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">Ajouter une question</h5>
|
||||
</div>
|
||||
<form method="POST" action="/admin/questions/add">
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="name">Contenu de la question :</label>
|
||||
<input type="text" class="form-control" id="content" name="content">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name">Chapitre de la question :</label>
|
||||
<select class="form-control" id="idChapter" name="idChapter">
|
||||
{% for chapter in chapters %}
|
||||
<option value="{{chapter.id}}" >{{chapter.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name">Réponse 1 de la question :</label>
|
||||
<input type="text" class="form-control" id="answer1" name="answer1">
|
||||
<input type="radio" name="correctAnswer" checked="checked" value="0"> Correct
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Fermer</button>
|
||||
<button type="submit" class="btn btn-primary">Enregistrer</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue