feat : model + controller + gateway fix
continuous-integration/drone/push Build is failing Details

tests
Jeremy DUCOURTHIAL 1 year ago
parent 2fb925ddd4
commit 7de862d0c4

@ -1,136 +0,0 @@
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* adminChaptersModal.twig */
class __TwigTemplate_db530ddcf6673624deec81ea04f186fecb181fd86f3ccee0c9062794492649dc extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
echo "<!DOCTYPE html>
<html lang=\"fr\">
<head>
<title>Maths Educ</title>
<meta charset=\"UTF-8\">
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN\" crossorigin=\"anonymous\">
</script>
<style>
@font-face {
font-family: 'MenuFont';
src: url('Media/mathEducFont.ttf') format('truetype');
}
* {
font-family: 'MenuFont';
}
</style>
</head>
<body>
<div class=\"modal fade\" id=\"modalUpdateChapters\">
<div class=\"modal-dialog\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<h5 class=\"modal-title\" id=\"exampleModalLabel\">modifier un Chapter</h5>
</div>
<form method=\"POST\" action=\"/admin/chapters/update\">
<div class=\"modal-body\">
<div class=\"form-group\">
<input type=\"hidden\" class=\"form-control\" id=\"updateId\" name=\"id\">
</div>
<div class=\"form-group\">
<label for=\"name\">Nom du chapitre :</label>
<input type=\"text\" class=\"form-control\" id=\"updateName\" name=\"name\">
</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>
<script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js\"></script>
<script>
if (";
// line 51
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["chapter"] ?? null), "id", [], "any", false, false, false, 51), "html", null, true);
echo " != 0) {
window.onload = showModal();
function showModal() {
var modal = new bootstrap.Modal(document.getElementById('modalUpdateChapters'));
var id = document.getElementById('updateId');
var name = document.getElementById('updateName');
id.value = \"";
// line 60
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["chapter"] ?? null), "id", [], "any", false, false, false, 60), "html", null, true);
echo "\";
name.value = \"";
// line 61
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["chapter"] ?? null), "name", [], "any", false, false, false, 61), "html", null, true);
echo "\";
modal.show();
}
}
</script>
</body>
</html>
";
}
public function getTemplateName()
{
return "adminChaptersModal.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 105 => 61, 101 => 60, 89 => 51, 37 => 1,);
}
public function getSourceContext()
{
return new Source("", "adminChaptersModal.twig", "C:\\MAMP\\htdocs\\3.01-QCM_MuscuMaths\\Website\\templates\\adminChaptersModal.twig");
}
}

@ -1,148 +0,0 @@
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* adminChapters.twig */
class __TwigTemplate_af6d01bb41c54db8fb51034af9aa031856e0e3b512548129651442166b2ea3ee extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
echo "<!DOCTYPE html>
<html lang=\"fr\">
<head>
<title>Maths Educ</title>
<meta charset=\"UTF-8\">
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN\" crossorigin=\"anonymous\">
</script>
<style>
@font-face {
font-family: 'MenuFont';
src: url('Media/mathEducFont.ttf') format('truetype');
}
* {
font-family: 'MenuFont';
}
</style>
</head>
<body>
<div class=\"container mt-5\">
<h1>Liste des chapitres</h1>
<ul class=\"list-group\">
";
// line 26
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["chapters"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["chapter"]) {
// line 27
echo " <li class=\"list-group-item d-flex ustify-content-between align-items-center\">
";
// line 28
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["chapter"], "name", [], "any", false, false, false, 28), "html", null, true);
echo "
<div class=\"btn-group\" role=\"group\">
<a type=\"button\" href=\"/admin/chapters/updatemodal/";
// line 30
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["chapter"], "id", [], "any", false, false, false, 30), "html", null, true);
echo "\" class=\"btn btn-primary\">Modifier</a>
<a type=\"button\" href=\"/admin/chapters/delete/";
// line 31
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["chapter"], "id", [], "any", false, false, false, 31), "html", null, true);
echo "\" class=\"btn btn-danger\">Supprimer</a>
</div>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['chapter'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 35
echo " </ul>
</div>
<div class=\"container mt-3\">
<button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#modalchapters\">Ajouter un chapitre</button>
<div class=\"btn-group\" role=\"group\">
<a href=\"/admin/administrators\" class=\"btn btn-secondary\">D</a>
<a href=\"/\" class=\"btn btn-secondary\">Retour</a>
<a href=\"/admin/questions\" class=\"btn btn-secondary\">G</a>
</div>
</div>
<script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js\"></script>
<div class=\"modal fade\" id=\"modalchapters\">
<div class=\"modal-dialog\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<h5 class=\"modal-title\" id=\"exampleModalLabel\">Ajouter un chapitre</h5>
</div>
<form method=\"POST\" action=\"/admin/chapters/add\">
<div class=\"modal-body\">
<div class=\"form-group\">
<label for=\"name\">Nom du chapitre :</label>
<input type=\"text\" class=\"form-control\" id=\"name\" name=\"name\">
</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>
";
}
public function getTemplateName()
{
return "adminChapters.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 90 => 35, 80 => 31, 76 => 30, 71 => 28, 68 => 27, 64 => 26, 37 => 1,);
}
public function getSourceContext()
{
return new Source("", "adminChapters.twig", "C:\\MAMP\\htdocs\\3.01-QCM_MuscuMaths\\Website\\templates\\adminChapters.twig");
}
}

@ -1,105 +0,0 @@
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* loginAdmin.twig */
class __TwigTemplate_e196f9ec32fc9706c65ba98b0f6c214ddc2e5d903a2e8bbcc6e385ff276fb2c6 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
echo "<!DOCTYPE html>
<html lang=\"fr\">
<head>
<meta charset=\"utf-8\">
<title>Math'Educ - Connexion</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\">
<style>
@font-face {
font-family: 'MenuFont';
src: url('Media/mathEducFont.ttf') format('truetype');
}
* {
font-family: 'MenuFont';
}
</style>
</head>
<body style=\"height: 100%;\">
<div class=\"container mt-5\">
<div class=\"row\">
<div class=\"col-md-4 offset-md-4\">
<div class=\"card\">
<div class=\"card-body\">
<h2 class=\"card-title\">Connexion</h2>
<form action=\"/login/verify\" method=\"post\">
<div class=\"mb-3\">
<label for=\"username\" class=\"form-label\">Nom d'utilisateur</label>
<input type=\"text\" class=\"form-control\" id=\"username\" name=\"username\" required>
</div>
<div class=\"mb-3\">
<label for=\"password\" class=\"form-label\">Mot de passe</label>
<input type=\"password\" class=\"form-control\" id=\"password\" name=\"password\" required>
</div>
<button type=\"submit\" class=\"btn btn-primary\">Se connecter</button>
<p>";
// line 35
echo twig_escape_filter($this->env, ($context["error"] ?? null), "html", null, true);
echo "</p>
</form>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
";
}
public function getTemplateName()
{
return "loginAdmin.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 73 => 35, 37 => 1,);
}
public function getSourceContext()
{
return new Source("", "loginAdmin.twig", "C:\\MAMP\\htdocs\\3.01-QCM_MuscuMaths\\Website\\templates\\loginAdmin.twig");
}
}

@ -1,152 +0,0 @@
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* adminAdministrators.twig */
class __TwigTemplate_c98eacdb83979a8d1d23cbb83febab2600b7cfae34ecace697c0e2fd5d812e30 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
echo "<!DOCTYPE html>
<html lang=\"fr\">
<head>
<title>Maths Educ</title>
<meta charset=\"UTF-8\">
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN\" crossorigin=\"anonymous\">
</script>
<style>
@font-face {
font-family: 'MenuFont';
src: url('Media/mathEducFont.ttf') format('truetype');
}
* {
font-family: 'MenuFont';
}
</style>
</head>
<body>
<div class=\"container mt-5\">
<h1>Liste des administrators</h1>
<ul class=\"list-group\">
";
// line 26
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["administrators"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["admin"]) {
// line 27
echo " <li class=\"list-group-item d-flex ustify-content-between align-items-center\">
";
// line 28
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["admin"], "username", [], "any", false, false, false, 28), "html", null, true);
echo "
<div class=\"btn-group\" role=\"group\">
<a type=\"button\" href=\"/admin/administrators/updatemodal/";
// line 30
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["admin"], "id", [], "any", false, false, false, 30), "html", null, true);
echo "\" class=\"btn btn-primary\">Modifier</a>
<a type=\"button\" href=\"/admin/administrators/delete/";
// line 31
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["admin"], "id", [], "any", false, false, false, 31), "html", null, true);
echo "\" class=\"btn btn-danger\">Supprimer</a>
</div>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['admin'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 35
echo " </ul>
</div>
<div class=\"container mt-3\">
<button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#modalAdministrators\">Ajouter un administrateur</button>
<div class=\"btn-group\" role=\"group\">
<a href=\"/admin/questions\" class=\"btn btn-secondary\">D</a>
<a href=\"/\" class=\"btn btn-secondary\">Retour</a>
<a href=\"/admin/chapters\" class=\"btn btn-secondary\">G</a>
</div>
</div>
<script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js\"></script>
<div class=\"modal fade\" id=\"modalAdministrators\">
<div class=\"modal-dialog\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<h5 class=\"modal-title\" id=\"exampleModalLabel\">Ajouter un administrateur</h5>
</div>
<form method=\"POST\" action=\"/admin/administrators/add\">
<div class=\"modal-body\">
<div class=\"form-group\">
<label for=\"username\">Nom d'utilisateur :</label>
<input type=\"text\" class=\"form-control\" id=\"username\" name=\"username\">
</div>
<div class=\"form-group\">
<label for=\"password\">Mot de passe :</label>
<input type=\"password\" class=\"form-control\" id=\"password\" name=\"password\">
</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>
";
}
public function getTemplateName()
{
return "adminAdministrators.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 90 => 35, 80 => 31, 76 => 30, 71 => 28, 68 => 27, 64 => 26, 37 => 1,);
}
public function getSourceContext()
{
return new Source("", "adminAdministrators.twig", "C:\\MAMP\\htdocs\\3.01-QCM_MuscuMaths\\Website\\templates\\adminAdministrators.twig");
}
}

