feat : model + controller + gateway fix
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
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\">×</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']);
|
||||
}
|
||||
}
|
||||
}
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue