feat : change in git ignore

pull/37/head
Jade VAN BRABANDT 1 year ago
parent 96ab357679
commit 1a951d96ce

2
.gitignore vendored

@ -820,4 +820,4 @@ replay_pid*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
# config ignore to not stock password on the git (:
/Website/usages/Config.php
/Website/usages/Config_DB.php

@ -135,7 +135,6 @@ class ControllerUser
'numQuestion' => $numQuestion,
'answerss' => $_SESSION["Answers"],
]);
} else {
$answerContent = $_SESSION["Answers"][$numQuestion][$answerNumber]->getContent();
$_SESSION["playerAnswersContent"][$numQuestion] = $answerContent;
@ -158,22 +157,21 @@ class ControllerUser
$Final[]["Question"] = array();
$Final[]["goodAnswer"] = array();
$Final[]["PlayerAnswer"] = array();
$c=0;
$c = 0;
foreach ($_SESSION["Questions"] as &$question) {
$answer = $this->mdAnswer->getAnswerByID($question->getIdAnswerGood());
$Final[$c]["goodAnswer"] = $answer->getContent();
$c=$c+1;
$c = $c + 1;
}
$c=0;
$c = 0;
foreach ($_SESSION["Questions"] as $question) {
$Final[$c]["Question"] = $question->getContent();
$c=$c+1;
$c = $c + 1;
}
$c=0;
foreach ($_SESSION["playerAnswersContent"] as $answer)
{
$c = 0;
foreach ($_SESSION["playerAnswersContent"] as $answer) {
$Final[$c]["PlayerAnswer"] = $answer;
$c=$c+1;
$c = $c + 1;
}
echo $this->twig->render($this->vues["viewScore"], [
'score' => $_SESSION["Score"],
@ -199,22 +197,21 @@ class ControllerUser
$Final[]["Question"] = array();
$Final[]["goodAnswer"] = array();
$Final[]["PlayerAnswer"] = array();
$c=0;
$c = 0;
foreach ($_SESSION["Questions"] as &$question) {
$answer = $this->mdAnswer->getAnswerByID($question->getIdAnswerGood());
$Final[$c]["goodAnswer"] = $answer->getContent();
$c=$c+1;
$c = $c + 1;
}
$c=0;
$c = 0;
foreach ($_SESSION["Questions"] as $question) {
$Final[$c]["Question"] = $question->getContent();
$c=$c+1;
$c = $c + 1;
}
$c=0;
foreach ($_SESSION["playerAnswersContent"] as $answer)
{
$c = 0;
foreach ($_SESSION["playerAnswersContent"] as $answer) {
$Final[$c]["PlayerAnswer"] = $answer;
$c=$c+1;
$c = $c + 1;
}
echo $this->twig->render($this->vues["viewScore"], [
'score' => $_SESSION["Score"],

@ -37,19 +37,17 @@ class FrontController
if ($match) {
$controller = $match['target'];
if (strpos($controller, "#") !== false) {
list($controller,$action)=explode("#",$controller);
}
else {
$action=$match['params']['action'];
$id=$match['params']['id'];
list($controller, $action) = explode("#", $controller);
} else {
$action = $match['params']['action'];
$id = $match['params']['id'];
}
$controller = new $controller;
if (is_callable(array($controller, $action))) {
call_user_func_array(array($controller, $action), array($match['params']));
}
}
}
catch (Exception $e) {
} catch (Exception $e) {
header("Location:" . $vues["erreur"]);
}
}

@ -0,0 +1,19 @@
<?php
//préfixe
$rep = __DIR__ . '/../';
//Vues
$vues["singleplayer"]="singleplayer.twig";
$vues["multiplayer"]="multiplayer.twig";
$vues["home"]="home.twig";
$vues["connexion"]="connexion.twig";
$vues["themeChoice"]="themeChoice.twig";
$vues["loginAdmin"]="loginAdmin.twig";
$vues["adminAdministrators"]="adminAdministrators.twig";
$vues["adminAdministratorsModal"]="adminAdministratorsModal.twig";
$vues["adminChapters"]="adminChapters.twig";
$vues["adminChaptersModal"]="adminChaptersModal.twig";
$vues["adminQuestions"]="adminQuestions.twig";
$vues["adminQuestionsModal"]="adminQuestionsModal.twig";
$vues["viewScore"]="viewScore.twig";
Loading…
Cancel
Save