@ -1,145 +0,0 @@
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* adminAdministratorsModal.twig */
class __TwigTemplate_955c52789a7c596545dcc8ff29fdb983ff6f35e7076c4df3206c6ad086458365 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
echo "<!DOCTYPE html>
<html lang=\"fr\">
<head>
<title>Maths Educ</title>
<meta charset=\"UTF-8\">
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN\" crossorigin=\"anonymous\">
</script>
<style>
@font-face {
font-family: 'MenuFont';
src: url('Media/mathEducFont.ttf') format('truetype');
}
* {
font-family: 'MenuFont';
}
</style>
</head>
<body>
<div class=\"modal fade\" id=\"modalUpdateAdministrators\">
<div class=\"modal-dialog\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<h5 class=\"modal-title\" id=\"exampleModalLabel\">Modifier un administrateur</h5>
</div>
<form method=\"POST\" action=\"/admin/administrators/update\">
<div class=\"modal-body\">
<div class=\"form-group\">
<input type=\"hidden\" class=\"form-control\" id=\"updateId\" name=\"id\">
</div>
<div class=\"form-group\">
<label for=\"username\">Nom d'utilisateur :</label>
<input type=\"text\" class=\"form-control\" id=\"updateUsername\" name=\"username\">
</div>
<div class=\"form-group\">
<label for=\"password\">Mot de passe :</label>
<input type=\"password\" class=\"form-control\" id=\"updatePassword\" name=\"password\">
</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>
<script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js\"></script>
<script>
if (";
// line 55
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["administrator"] ?? null), "id", [], "any", false, false, false, 55), "html", null, true);
echo " != 0) {
window.onload = showModal();
function showModal() {
var modal = new bootstrap.Modal(document.getElementById('modalUpdateAdministrators'));
var id = document.getElementById('updateId');
var username = document.getElementById('updateUsername');
var password = document.getElementById('updatePassword');
id.value = \"";
// line 65
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["administrator"] ?? null), "id", [], "any", false, false, false, 65), "html", null, true);
echo "\";
username.value = \"";
// line 66
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["administrator"] ?? null), "username", [], "any", false, false, false, 66), "html", null, true);
echo "\";
password.value = \"";
// line 67
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["administrator"] ?? null), "password", [], "any", false, false, false, 67), "html", null, true);
echo "\";
modal.show();
}
}
</script>
</body>
</html>
";
}
public function getTemplateName()
{
return "adminAdministratorsModal.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 114 => 67, 110 => 66, 106 => 65, 93 => 55, 37 => 1,);
}
public function getSourceContext()
{
return new Source("", "adminAdministratorsModal.twig", "C:\\MAMP\\htdocs\\3.01-QCM_MuscuMaths\\Website\\templates\\adminAdministratorsModal.twig");
}
}

@ -1,121 +0,0 @@
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* multijoueur.twig */
class __TwigTemplate_429a8744f4fda2467ee032a38c95765093750a6d603790dcf0bff53ef39a41b5 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
echo "<!DOCTYPE html>
<html lang=\"fr\">
<html>
<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\">
<style>
@font-face {
font-family: 'MenuFont';
src: url('Media/mathEducFont.ttf') format('truetype');
}
* {
font-family: 'MenuFont';
}
</style>
</head>
<body style=\"background: linear-gradient(to bottom, rgba(37, 34, 71, 1), rgba(37, 35, 72, 1));\">
<div class=\"d-flex flex-column align-items-center justify-content-center\" style=\"height:95vh\">
<div style=\"width:90vw; height:30vh; margin-top:50px;\" class=\"text-center d-flex align-items-center text-center text-white border border-white rounded\">
<p class=\"sm-fs-5 mx-auto m-5\">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Provident fuga cum soluta iure libero! Ullam, expedita excepturi! Odio distinctio quos quasi commodi libero ratione corrupti, unde iste explicabo suscipit consequatur ipsum! Id beatae corrupti ipsa totam deserunt, vel tenetur, iusto quaerat asperiores veritatis quidem! Vel dolorem recusandae necessitatibus ullam laborum!
<?php /* Query to bd d'une question aléatoire */ ?>
</p>
</div>
<div class=\"container text-center d-flex flex-column align-items-center text-center flex-grow\">
<div class=\"container text-center d-flex flex-row align-items-center text-center flex-grow\">
<button href=\"vues/Solo.php\" class=\"text-white m-3 container text-center d-flex align-items-center w-75 h-75 rounded border border-white text-center\" style=\"background-color:blue;text-decoration: none;color: black; height:20vh;\">
<div class=\"container text-center d-flex align-items-center text-center\">
<p class=\"mx-auto fs-5\">
Lorem, ipsum.
<?php /* Query to bd d'une question aléatoire */ ?>
</p>
</div>
</button>
<button href=\"vues/Multijoueur.php\" class=\"text-white m-3 container text-center d-flex align-items-center w-75 h-75 rounded border border-white text-center\" style=\"background-color:green;text-decoration: none;color: black;height:20vh;\">
<div class=\"container text-center d-flex align-items-center text-center\">
<p class=\"mx-auto fs-5\">
Lorem, ipsum.
<?php /* Query to bd d'une question aléatoire */ ?>
</p>
</div>
</button>
</div>
<div class=\"container text-center d-flex flex-row align-items-center text-center flex-grow\">
<button href=\"vues/AddQuestions.php\" class=\"text-white m-3 container text-center d-flex align-items-center w-75 h-75 rounded border border-white text-center\" style=\"background-color:red;text-decoration: none;color: black;height:20vh;\">
<div class=\"container text-center d-flex align-items-center text-center\">
<p class=\"mx-auto fs-5\">
e^5
<?php /* Query to bd d'une question aléatoire */ ?>
</p>
</div>
</button>
<button href=\"vues/AddQuestions.php\" class=\"text-white m-3 container text-center d-flex align-items-center w-75 h-75 rounded border border-white text-center\" style=\"background-color:orange;text-decoration: none;color: black;height:20vh;\">
<div class=\"container text-center d-flex align-items-center text-center\">
<p class=\"mx-auto fs-5\">
Lorem, ipsum.
<?php /* Query to bd d'une question aléatoire */ ?>
</p>
</div>
</button>
</div>
</div>
</div>
</body>";
}
public function getTemplateName()
{
return "multijoueur.twig";
}
public function getDebugInfo()
{
return array ( 37 => 1,);
}
public function getSourceContext()
{
return new Source("", "multijoueur.twig", "C:\\MAMP\\htdocs\\3.01-QCM_MuscuMaths\\Website\\templates\\multijoueur.twig");
}
}

