feat: backoffice fonctionnel (chapter,question/answer/administrator) + 'sécurité accés avec login'
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
1e4a7b8c94
commit
6603c3c806
@ -0,0 +1,136 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,148 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,145 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,250 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,152 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
@ -0,0 +1,190 @@
|
||||
<?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 +1,75 @@
|
||||
<?php
|
||||
|
||||
class ControllerAdminChapteurs
|
||||
class ControllerAdminChapters
|
||||
{
|
||||
private $gatewayChapter;
|
||||
|
||||
private $twig;
|
||||
private $vues;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
global $dsn, $user, $pass, $vues, $twig;
|
||||
session_start();
|
||||
try {
|
||||
/*
|
||||
$action = "";
|
||||
if (isset($_REQUEST['action'])) {
|
||||
$action = $_REQUEST['action'];
|
||||
}
|
||||
*/
|
||||
|
||||
echo $twig->render($vues["adminChapters"]);
|
||||
|
||||
/*
|
||||
switch ($action) {
|
||||
case "goToSolo":
|
||||
require($vues['Solo']);
|
||||
break;
|
||||
case "goToMulti":
|
||||
require($vues['Multi']);
|
||||
break;
|
||||
case "goToAdmin":
|
||||
break;
|
||||
default:
|
||||
require($vues["Accueil"]);
|
||||
break;
|
||||
global $dns, $user, $pass, $vues, $twig;
|
||||
session_start();
|
||||
try {
|
||||
if($_SESSION["idAdminConnected"] != null){
|
||||
$this->twig =$twig;
|
||||
$this->vues = $vues;
|
||||
|
||||
$con = new Connection($dns, $user, $pass);
|
||||
|
||||
$this->gatewayChapter = new GatewayChapter($con);
|
||||
|
||||
$chapters = $this->gatewayChapter->getChapters();
|
||||
|
||||
echo $twig->render($vues["adminChapters"], [
|
||||
'chapters' => $chapters,
|
||||
]);
|
||||
}
|
||||
else {
|
||||
header("Location:/login");
|
||||
}
|
||||
} catch (PDOException $e) {
|
||||
// Gérez les erreurs PDO ici
|
||||
} catch (Exception $e2) {
|
||||
// Gérez d'autres erreurs ici
|
||||
}
|
||||
*/
|
||||
} catch (PDOException $e) {
|
||||
// $dataVueEreur[] = "Erreur inattendue!!! ";
|
||||
// require(__DIR__.'/../vues/erreur.php');
|
||||
} catch (Exception $e2) {
|
||||
// $dataVueEreur[] = "Erreur inattendue!!! ";
|
||||
// require ($rep.$vues['erreur']);
|
||||
}
|
||||
}
|
||||
|
||||
function delete($param) {
|
||||
$this->gatewayChapter->deleteChapter($param["id"]);
|
||||
header("Location:/admin/chapters");
|
||||
}
|
||||
|
||||
function add($param) {
|
||||
|
||||
$name = $_POST['name'];
|
||||
|
||||
$Chapter = new Chapter($name);
|
||||
|
||||
$this->gatewayChapter->addChapter($Chapter);
|
||||
|
||||
header("Location:/admin/chapters");
|
||||
}
|
||||
|
||||
function updatemodal($param) {
|
||||
|
||||
$chapter = $this->gatewayChapter->getChapterByID($param["id"]);
|
||||
|
||||
echo $this->twig->render($this->vues["adminChaptersModal"], [
|
||||
'chapter' => $chapter,
|
||||
]);
|
||||
}
|
||||
|
||||
function update($param) {
|
||||
|
||||
$id = $_POST['id'];
|
||||
$name = $_POST['name'];
|
||||
|
||||
$Chapter = new Chapter($name);
|
||||
|
||||
$this->gatewayChapter->updateChapter($id,$Chapter);
|
||||
|
||||
header("Location:/admin/chapters");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,135 @@
|
||||
<?php
|
||||
|
||||
class ControllerAdminQuestions
|
||||
{
|
||||
private $gatewayQuestion;
|
||||
private $gatewayChapter;
|
||||
private $gatewayAnswer;
|
||||
|
||||
private $twig;
|
||||
private $vues;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
global $dns, $user, $pass, $vues, $twig;
|
||||
session_start();
|
||||
try {
|
||||
if($_SESSION["idAdminConnected"] != null){
|
||||
$this->twig =$twig;
|
||||
$this->vues = $vues;
|
||||
|
||||
$con = new Connection($dns, $user, $pass);
|
||||
|
||||
$this->gatewayQuestion = new GatewayQuestion($con);
|
||||
$this->gatewayAnswer = new GatewayAnswer($con);
|
||||
$this->gatewayChapter = new GatewayChapter($con);
|
||||
|
||||
$questions = $this->gatewayQuestion->getQuestions();
|
||||
$chapters = $this->gatewayChapter->getChapters();
|
||||
|
||||
echo $twig->render($vues["adminQuestions"], [
|
||||
'questions' => $questions,
|
||||
'chapters' => $chapters,
|
||||
]);
|
||||
}
|
||||
else {
|
||||
header("Location:/login");
|
||||
}
|
||||
} catch (PDOException $e) {
|
||||
// Gérez les erreurs PDO ici
|
||||
} catch (Exception $e2) {
|
||||
// Gérez d'autres erreurs ici
|
||||
}
|
||||
}
|
||||
|
||||
function delete($param) {
|
||||
$this->gatewayQuestion->deleteQuestionByID($param["id"]);
|
||||
header("Location:/admin/questions");
|
||||
}
|
||||
|
||||
function add($param) {
|
||||
$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'];
|
||||
$correctAnswer = intval($_POST['correctAnswer']);
|
||||
|
||||
$Question = new Question($content,$idChapter);
|
||||
|
||||
$questionId = intval($this->gatewayQuestion->addQuestion($Question));
|
||||
|
||||
$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]);
|
||||
|
||||
$Question = new Question($content,$idChapter,$answersId[$correctAnswer]);
|
||||
|
||||
$this->gatewayQuestion->updateQuestion($questionId,$Question);
|
||||
|
||||
header("Location:/admin/questions");
|
||||
}
|
||||
|
||||
function updatemodal($param) {
|
||||
|
||||
$question = $this->gatewayQuestion->getQuestionByID($param["id"]);
|
||||
|
||||
$answers = array();
|
||||
$answers = $this->gatewayAnswer->getAnswersByIDQuestions($param["id"]);
|
||||
|
||||
$chapters = $this->gatewayChapter->getChapters();
|
||||
|
||||
echo $this->twig->render($this->vues["adminQuestionsModal"], [
|
||||
'question' => $question,
|
||||
'chapters' => $chapters,
|
||||
'answers' => $answers,
|
||||
]);
|
||||
}
|
||||
|
||||
function update($param) {
|
||||
|
||||
$id = $_POST['id'];
|
||||
$content = $_POST['content'];
|
||||
$idChapter = intval($_POST['idChapter']);
|
||||
|
||||
$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']);
|
||||
|
||||
$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);
|
||||
|
||||
$this->gatewayAnswer->updateAnswer($answersId[1],$Answer1);
|
||||
$this->gatewayAnswer->updateAnswer($answersId[2],$Answer2);
|
||||
$this->gatewayAnswer->updateAnswer($answersId[3],$Answer3);
|
||||
$this->gatewayAnswer->updateAnswer($answersId[4],$Answer4);
|
||||
|
||||
header("Location:/admin/questions");
|
||||
}
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
<?php
|
||||
|
||||
class ControllerAdminUsers
|
||||
{
|
||||
|
||||
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,72 +0,0 @@
|
||||
<?php
|
||||
|
||||
class ControllerAdministrator
|
||||
{
|
||||
|
||||
//classe exemple !!!!
|
||||
function __construct()
|
||||
{
|
||||
global $dsn, $user, $pass, $vues;
|
||||
session_start();
|
||||
try {
|
||||
$action = "";
|
||||
if (isset($_REQUEST['action'])) {
|
||||
$action = $_REQUEST['action'];
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
case "goToAdministratorConnexion":
|
||||
require($vues['AdministratorConnexion']);
|
||||
break;
|
||||
case "goToAdministration":
|
||||
require($vues['Administration']);
|
||||
break;
|
||||
case "verifValidation":
|
||||
$this->validationConnexion();
|
||||
break;
|
||||
case "quitterAdministrator":
|
||||
$Administrator->deconnexion();
|
||||
header("location: index.php");
|
||||
break;
|
||||
case "AjouterQuestion":
|
||||
case "SupprimerQuestion":
|
||||
case "ModifierQuestion":
|
||||
case "AjouterReponse":
|
||||
case "SupprimerReponse":
|
||||
case "ModifierReponse":
|
||||
case "AjouterAdmin":
|
||||
case "SupprimerAdmin":
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} catch (PDOException $e) {
|
||||
// $dataVueEreur[] = "Erreur inattendue!!! ";
|
||||
// require(__DIR__.'/../vues/erreur.php');
|
||||
} catch (Exception $e2) {
|
||||
// $dataVueEreur[] = "Erreur inattendue!!! ";
|
||||
// require ($rep.$vues['erreur']);
|
||||
}
|
||||
}
|
||||
|
||||
function validationConnexion()
|
||||
{
|
||||
global $vues;
|
||||
$validation = new Validation();
|
||||
$error = [];
|
||||
$validation->val_form($_POST['name'], $_POST['password'], $error);
|
||||
foreach ($error as $key) {
|
||||
print($key);
|
||||
}
|
||||
|
||||
if (empty($error)) {
|
||||
$validation = $Administrator->connection($_POST['name'], $_POST['password']);
|
||||
if (!empty($validation)) {
|
||||
header("location: index.php?action=goToAdministratoristration");
|
||||
} else {
|
||||
header("location: index.php?action=goToAdministratorConnexion");
|
||||
}
|
||||
} else {
|
||||
header("location: index.php?action=goToAdministratorConnexion");
|
||||
}
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
// Example starter JavaScript for disabling form submissions if there are invalid fields
|
||||
(() => {
|
||||
'use strict'
|
||||
|
||||
// Fetch all the forms we want to apply custom Bootstrap validation styles to
|
||||
const forms = document.querySelectorAll('.needs-validation')
|
||||
|
||||
// Loop over them and prevent submission
|
||||
Array.from(forms).forEach(form => {
|
||||
form.addEventListener('submit', event => {
|
||||
if (!form.checkValidity()) {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
}
|
||||
form.classList.add('was-validated')
|
||||
}, false)
|
||||
})
|
||||
|
||||
})()
|
||||
|
||||
|
@ -0,0 +1,74 @@
|
||||
<!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 ({{ administrator.id }} != 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 = "{{ administrator.id }}";
|
||||
username.value = "{{ administrator.username }}";
|
||||
password.value = "{{ administrator.password }}";
|
||||
|
||||
modal.show();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,70 @@
|
||||
<!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">
|
||||
{% for chapter in chapters %}
|
||||
<li class="list-group-item d-flex ustify-content-between align-items-center">
|
||||
{{ chapter.name }}
|
||||
<div class="btn-group" role="group">
|
||||
<a type="button" href="/admin/chapters/updatemodal/{{ chapter.id }}" class="btn btn-primary">Modifier</a>
|
||||
<a type="button" href="/admin/chapters/delete/{{ chapter.id }}" class="btn btn-danger">Supprimer</a>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</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>
|
@ -0,0 +1,68 @@
|
||||
<!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 ({{ chapter.id }} != 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 = "{{ chapter.id }}";
|
||||
name.value = "{{ chapter.name }}";
|
||||
|
||||
modal.show();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,98 @@
|
||||
<!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">
|
||||
{% for question in questions %}
|
||||
<li class="list-group-item d-flex ustify-content-between align-items-center">
|
||||
{{ question.content }}
|
||||
<div class="btn-group" role="group">
|
||||
<a type="button" href="/admin/questions/updatemodal/{{ question.id }}" class="btn btn-primary">Modifier</a>
|
||||
<a type="button" href="/admin/questions/delete/{{ question.id }}" class="btn btn-danger">Supprimer</a>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</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">
|
||||
{% for chapter in chapters %}
|
||||
<option value="{{chapter.id}}" >{{chapter.name}}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name">Réponse 1 de la question :</label>
|
||||
<input type="text" class="form-control" id="answer1" name="answer1">
|
||||
<input type="radio" name="correctAnswer" checked="checked" value="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>
|
@ -0,0 +1,120 @@
|
||||
<!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">
|
||||
{% for chapter in chapters %}
|
||||
<option value="{{ chapter.id }}" {% if chapter.id == question.idchapter %}selected="selected"{% endif %}>{{ chapter.name }}</option>
|
||||
{% endfor %}
|
||||
</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" {% if question.idanswergood == answers[0].id %}checked="checked"{% endif %} 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" {% if question.idanswergood == answers[1].id %}checked="checked"{% endif %} 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" {% if question.idanswergood == answers[2].id %}checked="checked"{% endif %} 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" {% if question.idanswergood == answers[3].id %}checked="checked"{% endif %} 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 ({{ question.id }} != 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 = "{{ question.id }}";
|
||||
content.value = "{{ question.content }}";
|
||||
|
||||
IdAnswer1.value = "{{ answers[0].id }}";
|
||||
IdAnswer2.value = "{{ answers[1].id }}";
|
||||
IdAnswer3.value = "{{ answers[2].id }}";
|
||||
IdAnswer4.value = "{{ answers[3].id }}";
|
||||
|
||||
answer1.value = "{{ answers[0].content }}";
|
||||
answer2.value = "{{ answers[1].content }}";
|
||||
answer3.value = "{{ answers[2].content }}";
|
||||
answer4.value = "{{ answers[3].content }}";
|
||||
|
||||
modal.show();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,99 +0,0 @@
|
||||
<!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">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
<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 class="row g-5 pt-5 justify-content-center">
|
||||
<div class="col-4 pt-5">
|
||||
<button class="text-white fs-2 container text-center rounded border border-white btn btn-lg" style="background-color:red;text-decoration: none;color: black;">
|
||||
annuler
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-4 pt-5">
|
||||
<button class="text-white fs-2 container text-center rounded border border-white btn btn-lg" style="background-color:green;text-decoration: none;color: black;" data-bs-toggle="modal" data-bs-target="#staticBackdrop">
|
||||
Valider
|
||||
<?php /* Query to bd d'une question aléatoire */ ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="d-flex justify-content-center fs-3" style="height:10vh;">
|
||||
<button style="width:25vw;background-color:red;color: white;">annuler</button>
|
||||
|
||||
<button style="width:25vw;background-color:green;color: white;" data-bs-toggle="modal" data-bs-target="#staticBackdrop">Valider</button>
|
||||
</div> -->
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="staticBackdropLabel">Question ajoutée</h1>
|
||||
<!-- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> -->
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Voulez vous ajouter une autre question ?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Non</button>
|
||||
<button type="button" class="btn btn-success">Oui</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
Loading…
Reference in new issue