@ -1,250 +0,0 @@
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* adminQuestionsModal.twig */
class __TwigTemplate_75bef74a25a0ec5559fef760a3bbe2a6595a7456c8de4260cd469657ba8632c6 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
echo "<!DOCTYPE html>
<html lang=\"fr\">
<head>
<title>Maths Educ</title>
<meta charset=\"UTF-8\">
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN\" crossorigin=\"anonymous\">
</script>
<style>
@font-face {
font-family: 'MenuFont';
src: url('Media/mathEducFont.ttf') format('truetype');
}
* {
font-family: 'MenuFont';
}
</style>
</head>
<body>
<div class=\"modal fade\" id=\"modalUpdateQuestions\">
<div class=\"modal-dialog\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<h5 class=\"modal-title\" id=\"exampleModalLabel\">Ajouter un chapitre</h5>
</div>
<form method=\"POST\" action=\"/admin/questions/update\">
<div class=\"modal-body\">
<div class=\"form-group\">
<input type=\"hidden\" class=\"form-control\" id=\"updateId\" name=\"id\">
</div>
<div class=\"form-group\">
<label for=\"name\">Contenu de la question :</label>
<input type=\"text\" class=\"form-control\" id=\"updateContent\" name=\"content\">
</div>
<div class=\"form-group\">
<label for=\"name\">Chapitre de la question :</label>
<select class=\"form-control\" id=\"updateIdChapter\" name=\"idChapter\">
";
// line 41
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["chapters"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["chapter"]) {
// line 42
echo " <option value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["chapter"], "id", [], "any", false, false, false, 42), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["chapter"], "id", [], "any", false, false, false, 42) == twig_get_attribute($this->env, $this->source, ($context["question"] ?? null), "idchapter", [], "any", false, false, false, 42))) {
echo "selected=\"selected\"";
}
echo ">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["chapter"], "name", [], "any", false, false, false, 42), "html", null, true);
echo "</option>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['chapter'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 44
echo " </select>
</div>
<div class=\"form-group\">
<label for=\"name\">Réponse 1 de la question :</label>
<input type=\"hidden\" class=\"form-control\" id=\"updateIdAnswer1\" name=\"IdAnswer1\">
<input type=\"text\" class=\"form-control\" id=\"updateAnswer1\" name=\"answer1\">
<input type=\"radio\" name=\"correctAnswer\" ";
// line 50
if ((twig_get_attribute($this->env, $this->source, ($context["question"] ?? null), "idanswergood", [], "any", false, false, false, 50) == twig_get_attribute($this->env, $this->source, (($__internal_compile_0 = ($context["answers"] ?? null)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0[0] ?? null) : null), "id", [], "any", false, false, false, 50))) {
echo "checked=\"checked\"";
}
echo " value=\"1\"> Correct
</div>
<div class=\"form-group\">
<label for=\"name\">Réponse 2 de la question :</label>
<input type=\"hidden\" class=\"form-control\" id=\"updateIdAnswer2\" name=\"IdAnswer2\">
<input type=\"text\" class=\"form-control\" id=\"updateAnswer2\" name=\"answer2\">
<input type=\"radio\" name=\"correctAnswer\" ";
// line 56
if ((twig_get_attribute($this->env, $this->source, ($context["question"] ?? null), "idanswergood", [], "any", false, false, false, 56) == twig_get_attribute($this->env, $this->source, (($__internal_compile_1 = ($context["answers"] ?? null)) && is_array($__internal_compile_1) || $__internal_compile_1 instanceof ArrayAccess ? ($__internal_compile_1[1] ?? null) : null), "id", [], "any", false, false, false, 56))) {
echo "checked=\"checked\"";
}
echo " value=\"2\"> Correct
</div>
<div class=\"form-group\">
<label for=\"name\">Réponse 3 de la question :</label>
<input type=\"hidden\" class=\"form-control\" id=\"updateIdAnswer3\" name=\"IdAnswer3\">
<input type=\"text\" class=\"form-control\" id=\"updateAnswer3\" name=\"answer3\">
<input type=\"radio\" name=\"correctAnswer\" ";
// line 62
if ((twig_get_attribute($this->env, $this->source, ($context["question"] ?? null), "idanswergood", [], "any", false, false, false, 62) == twig_get_attribute($this->env, $this->source, (($__internal_compile_2 = ($context["answers"] ?? null)) && is_array($__internal_compile_2) || $__internal_compile_2 instanceof ArrayAccess ? ($__internal_compile_2[2] ?? null) : null), "id", [], "any", false, false, false, 62))) {
echo "checked=\"checked\"";
}
echo " value=\"3\"> Correct
</div>
<div class=\"form-group\">
<label for=\"name\">Réponse 4 de la question :</label>
<input type=\"hidden\" class=\"form-control\" id=\"updateIdAnswer4\" name=\"IdAnswer4\">
<input type=\"text\" class=\"form-control\" id=\"updateAnswer4\" name=\"answer4\">
<input type=\"radio\" name=\"correctAnswer\" ";
// line 68
if ((twig_get_attribute($this->env, $this->source, ($context["question"] ?? null), "idanswergood", [], "any", false, false, false, 68) == twig_get_attribute($this->env, $this->source, (($__internal_compile_3 = ($context["answers"] ?? null)) && is_array($__internal_compile_3) || $__internal_compile_3 instanceof ArrayAccess ? ($__internal_compile_3[3] ?? null) : null), "id", [], "any", false, false, false, 68))) {
echo "checked=\"checked\"";
}
echo " value=\"4\"> 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>
<script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js\"></script>
<script>
if (";
// line 83
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["question"] ?? null), "id", [], "any", false, false, false, 83), "html", null, true);
echo " != 0) {
window.onload = showModal();
function showModal() {
var modal = new bootstrap.Modal(document.getElementById('modalUpdateQuestions'));
var id = document.getElementById('updateId');
var content = document.getElementById('updateContent');
var IdAnswer1 = document.getElementById('updateIdAnswer1');
var IdAnswer2 = document.getElementById('updateIdAnswer2');
var IdAnswer3 = document.getElementById('updateIdAnswer3');
var IdAnswer4 = document.getElementById('updateIdAnswer4');
var answer1 = document.getElementById('updateAnswer1');
var answer2 = document.getElementById('updateAnswer2');
var answer3 = document.getElementById('updateAnswer3');
var answer4 = document.getElementById('updateAnswer4');
id.value = \"";
// line 102
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["question"] ?? null), "id", [], "any", false, false, false, 102), "html", null, true);
echo "\";
content.value = \"";
// line 103
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["question"] ?? null), "content", [], "any", false, false, false, 103), "html", null, true);
echo "\";
IdAnswer1.value = \"";
// line 105
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (($__internal_compile_4 = ($context["answers"] ?? null)) && is_array($__internal_compile_4) || $__internal_compile_4 instanceof ArrayAccess ? ($__internal_compile_4[0] ?? null) : null), "id", [], "any", false, false, false, 105), "html", null, true);
echo "\";
IdAnswer2.value = \"";
// line 106
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (($__internal_compile_5 = ($context["answers"] ?? null)) && is_array($__internal_compile_5) || $__internal_compile_5 instanceof ArrayAccess ? ($__internal_compile_5[1] ?? null) : null), "id", [], "any", false, false, false, 106), "html", null, true);
echo "\";
IdAnswer3.value = \"";
// line 107
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (($__internal_compile_6 = ($context["answers"] ?? null)) && is_array($__internal_compile_6) || $__internal_compile_6 instanceof ArrayAccess ? ($__internal_compile_6[2] ?? null) : null), "id", [], "any", false, false, false, 107), "html", null, true);
echo "\";
IdAnswer4.value = \"";
// line 108
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (($__internal_compile_7 = ($context["answers"] ?? null)) && is_array($__internal_compile_7) || $__internal_compile_7 instanceof ArrayAccess ? ($__internal_compile_7[3] ?? null) : null), "id", [], "any", false, false, false, 108), "html", null, true);
echo "\";
answer1.value = \"";
// line 110
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (($__internal_compile_8 = ($context["answers"] ?? null)) && is_array($__internal_compile_8) || $__internal_compile_8 instanceof ArrayAccess ? ($__internal_compile_8[0] ?? null) : null), "content", [], "any", false, false, false, 110), "html", null, true);
echo "\";
answer2.value = \"";
// line 111
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (($__internal_compile_9 = ($context["answers"] ?? null)) && is_array($__internal_compile_9) || $__internal_compile_9 instanceof ArrayAccess ? ($__internal_compile_9[1] ?? null) : null), "content", [], "any", false, false, false, 111), "html", null, true);
echo "\";
answer3.value = \"";
// line 112
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (($__internal_compile_10 = ($context["answers"] ?? null)) && is_array($__internal_compile_10) || $__internal_compile_10 instanceof ArrayAccess ? ($__internal_compile_10[2] ?? null) : null), "content", [], "any", false, false, false, 112), "html", null, true);
echo "\";
answer4.value = \"";
// line 113
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (($__internal_compile_11 = ($context["answers"] ?? null)) && is_array($__internal_compile_11) || $__internal_compile_11 instanceof ArrayAccess ? ($__internal_compile_11[3] ?? null) : null), "content", [], "any", false, false, false, 113), "html", null, true);
echo "\";
modal.show();
}
}
</script>
</body>
</html>
";
}
public function getTemplateName()
{
return "adminQuestionsModal.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 219 => 113, 215 => 112, 211 => 111, 207 => 110, 202 => 108, 198 => 107, 194 => 106, 190 => 105, 185 => 103, 181 => 102, 159 => 83, 139 => 68, 128 => 62, 117 => 56, 106 => 50, 98 => 44, 83 => 42, 79 => 41, 37 => 1,);
}
public function getSourceContext()
{
return new Source("", "adminQuestionsModal.twig", "C:\\MAMP\\htdocs\\3.01-QCM_MuscuMaths\\Website\\templates\\adminQuestionsModal.twig");
}
}

@ -1,111 +0,0 @@
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* solo.twig */
class __TwigTemplate_4148e004c5e14111af10efd60a61621bd5d1da3ddcc436158f993acb94c194b2 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
echo "<!DOCTYPE html>
<html lang=\"fr\">
<html style=\"height: 100%\" class=\"row\">
<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\">
<style>
@font-face {
font-family: 'MenuFont';
src: url('Media/mathEducFont.ttf') format('truetype');
}
* {
font-family: 'MenuFont';
}
</style>
</head>
<body style=\"background: linear-gradient(to bottom, rgba(37, 34, 71, 1), rgba(37, 35, 72, 1));\" class=\"col my-auto\">
<div class=\"container text-center\">
<div class=\"container text-center text-white border border-white rounded mt-5\">
<p class=\"fs-2\">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Provident fuga cum soluta iure libero! Ullam, expedita excepturi! Odio distinctio quos quasi commodi libero ratione corrupti, unde iste explicabo suscipit consequatur ipsum! Id beatae corrupti ipsa totam deserunt, vel tenetur, iusto quaerat asperiores veritatis quidem! Vel dolorem recusandae necessitatibus ullam laborum!
<?php /* Query to bd d'une question aléatoire */ ?>
</p>
</div>
<div class=\"row g-5\">
<div class=\"col pt-5\">
<button class=\"text-white fs-2 d-grid gap-2 container text-center rounded border border-white\" style=\"background-color:blue;text-decoration: none;color: black; \">
Lorem, ipsum.
<?php /* Query to bd d'une question aléatoire */ ?>
</button>
</div>
<div class=\"col pt-5\">
<button class=\"text-white fs-2 container text-center rounded border border-white\" style=\"background-color:green;text-decoration: none;color: black;\">
Lorem, ipsum.
<?php /* Query to bd d'une question aléatoire */ ?>
</button>
</div>
</div>
<div class=\"row g-5\">
<div class=\"col pt-5\">
<button class=\"text-white fs-2 container text-center rounded border border-white\" style=\"background-color:red;text-decoration: none;color: black;\">
e^5
<?php /* Query to bd d'une question aléatoire */ ?>
</button>
</div>
<div class=\"col pt-5\">
<button class=\"text-white fs-2 container text-center rounded border border-white\" style=\"background-color:orange;text-decoration: none;color: black;\">
Lorem, ipsum.
<?php /* Query to bd d'une question aléatoire */ ?>
</button>
</div>
</div>
</div>
</body>";
}
public function getTemplateName()
{
return "solo.twig";
}
public function getDebugInfo()
{
return array ( 37 => 1,);
}
public function getSourceContext()
{
return new Source("", "solo.twig", "C:\\MAMP\\htdocs\\3.01-QCM_MuscuMaths\\Website\\templates\\solo.twig");
}
}

@ -1,152 +0,0 @@
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* adminPlayers.twig */
class __TwigTemplate_699f078670c03576323333866ccb8dcdb0372bba2f61b79782f711033ea809d0 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
echo "<!DOCTYPE html>
<html lang=\"fr\">
<head>
<title>Maths Educ</title>
<meta charset=\"UTF-8\">
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN\" crossorigin=\"anonymous\">
<script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js\" integrity=\"sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL\" crossorigin=\"anonymous\">
</script>
<style>
@font-face {
font-family: 'MenuFont';
src: url('Media/mathEducFont.ttf') format('truetype');
}
* {
font-family: 'MenuFont';
}
</style>
</head>
<body>
<div class=\"container mt-5\">
<h1>Liste des Administrateurs</h1>
<ul class=\"list-group\">
";
// line 27
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["players"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["player"]) {
// line 28
echo " <li class=\"list-group-item d-flex ustify-content-between align-items-center\">
";
// line 29
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["player"], "nickname", [], "any", false, false, false, 29), "html", null, true);
echo "
<div class=\"btn-group\" role=\"group\">
<a type=\"button\" href=\"/admin/update?id=";
// line 31
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["player"], "id", [], "any", false, false, false, 31), "html", null, true);
echo "\" class=\"btn btn-primary\">Modifier</a>
<a type=\"button\" href=\"/admin/players/delete/";
// line 32
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["player"], "id", [], "any", false, false, false, 32), "html", null, true);
echo "\" class=\"btn btn-danger\">Supprimer</a>
</div>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['player'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 36
echo " </ul>
</div>
<div class=\"container mt-3\">
<button type=\"button\" class=\"btn btn-primary\" data-toggle=\"modal\" data-target=\"#exampleModal\">Ajouter une question</button>
<div class=\"btn-group\" role=\"group\">
<a href=\"/admin/chapters\" class=\"btn btn-secondary\">D</a>
<a href=\"/\" class=\"btn btn-secondary\">Retour</a>
<a href=\"/admin/administrators\" class=\"btn btn-secondary\">G</a>
</div>
</div>
<div class=\"modal fade\" id=\"exampleModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">
<div class=\"modal-dialog\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<h5 class=\"modal-title\" id=\"exampleModalLabel\">Ajouter une question</h5>
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
<span aria-hidden=\"true\">&times;</span>
</button>
</div>
<div class=\"modal-body\">
<form method=\"POST\" action=\"/votre/action\">
<!-- Ajoutez vos champs de formulaire ici -->
<div class=\"form-group\">
<label for=\"question\">Question :</label>
<input type=\"text\" class=\"form-control\" id=\"question\" name=\"question\">
</div>
<!-- Ajoutez d'autres champs de formulaire ici -->
</form>
</div>
<div class=\"modal-footer\">
<button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Fermer</button>
<button type=\"button\" class=\"btn btn-primary\">Enregistrer</button>
</div>
</div>
</div>
</div>
</body>
</html>
";
}
public function getTemplateName()
{
return "adminPlayers.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 91 => 36, 81 => 32, 77 => 31, 72 => 29, 69 => 28, 65 => 27, 37 => 1,);
}
public function getSourceContext()
{
return new Source("", "adminPlayers.twig", "C:\\MAMP\\htdocs\\3.01-QCM_MuscuMaths\\Website\\templates\\adminPlayers.twig");
}
}

@ -1,101 +0,0 @@
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* accueil.twig */
class __TwigTemplate_b6c8947d2cab48858930d2a60d05dca4d1d69e979faaee7be7cde60446b3c59f extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
echo "<!DOCTYPE html>
<html lang=\"fr\">
<html>
<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\">
<style>
@font-face {
font-family: 'MenuFont';
src: url('Media/mathEducFont.ttf') format('truetype');
}
* {
font-family: 'MenuFont';
}
</style>
</head>
<body style=\"background: linear-gradient(to bottom, rgba(37, 34, 71, 1), rgba(37, 35, 72, 1));\">
<div class=\"d-flex flex-column align-items-center justify-content-between\" style=\"height:95vh\">
<img src=\"Media/Logo.png\" style=\"margin-top:50px; object-fit:fill;\" class=\"h-25\">
<a href=\"/solo\" class=\"text-white m-3 container text-center d-flex align-items-center w-75 rounded border border-white text-center\" style=\"background-color:green;text-decoration: none;color: black; height:20vh;\">
<div class=\"container text-center d-flex align-items-center text-center\">
<h1 class=\"mx-auto fs-1\">
SOLO
</h1>
</div>
</a>
<a href=\"/multi\" class=\"text-white m-3 container text-center d-flex align-items-center w-75 rounded border border-white text-center\" style=\"background-color:orange;text-decoration: none;color: black;height:20vh;\">
<div class=\"container text-center d-flex align-items-center text-center\">
<h1 class=\"mx-auto fs-1\">
MULTIJOUEUR
</h1>
</div>
</a>
<a href=\"/login\" class=\"text-white m-3 container text-center d-flex align-items-center w-75 rounded border border-white text-center\" style=\"background-color:blue;text-decoration: none;color: black;height:20vh;\">
<div class=\"container text-center d-flex align-items-center text-center\">
<h1 class=\"mx-auto fs-1\">
ADMINISTRATION
</h1>
</div>
</a>
</div>
</body>
</html>";
}
public function getTemplateName()
{
return "accueil.twig";
}
public function getDebugInfo()
{
return array ( 37 => 1,);
}
public function getSourceContext()
{
return new Source("", "accueil.twig", "C:\\MAMP\\htdocs\\3.01-QCM_MuscuMaths\\Website\\templates\\accueil.twig");
}
}

@ -1,190 +0,0 @@
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* adminQuestions.twig */
class __TwigTemplate_4cf9d59cbbb9ecac16ea8baaa48dec7f67a2708ad850b44ae58cf48c33ce107d extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
echo "<!DOCTYPE html>
<html lang=\"fr\">
<head>
<title>Maths Educ</title>
<meta charset=\"UTF-8\">
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
<link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN\" crossorigin=\"anonymous\">
</script>
<style>
@font-face {
font-family: 'MenuFont';
src: url('Media/mathEducFont.ttf') format('truetype');
}
* {
font-family: 'MenuFont';
}
</style>
</head>
<body>
<div class=\"container mt-5\">
<h1>Liste des questions</h1>
<ul class=\"list-group\">
";
// line 26
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["questions"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["question"]) {
// line 27
echo " <li class=\"list-group-item d-flex ustify-content-between align-items-center\">
";
// line 28
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["question"], "content", [], "any", false, false, false, 28), "html", null, true);
echo "
<div class=\"btn-group\" role=\"group\">
<a type=\"button\" href=\"/admin/questions/updatemodal/";
// line 30
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["question"], "id", [], "any", false, false, false, 30), "html", null, true);
echo "\" class=\"btn btn-primary\">Modifier</a>
<a type=\"button\" href=\"/admin/questions/delete/";
// line 31
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["question"], "id", [], "any", false, false, false, 31), "html", null, true);
echo "\" class=\"btn btn-danger\">Supprimer</a>
</div>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['question'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 35
echo " </ul>
</div>
<div class=\"container mt-3\">
<button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#modalquestions\">Ajouter un chapitre</button>
<div class=\"btn-group\" role=\"group\">
<a href=\"/admin/administrators\" class=\"btn btn-secondary\">D</a>
<a href=\"/\" class=\"btn btn-secondary\">Retour</a>
<a href=\"/admin/questions\" class=\"btn btn-secondary\">G</a>
</div>
</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 un chapitre</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\">
";
// line 63
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["chapters"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["chapter"]) {
// line 64
echo " <option value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["chapter"], "id", [], "any", false, false, false, 64), "html", null, true);
echo "\" >";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["chapter"], "name", [], "any", false, false, false, 64), "html", null, true);
echo "</option>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['chapter'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 66
echo " </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=\"1\"> Correct
</div>
<div class=\"form-group\">
<label for=\"name\">Réponse 2 de la question :</label>
<input type=\"text\" class=\"form-control\" id=\"answer2\" name=\"answer2\">
<input type=\"radio\" name=\"correctAnswer\" value=\"2\"> Correct
</div>
<div class=\"form-group\">
<label for=\"name\">Réponse 3 de la question :</label>
<input type=\"text\" class=\"form-control\" id=\"answer3\" name=\"answer3\">
<input type=\"radio\" name=\"correctAnswer\" value=\"3\"> Correct
</div>
<div class=\"form-group\">
<label for=\"name\">Réponse 4 de la question :</label>
<input type=\"text\" class=\"form-control\" id=\"answer4\" name=\"answer4\">
<input type=\"radio\" name=\"correctAnswer\" value=\"4\"> 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>
";
}
public function getTemplateName()
{
return "adminQuestions.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 135 => 66, 124 => 64, 120 => 63, 90 => 35, 80 => 31, 76 => 30, 71 => 28, 68 => 27, 64 => 26, 37 => 1,);
}
public function getSourceContext()
{
return new Source("", "adminQuestions.twig", "C:\\MAMP\\htdocs\\3.01-QCM_MuscuMaths\\Website\\templates\\adminQuestions.twig");
}
}

@ -1,43 +0,0 @@
<?php
class ControllerAccueil
{
function __construct()
{
global $dsn, $user, $pass, $vues, $twig;
session_start();
try {
/*
$action = "";
if (isset($_REQUEST['action'])) {
$action = $_REQUEST['action'];
}
*/
echo $twig->render($vues["accueil"]);
/*
switch ($action) {
case "goToSolo":
require($vues['Solo']);
break;
case "goToMulti":
require($vues['Multi']);
break;
case "goToAdmin":
break;
default:
require($vues["Accueil"]);
break;
}
*/
} catch (PDOException $e) {
// $dataVueEreur[] = "Erreur inattendue!!! ";
// require(__DIR__.'/../vues/erreur.php');
} catch (Exception $e2) {
// $dataVueEreur[] = "Erreur inattendue!!! ";
// require ($rep.$vues['erreur']);
}
}
}

@ -2,7 +2,7 @@
class ControllerAdminAdministrators
{
private $gatewayAdministrator;
private $mdAdministrator;
private $twig;
private $vues;
@ -17,11 +17,9 @@ class ControllerAdminAdministrators
$this->twig =$twig;
$this->vues = $vues;
$con = new Connection($dns, $user, $pass);
$this->mdAdministrator = new ModelAdministrator();
$this->gatewayAdministrator = new GatewayAdministrator($con);
$administrators = $this->gatewayAdministrator->getAdministrators();
$administrators = $this->mdAdministrator->getAdministrators();
echo $twig->render($vues["adminAdministrators"], [
'administrators' => $administrators,
@ -38,7 +36,7 @@ class ControllerAdminAdministrators
}
function delete($param) {
$this->gatewayAdministrator->deleteAdministratorByID($param["id"]);
$this->mdAdministrator->deleteAdministratorByID($param["id"]);
header("Location:/admin/administrators");
}
@ -47,16 +45,19 @@ class ControllerAdminAdministrators
$username = $_POST['username'];
$password = $_POST['password'];
$Admin = new Administrator($username, $password);
$Admin = [
'username' => $username,
'password' => $password,
];
$this->gatewayAdministrator->addAdministrator($Admin);
$this->mdAdministrator->addAdministrator($Admin);
header("Location:/admin/administrators");
}
function updatemodal($param) {
$administrator = $this->gatewayAdministrator->getAdministratorByID($param["id"]);
$administrator = $this->mdAdministrator->getAdministratorByID($param["id"]);
echo $this->twig->render($this->vues["adminAdministratorsModal"], [
'administrator' => $administrator,
@ -69,9 +70,12 @@ class ControllerAdminAdministrators
$username = $_POST['username'];
$password = $_POST['password'];
$Admin = new Administrator($username, $password);
$Admin = [
'username' => $username,
'password' => $password,
];
$this->gatewayAdministrator->updateAdministrator($id,$Admin);
$this->mdAdministrator->updateAdministrator($id,$Admin);
header("Location:/admin/administrators");
}

@ -2,7 +2,7 @@
class ControllerAdminChapters
{
private $gatewayChapter;
private $mdChapter;
private $twig;
private $vues;
@ -15,12 +15,10 @@ class ControllerAdminChapters
if($_SESSION["idAdminConnected"] != null){
$this->twig =$twig;
$this->vues = $vues;
$this->mdChapter = new ModelChapter();
$con = new Connection($dns, $user, $pass);
$this->gatewayChapter = new GatewayChapter($con);
$chapters = $this->gatewayChapter->getChapters();
$chapters = $this->mdChapter->getChapters();
echo $twig->render($vues["adminChapters"], [
'chapters' => $chapters,
@ -37,7 +35,7 @@ class ControllerAdminChapters
}
function delete($param) {
$this->gatewayChapter->deleteChapter($param["id"]);
$this->mdChapter->deleteChapter($param["id"]);
header("Location:/admin/chapters");
}
@ -45,16 +43,18 @@ class ControllerAdminChapters
$name = $_POST['name'];
$Chapter = new Chapter($name);
$Chapter = [
'name' => $name,
];
$this->gatewayChapter->addChapter($Chapter);
$this->mdChapter->addChapter($Chapter);
header("Location:/admin/chapters");
}
function updatemodal($param) {
$chapter = $this->gatewayChapter->getChapterByID($param["id"]);
$chapter = $this->mdChapter->getChapterByID($param["id"]);
echo $this->twig->render($this->vues["adminChaptersModal"], [
'chapter' => $chapter,
@ -66,9 +66,11 @@ class ControllerAdminChapters
$id = $_POST['id'];
$name = $_POST['name'];
$Chapter = new Chapter($name);
$Chapter = [
'name' => $name,
];
$this->gatewayChapter->updateChapter($id,$Chapter);
$this->mdChapter->updateChapter($id,$Chapter);
header("Location:/admin/chapters");
}

@ -2,9 +2,9 @@
class ControllerAdminQuestions
{
private $gatewayQuestion;
private $gatewayChapter;
private $gatewayAnswer;
private $mdQuestion;
private $mdChapter;
private $mdAnswer;
private $twig;
private $vues;
@ -18,14 +18,12 @@ class ControllerAdminQuestions
$this->twig =$twig;
$this->vues = $vues;
$con = new Connection($dns, $user, $pass);
$this->mdQuestion = new ModelQuestion();
$this->mdAnswer = new ModelAnswer();
$this->mdChapter = new ModelChapter();
$this->gatewayQuestion = new GatewayQuestion($con);
$this->gatewayAnswer = new GatewayAnswer($con);
$this->gatewayChapter = new GatewayChapter($con);
$questions = $this->gatewayQuestion->getQuestions();
$chapters = $this->gatewayChapter->getChapters();
$questions = $this->mdQuestion->getQuestions();
$chapters = $this->mdChapter->getChapters();
echo $twig->render($vues["adminQuestions"], [
'questions' => $questions,
@ -43,7 +41,7 @@ class ControllerAdminQuestions
}
function delete($param) {
$this->gatewayQuestion->deleteQuestionByID($param["id"]);
$this->mdQuestion->deleteQuestionByID($param["id"]);
header("Location:/admin/questions");
}
@ -51,43 +49,55 @@ class ControllerAdminQuestions
$content = $_POST['content'];
$idChapter = intval($_POST['idChapter']);
$AnswersPost = array();
$AnswersPost[1] = $_POST['answer1'];
$AnswersPost[2] = $_POST['answer2'];
$AnswersPost[3] = $_POST['answer3'];
$AnswersPost[4] = $_POST['answer4'];
$AnswersPost[0] = $_POST['answer1'];
$AnswersPost[1] = $_POST['answer2'];
$AnswersPost[2] = $_POST['answer3'];
$AnswersPost[3] = $_POST['answer4'];
$correctAnswer = intval($_POST['correctAnswer']);
$Question = new Question($content,$idChapter);
$Question = [
'content' => $content,
'idchapter' => $idChapter,
'difficulty' => 1,
'nbfails' => 0,
];
$idquestion = intval($this->mdQuestion->addQuestion($Question));
$questionId = intval($this->gatewayQuestion->addQuestion($Question));
for ($i = 0; $i <= 3; $i++) {
$Answers[] = [
'content' => $AnswersPost[$i],
'idquestion' => $idquestion,
];
}
$Answers = array();
$Answer[1] = new Answer($AnswersPost[1],$questionId);
$Answer[2] = new Answer($AnswersPost[2],$questionId);
$Answer[3] = new Answer($AnswersPost[3],$questionId);
$Answer[4] = new Answer($AnswersPost[4],$questionId);
$answersId = array();
$answersId[1] = $this->gatewayAnswer->addAnswer($Answer[1]);
$answersId[2] = $this->gatewayAnswer->addAnswer($Answer[2]);
$answersId[3] = $this->gatewayAnswer->addAnswer($Answer[3]);
$answersId[4] = $this->gatewayAnswer->addAnswer($Answer[4]);
for ($i = 0; $i <= 3; $i++) {
$answersId[$i] = $this->mdAnswer->addAnswer($Answers[$i]);
}
$Question = new Question($content,$idChapter,$answersId[$correctAnswer]);
$Question = [
'content' => $content,
'idchapter' => $idChapter,
'difficulty' => 1,
'nbfails' => 0,
'idanswergood' => $answersId[$correctAnswer],
];
$this->gatewayQuestion->updateQuestion($questionId,$Question);
$this->mdQuestion->updateQuestion($idquestion,$Question);
header("Location:/admin/questions");
}
function updatemodal($param) {
$question = $this->gatewayQuestion->getQuestionByID($param["id"]);
$question = $this->mdQuestion->getQuestionByID($param["id"]);
$answers = array();
$answers = $this->gatewayAnswer->getAnswersByIDQuestions($param["id"]);
$answers = $this->mdAnswer->getAnswersByIDQuestions($param["id"]);
$chapters = $this->gatewayChapter->getChapters();
$chapters = $this->mdChapter->getChapters();
echo $this->twig->render($this->vues["adminQuestionsModal"], [
'question' => $question,
@ -105,31 +115,36 @@ class ControllerAdminQuestions
$correctAnswer = intval($_POST['correctAnswer']);
$answersId = array();
$answersId[1] = intval($_POST['IdAnswer1']);
$answersId[2] = intval($_POST['IdAnswer2']);
$answersId[3] = intval($_POST['IdAnswer3']);
$answersId[4] = intval($_POST['IdAnswer4']);
$answersId[0] = intval($_POST['IdAnswer1']);
$answersId[1] = intval($_POST['IdAnswer2']);
$answersId[2] = intval($_POST['IdAnswer3']);
$answersId[3] = intval($_POST['IdAnswer4']);
$answers = array();
$answers[1] = $_POST['answer1'];
$answers[2] = $_POST['answer2'];
$answers[3] = $_POST['answer3'];
$answers[4] = $_POST['answer4'];
$Question = new Question($content, $idChapter, $answersId[$correctAnswer]);
$this->gatewayQuestion->updateQuestion($id, $Question);
$Answer1 = new Answer($answers[1],$id);
$Answer2 = new Answer($answers[2],$id);
$Answer3 = new Answer($answers[3],$id);
$Answer4 = new Answer($answers[4],$id);
$answers[0] = $_POST['answer1'];
$answers[1] = $_POST['answer2'];
$answers[2] = $_POST['answer3'];
$answers[3] = $_POST['answer4'];
$Question = [
'content' => $content,
'idchapter' => $idChapter,
'idanswergood' => $answersId[$correctAnswer],
];
$this->mdQuestion->updateQuestion($id, $Question);
for ($i = 0; $i <= 3; $i++) {
$Answers[] = [
'content' => $answers[$i],
'id' => $id,
];
}
$this->gatewayAnswer->updateAnswer($answersId[1],$Answer1);
$this->gatewayAnswer->updateAnswer($answersId[2],$Answer2);
$this->gatewayAnswer->updateAnswer($answersId[3],$Answer3);
$this->gatewayAnswer->updateAnswer($answersId[4],$Answer4);
for ($i = 0; $i <= 3; $i++) {
$this->mdAnswer->updateAnswer($answersId[$i],$Answers[$i]);
}
header("Location:/admin/questions");
}
}
}

@ -1,48 +0,0 @@
<?php
class ControllerLoginAdmin
{
private $gatewayAdministrator;
function __construct()
{
global $dns, $user, $pass, $vues, $twig;
session_start();
try {
$con = new Connection($dns, $user, $pass);
$this->gatewayAdministrator = new GatewayAdministrator($con);
echo $twig->render($vues["loginAdmin"], [
'error' => $_SESSION["error"],
]);
$_SESSION["error"]="";
} catch (PDOException $e) {
// $dataVueEreur[] = "Erreur inattendue!!! ";
// require(__DIR__.'/../vues/erreur.php');
} catch (Exception $e2) {
// $dataVueEreur[] = "Erreur inattendue!!! ";
// require ($rep.$vues['erreur']);
}
}
function verify(){
$username = $_POST['username'];
$password = $_POST['password'];
$Administrator = new Administrator($username, $password);
$AdministratorIsOk = $this->gatewayAdministrator->verifyAdministrator($Administrator);
if($AdministratorIsOk != null) {
$_SESSION["idAdminConnected"]=$AdministratorIsOk;
header("Location:/admin/administrators");
}
else {
$_SESSION["error"]="utilisateur introuvable.";
header("Location:/login");
}
}
}

@ -1,43 +0,0 @@
<?php
class ControllerMulti
{
function __construct()
{
global $dsn, $user, $pass, $vues, $twig;
session_start();
try {
echo $twig->render($vues["multi"]);
/*
$action = "";
if (isset($_REQUEST['action'])) {
$action = $_REQUEST['action'];
}
switch ($action) {
case "goToLobby":
//require($vues['Solo']);
break;
case "CreateLobby":
//require($vues['Multi']);
break;
case "goToAcceuil":
require($vues['Accueil']);
break;
default:
require($vues['Multi']);
break;
}
*/
} catch (PDOException $e) {
// $dataVueEreur[] = "Erreur inattendue!!! ";
// require(__DIR__.'/../vues/erreur.php');
} catch (Exception $e2) {
// $dataVueEreur[] = "Erreur inattendue!!! ";
// require ($rep.$vues['erreur']);
}
}
}

@ -1,42 +0,0 @@
<?php
class ControllerSolo
{
function __construct()
{
global $dsn, $user, $pass, $vues, $twig;
session_start();
try {
echo $twig->render($vues["solo"]);
/*
$action = "";
if (isset($_REQUEST['action'])) {
$action = $_REQUEST['action'];
}
switch ($action) {
case "goToLobby":
//require($vues['Solo']);
break;
case "CreateLobby":
//require($vues['Multi']);
break;
case "goToAcceuil":
require($vues['Accueil']);
break;
default:
break;
}
*/
} catch (PDOException $e) {
// $dataVueEreur[] = "Erreur inattendue!!! ";
// require(__DIR__.'/../vues/erreur.php');
} catch (Exception $e2) {
// $dataVueEreur[] = "Erreur inattendue!!! ";
// require ($rep.$vues['erreur']);
}
}
}

@ -0,0 +1,85 @@
<?php
class ControllerUser
{
private $mdQuestion;
private $mdChapter;
private $mdAnswer;
private $mdPlayer;
private $mdLobby;
private $mdAdministrator;
private $twig;
private $vues;
function __construct()
{
global $vues, $twig;
session_start();
try {
$this->twig =$twig;
$this->vues = $vues;
$this->mdQuestion = new ModelQuestion();
$this->mdAnswer = new ModelAnswer();
$this->mdChapter = new ModelChapter();
$this->mdPlayer = new ModelPlayer();
$this->mdLobby = new ModelLobby();
$this->mdAdministrator = new ModelAdministrator();
} catch (PDOException $e) {
// $dataVueEreur[] = "Erreur inattendue!!! ";
// require(__DIR__.'/../vues/erreur.php');
} catch (Exception $e2) {
// $dataVueEreur[] = "Erreur inattendue!!! ";
// require ($rep.$vues['erreur']);
}
}
function home()
{
var_dump('tot');
echo $this->twig->render($this->vues["home"]);
}
function singleplayer()
{
echo $this->twig->render($this->vues["singleplayer"]);
}
function multiplayer()
{
echo $this->twig->render($this->vues["multiplayer"]);
}
function login()
{
echo $this->twig->render($this->vues["loginAdmin"], [
'error' => $_SESSION["error"],
]);
$_SESSION["error"]="";
}
function verifyAdmin(){
$username = $_POST['username'];
$password = $_POST['password'];
$Administrator = [
'username' => $username,
'password' => $password,
];
$AdministratorIsOk = $this->mdAdministrator->verifyAdministrator($Administrator);
var_dump($AdministratorIsOk);
if($AdministratorIsOk != null) {
$_SESSION["idAdminConnected"]=$AdministratorIsOk;
header("Location:/admin/administrators");
}
else {
$_SESSION["error"]="utilisateur introuvable.";
header("Location:/login");
}
}
}

@ -30,26 +30,18 @@ class FrontController
function __construct()
{
global $dsn, $user, $pass, $vues;
$listeAction_Acceuil = array('goToSolo', 'goToMulti', 'goToAdmin');
try {
$action = "";
if (isset($_REQUEST['action'])) {
$action = $_REQUEST['action'];
}
// Initialize AltoRouter
$router = new AltoRouter();
//$router->setBasePath('/');
// Define routes
$router->map('GET', '/', 'ControllerAccueil'); // Route pour la page d'accueil
$router->map('GET', '/solo', 'ControllerSolo');
$router->map('GET', '/multi', 'ControllerMulti');
$router->map('GET', '/admin', 'ControllerAdminAdministrators');
$router->map('GET', '/login', 'ControllerLoginAdmin');
$router->map('POST', '/login/[a:action]', 'ControllerLoginAdmin');
$router->map('GET', '/', 'ControllerUser#home'); // Route pour la page d'accueil
$router->map('GET', '/[a:action]', 'ControllerUser');
//$router->map('GET', '/admin', 'ControllerAdminAdministrators');
$router->map('POST', '/login/[a:action]', 'ControllerUser');
$router->map('GET', '/admin/chapters', 'ControllerAdminChapters');
$router->map('POST', '/admin/chapters/[a:action]', 'ControllerAdminChapters');
$router->map('GET', '/admin/chapters/[a:action]/[i:id]', 'ControllerAdminChapters');
@ -71,12 +63,15 @@ class FrontController
if ($match) {
$controller = $match['target'];
$action=$match['params']['action'];
$id=$match['params']['id'];
if (strpos($controller, "#") !== false) {
list($controller,$action)=explode("#",$controller);
}
else {
$action=$match['params']['action'];
$id=$match['params']['id'];
}
$controller = new $controller;
if (is_callable(array($controller, $action))) {
if (is_callable(array($controller, $action))) {
call_user_func_array(array($controller, $action), array($match['params']));
}
}

@ -4,9 +4,10 @@ class GatewayAdministrator
{
private $con;
public function __construct($con)
public function __construct()
{
$this->con = $con;
global $dns, $user, $pass;
$this->con = new Connection($dns, $user, $pass);
}
public function addAdministrator($administrator)
@ -15,8 +16,8 @@ class GatewayAdministrator
$this->con->executeQuery(
$query,
array(
':username' => array($administrator->getUsername(), PDO::PARAM_STR),
':password' => array($administrator->getHashedPassword(), PDO::PARAM_STR)
':username' => array($administrator['username'], PDO::PARAM_STR),
':password' => array(md5($administrator['password']), PDO::PARAM_STR)
)
);
}
@ -57,8 +58,8 @@ class GatewayAdministrator
$query,
array(
':id' => array($id, PDO::PARAM_INT),
':username' => array($administrator->getUsername(), PDO::PARAM_STR),
':password' => array($administrator->getHashedPassword(), PDO::PARAM_STR)
':username' => array($administrator['username'], PDO::PARAM_STR),
':password' => array(md5($administrator['password']), PDO::PARAM_STR)
)
);
}
@ -75,8 +76,8 @@ class GatewayAdministrator
$this->con->executeQuery(
$query,
array(
':username' => array($administrator->getUsername(), PDO::PARAM_STR),
':password' => array($administrator->getHashedPassword(), PDO::PARAM_STR)
':username' => array($administrator['username'], PDO::PARAM_STR),
':password' => array(md5($administrator['password']), PDO::PARAM_STR)
)
);
$results = $this->con->getResults();

@ -4,9 +4,10 @@ class GatewayAnswer
{
private $con;
public function __construct($con)
public function __construct()
{
$this->con = $con;
global $dns, $user, $pass;
$this->con = new Connection($dns, $user, $pass);
}
public function addAnswer($answer)
@ -15,8 +16,8 @@ class GatewayAnswer
$this->con->executeQuery(
$query,
array(
':content' => array($answer->getContent(), PDO::PARAM_STR),
':idquestion' => array($answer->getIdQuestion(), PDO::PARAM_INT),
':content' => array($answer['content'], PDO::PARAM_STR),
':idquestion' => array($answer['idquestion'], PDO::PARAM_INT),
)
);
$answerId = $this->con->lastInsertId();
@ -44,7 +45,7 @@ class GatewayAnswer
$query,
array(
':id' => array($id, PDO::PARAM_INT),
':content' => array($answer->getContent(), PDO::PARAM_STR)
':content' => array($answer['content'], PDO::PARAM_STR)
)
);
}

@ -4,9 +4,10 @@ class GatewayChapter
{
private $con;
public function __construct($con)
public function __construct()
{
$this->con = $con;
global $dns, $user, $pass;
$this->con = new Connection($dns, $user, $pass);
}
public function addChapter($chapter)
@ -15,7 +16,7 @@ class GatewayChapter
$this->con->executeQuery(
$query,
array(
':name' => array($chapter->getName(), PDO::PARAM_STR)
':name' => array($chapter['name'], PDO::PARAM_STR)
)
);
}
@ -45,7 +46,7 @@ class GatewayChapter
$query,
array(
':id' => array($id, PDO::PARAM_INT),
':name' => array($chapter->getName(), PDO::PARAM_STR)
':name' => array($chapter['name'], PDO::PARAM_STR)
)
);
}

@ -4,14 +4,15 @@ class GatewayLobby
{
private $con;
public function __construct($con)
public function __construct()
{
$this->con = $con;
global $dns, $user, $pass;
$this->con = new Connection($dns, $user, $pass);
}
public function addLobby($lobby)
{
$query = "insert into Lobby(id,name,password,nbPlayer) values (:id,:name,:password,:nbPlayer);";
$query = "insert into Lobbies(id,name,password,nbPlayer) values (:id,:name,:password,:nbPlayer);";
$this->con->executeQuery(
$query,
array(
@ -25,7 +26,7 @@ class GatewayLobby
public function getLobbys()
{
$query = "SELECT * FROM Lobby;";
$query = "SELECT * FROM Lobbies;";
$this->con->executeQuery($query);
$results = $this->con->getResults();
if ($results == NULL) {
@ -40,7 +41,7 @@ class GatewayLobby
public function getLobbyByName($name)
{
$query = "SELECT * FROM Lobby WHERE name = :name;";
$query = "SELECT * FROM Lobbies WHERE name = :name;";
$this->con->executeQuery($query, array(':name' => array($name, PDO::PARAM_STR)));
$results = $this->con->getResults();
if ($results == NULL) {
@ -52,7 +53,7 @@ class GatewayLobby
public function deleteLobby($id)
{
$query = "DELETE FROM Lobby WHERE id = :id;";
$query = "DELETE FROM Lobbies WHERE id = :id;";
$this->con->executeQuery($query, array(':id' => array($id, PDO::PARAM_INT)));
}

@ -4,9 +4,10 @@ class GatewayPlayer
{
private $con;
public function __construct($con)
public function __construct()
{
$this->con = $con;
global $dns, $user, $pass;
$this->con = new Connection($dns, $user, $pass);
}
public function addPlayer($player)
@ -16,8 +17,8 @@ class GatewayPlayer
$query,
array(
':id' => array($player->getId(), PDO::PARAM_INT),
':nickname' => array($player->getNickname(), PDO::PARAM_STR),
':hashedPassword' => array($player->getHashedPassword(), PDO::PARAM_STR)
':nickname' => array($player['nickname'], PDO::PARAM_STR),
':hashedPassword' => array($player['hashedPassword'], PDO::PARAM_STR)
)
);
}
@ -60,8 +61,8 @@ class GatewayPlayer
$query,
array(
':id' => array($player->getId(), PDO::PARAM_INT),
':nickname' => array($player->getNickname(), PDO::PARAM_STR),
':hashedPassword' => array($player->getHashedPassword(), PDO::PARAM_STR)
':nickname' => array($player['nickname'], PDO::PARAM_STR),
':hashedPassword' => array($player['hashedPassword'], PDO::PARAM_STR)
)
);
}
@ -83,8 +84,8 @@ class GatewayPlayer
$this->con->executeQuery(
$query,
array(
':nickname' => array($player->getUsername(), PDO::PARAM_STR),
':password' => array($player->getHashedPassword(), PDO::PARAM_STR)
':nickname' => array($player['nickname'], PDO::PARAM_STR),
':password' => array($player['password'], PDO::PARAM_STR)
)
);
$results = $this->con->getResults();

@ -4,21 +4,23 @@ class GatewayQuestion
{
private $con;
public function __construct($con)
public function __construct()
{
$this->con = $con;
global $dns, $user, $pass;
$this->con = new Connection($dns, $user, $pass);
}
public function addQuestion($question)
{
var_dump($question);
$query = "insert into questions(content,idchapter,difficulty,nbfails) values (:content,:idchapter,:difficulty,:nbfails);";
$this->con->executeQuery(
$query,
array(
':content' => array($question->getContent(), PDO::PARAM_STR),
':idchapter' => array($question->getIdChapter(), PDO::PARAM_INT),
':difficulty' => array($question->getDifficulty(), PDO::PARAM_INT),
':nbfails' => array($question->getNbFails(), PDO::PARAM_INT)
':content' => array($question['content'], PDO::PARAM_STR),
':idchapter' => array($question['idchapter'], PDO::PARAM_INT),
':difficulty' => array(intval($question['difficulty']), PDO::PARAM_INT),
':nbfails' => array(intval($question['nbfails']), PDO::PARAM_INT)
)
);
$questionId = $this->con->lastInsertId();
@ -45,15 +47,13 @@ class GatewayQuestion
public function updateQuestion($id,$question)
{
$query = "UPDATE questions SET content = :content, idchapter = :idchapter, idanswergood = :idanswergood, difficulty = :difficulty, nbfails = :nbfails WHERE id = :id;";
$query = "UPDATE questions SET content = :content, idchapter = :idchapter, idanswergood = :idanswergood WHERE id = :id;";
$this->con->executeQuery(
$query,
array(
':content' => array($question->getContent(), PDO::PARAM_STR),
':idchapter' => array($question->getIdChapter(), PDO::PARAM_INT),
':idanswergood' => array($question->getIdAnswerGood(), PDO::PARAM_INT),
':difficulty' => array($question->getDifficulty(), PDO::PARAM_INT),
':nbfails' => array($question->getNbFails(), PDO::PARAM_INT),
':content' => array($question['content'], PDO::PARAM_STR),
':idchapter' => array($question['idchapter'], PDO::PARAM_INT),
':idanswergood' => array($question['idanswergood'], PDO::PARAM_INT),
':id' => array($id, PDO::PARAM_INT),
)
);

@ -13,8 +13,7 @@ Autoload::charger();
//twig
$loader = new \Twig\Loader\FilesystemLoader('templates');
$twig = new \Twig\Environment($loader, [
'cache' => 'cache',
'auto_reload' => true,
'cache' => false,
]);
$controller = new FrontController();

@ -0,0 +1,44 @@
<?php
class ModelAdministrator
{
private $gwAdministrator;
public function __construct()
{
$this->gwAdministrator = new GatewayAdministrator();
}
public function addAdministrator($administrator)
{
$this->gwAdministrator->addAdministrator($administrator);
}
public function getAdministratorByID($id)
{
$administrator = $this->gwAdministrator->getAdministratorByID($id);
return $administrator;
}
public function getAdministrators()
{
$administrators = $this->gwAdministrator->getAdministrators();
return $administrators;
}
public function updateAdministrator($id,$administrator)
{
$this->gwAdministrator->updateAdministrator($id,$administrator);
}
public function deleteAdministratorByID($id)
{
$this->gwAdministrator->deleteAdministratorByID($id);
}
public function verifyAdministrator($Administrator)
{
$administratorsId = $this->gwAdministrator->verifyAdministrator($Administrator);
return $administratorsId;
}
}

@ -0,0 +1,28 @@
<?php
class ModelAnswer
{
private $gwAnswer;
public function __construct()
{
$this->gwAnswer = new GatewayAnswer();
}
function addAnswer($answer)
{
$answersId = $this->gwAnswer->addAnswer($answer);
return $answersId;
}
function getAnswersByIDQuestions($id)
{
$answers = $this->gwAnswer->getAnswersByIDQuestions($id);
return $answers;
}
function updateAnswer($answersId,$answer)
{
$this->gwAnswer->updateAnswer($answersId,$answer);
}
}

@ -0,0 +1,38 @@
<?php
class ModelChapter
{
private $gwChapter;
public function __construct()
{
$this->gwChapter = new GatewayChapter();
}
function getChapters()
{
$chapters = $this->gwChapter->getChapters();
return $chapters;
}
function deleteChapter($id)
{
$this->gwChapter->deleteChapter($id);
}
function addChapter($chapter)
{
$this->gwChapter->addChapter($chapter);
}
function getChapterByID($id)
{
$chapter = $this->gwChapter->getChapterByID($id);
return $chapter;
}
function updateChapter($id,$Chapter)
{
$this->gwChapter->updateChapter($id,$Chapter);
}
}

@ -0,0 +1,22 @@
<?php
class ModelLobby
{
private $gwLobby;
public function __construct()
{
$this->gwLobby = new GatewayLobby();
}
public function addLobby($lobby)
{
$this->gwLobby->addLobby($lobby);
}
public function getlobbies()
{
$lobbies = $this->gwLobby->getlobbies();
return $lobbies;
}
}

@ -0,0 +1,32 @@
<?php
class ModelPlayer
{
private $gwPlayer;
public function __construct()
{
$this->gwPlayer = new GatewayPlayer();
}
public function addPlayer($player)
{
$this->gwPlayer->addPlayer($player);
}
public function getPlayerByID($id)
{
$player = $this->gwPlayer->getPlayerByID($id);
return $player;
}
public function updatePlayer($id,$player)
{
$this->gwPlayer->updatePlayer($id,$player);
}
public function deletePlayerByID($id)
{
$this->gwPlayer->deletePlayerByID($id);
}
}

@ -0,0 +1,39 @@
<?php
class ModelQuestion
{
private $gwQuestion;
public function __construct()
{
$this->gwQuestion = new GatewayQuestion();
}
function getQuestions()
{
$questions = $this->gwQuestion->getQuestions();
return $questions;
}
function deleteQuestionByID($id)
{
$this->gwQuestion->deleteQuestionByID($id);
}
function addQuestion($Question)
{
$questionId = $this->gwQuestion->addQuestion($Question);
return $questionId;
}
function getQuestionByID($id) {
$question = $this->gwQuestion->getQuestionByID($id);
return $question;
}
function updateQuestion($id, $Question)
{
$this->gwQuestion->updateQuestion($id, $Question);
}
}

@ -27,9 +27,9 @@
<div class="container mt-3">
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modalAdministrators">Ajouter un administrateur</button>
<div class="btn-group" role="group">
<a href="/admin/questions" class="btn btn-secondary">D</a>
<a href="/admin/questions" class="btn btn-secondary"> ← Questions </a>
<a href="/" class="btn btn-secondary">Retour</a>
<a href="/admin/chapters" class="btn btn-secondary">G</a>
<a href="/admin/chapters" class="btn btn-secondary">Chapitres →</a>
</div>
</div>

@ -27,9 +27,9 @@
<div class="container mt-3">
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modalchapters">Ajouter un chapitre</button>
<div class="btn-group" role="group">
<a href="/admin/administrators" class="btn btn-secondary">D</a>
<a href="/admin/administrators" class="btn btn-secondary"> ← Administrateur</a>
<a href="/" class="btn btn-secondary">Retour</a>
<a href="/admin/questions" class="btn btn-secondary">G</a>
<a href="/admin/questions" class="btn btn-secondary">Questions →</a>
</div>
</div>

@ -27,9 +27,9 @@
<div class="container mt-3">
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modalquestions">Ajouter un chapitre</button>
<div class="btn-group" role="group">
<a href="/admin/administrators" class="btn btn-secondary">D</a>
<a href="/admin/chapters" class="btn btn-secondary"> ← Chapitres</a>
<a href="/" class="btn btn-secondary">Retour</a>
<a href="/admin/questions" class="btn btn-secondary">G</a>
<a href="/admin/administrators" class="btn btn-secondary">Administrateurs →</a>
</div>
</div>
@ -39,7 +39,7 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Ajouter un chapitre</h5>
<h5 class="modal-title" id="exampleModalLabel">Ajouter une question</h5>
</div>
<form method="POST" action="/admin/questions/add">
<div class="modal-body">
@ -58,22 +58,22 @@
<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="1"> Correct
<input type="radio" name="correctAnswer" checked="checked" value="0"> Correct
</div>
<div class="form-group">
<label for="name">Réponse 2 de la question :</label>
<input type="text" class="form-control" id="answer2" name="answer2">
<input type="radio" name="correctAnswer" value="2"> Correct
<input type="radio" name="correctAnswer" value="1"> Correct
</div>
<div class="form-group">
<label for="name">Réponse 3 de la question :</label>
<input type="text" class="form-control" id="answer3" name="answer3">
<input type="radio" name="correctAnswer" value="3"> Correct
<input type="radio" name="correctAnswer" value="2"> Correct
</div>
<div class="form-group">
<label for="name">Réponse 4 de la question :</label>
<input type="text" class="form-control" id="answer4" name="answer4">
<input type="radio" name="correctAnswer" value="4"> Correct
<input type="radio" name="correctAnswer" value="3"> Correct
</div>
</div>
<div class="modal-footer">

@ -14,7 +14,7 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Ajouter un chapitre</h5>
<h5 class="modal-title" id="exampleModalLabel">Modifier une Question</h5>
</div>
<form method="POST" action="/admin/questions/update">
<div class="modal-body">
@ -37,25 +37,25 @@
<label for="name">Réponse 1 de la question :</label>
<input type="hidden" class="form-control" id="updateIdAnswer1" name="IdAnswer1">
<input type="text" class="form-control" id="updateAnswer1" name="answer1">
<input type="radio" name="correctAnswer" {% if question.idanswergood == answers[0].id %}checked="checked"{% endif %} value="1"> Correct
<input type="radio" name="correctAnswer" {% if question.idanswergood == answers[0].id %}checked="checked"{% endif %} value="0"> Correct
</div>
<div class="form-group">
<label for="name">Réponse 2 de la question :</label>
<input type="hidden" class="form-control" id="updateIdAnswer2" name="IdAnswer2">
<input type="text" class="form-control" id="updateAnswer2" name="answer2">
<input type="radio" name="correctAnswer" {% if question.idanswergood == answers[1].id %}checked="checked"{% endif %} value="2"> Correct
<input type="radio" name="correctAnswer" {% if question.idanswergood == answers[1].id %}checked="checked"{% endif %} value="1"> Correct
</div>
<div class="form-group">
<label for="name">Réponse 3 de la question :</label>
<input type="hidden" class="form-control" id="updateIdAnswer3" name="IdAnswer3">
<input type="text" class="form-control" id="updateAnswer3" name="answer3">
<input type="radio" name="correctAnswer" {% if question.idanswergood == answers[2].id %}checked="checked"{% endif %} value="3"> Correct
<input type="radio" name="correctAnswer" {% if question.idanswergood == answers[2].id %}checked="checked"{% endif %} value="2"> Correct
</div>
<div class="form-group">
<label for="name">Réponse 4 de la question :</label>
<input type="hidden" class="form-control" id="updateIdAnswer4" name="IdAnswer4">
<input type="text" class="form-control" id="updateAnswer4" name="answer4">
<input type="radio" name="correctAnswer" {% if question.idanswergood == answers[3].id %}checked="checked"{% endif %} value="4"> Correct
<input type="radio" name="correctAnswer" {% if question.idanswergood == answers[3].id %}checked="checked"{% endif %} value="3"> Correct
</div>
</div>
<div class="modal-footer">

@ -12,14 +12,14 @@
<body id="bodyStyle">
<div class="d-flex flex-column align-items-center justify-content-between" style="height:95vh">
<img src="Media/Logo.png" style="margin-top:50px; object-fit:fill;" class="h-25">
<a href="/solo" class="text-white m-3 container text-center d-flex align-items-center w-75 rounded border border-white text-center" style="background-color:green;text-decoration: none;color: black; height:20vh;">
<a href="/singleplayer" class="text-white m-3 container text-center d-flex align-items-center w-75 rounded border border-white text-center" style="background-color:green;text-decoration: none;color: black; height:20vh;">
<div class="container text-center d-flex align-items-center text-center">
<h1 class="mx-auto fs-1">
SOLO
</h1>
</div>
</a>
<a href="/multi" class="text-white m-3 container text-center d-flex align-items-center w-75 rounded border border-white text-center" style="background-color:orange;text-decoration: none;color: black;height:20vh;">
<a href="/multiplayer" class="text-white m-3 container text-center d-flex align-items-center w-75 rounded border border-white text-center" style="background-color:orange;text-decoration: none;color: black;height:20vh;">
<div class="container text-center d-flex align-items-center text-center">
<h1 class="mx-auto fs-1">
MULTIJOUEUR

@ -13,7 +13,7 @@
<div class="card">
<div class="card-body">
<h2 class="card-title">Connexion</h2>
<form action="/login/verify" method="post">
<form action="/login/verifyAdmin" method="post">
<div class="mb-3">
<label for="username" class="form-label">Nom d'utilisateur</label>
<input type="text" class="form-control" id="username" name="username" required>

@ -8,9 +8,9 @@ $pass = 'educ3306*';
$dns = "mysql:host=b62383e.online-server.cloud:3306;dbname=mathseduc";
//Vues
$vues["solo"]="solo.twig";
$vues["multi"]="multijoueur.twig";
$vues["accueil"]="accueil.twig";
$vues["singleplayer"]="singleplayer.twig";
$vues["multiplayer"]="multiplayer.twig";
$vues["home"]="home.twig";
$vues["connexion"]="connexion.twig";
$vues["choixSolo"]="choixThemeSolo.twig";
$vues["loginAdmin"]="loginAdmin.twig";

Loading…
Cancel
Save