Skip to content
Extraits de code Groupes Projets
Valider bc4d6316 rédigé par Killian's avatar Killian
Parcourir les fichiers

update print_request

parent 9ea5f87c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -37,6 +37,7 @@ include("/opt/lampp/htdocs/pima/head.php"); ...@@ -37,6 +37,7 @@ include("/opt/lampp/htdocs/pima/head.php");
$_SESSION['currentFirstname'] = $firstname; $_SESSION['currentFirstname'] = $firstname;
$_SESSION['currentMail'] = $mail; $_SESSION['currentMail'] = $mail;
$_SESSION['currentType'] = $user->getType(); $_SESSION['currentType'] = $user->getType();
$_SESSION['currentRequest'] = $user->getRequest();
} }
} }
......
...@@ -45,12 +45,24 @@ function match_script($student, $userRepository){ ...@@ -45,12 +45,24 @@ function match_script($student, $userRepository){
#} #}
} }
function print_requests($userRepository){ function print_requests($requests){
$requests = $userRepository->getRequest();
$noRequest = true;
foreach($requests as $r){ foreach($requests as $r){
$m = "test "; $subject = $r->subject;
echo "$m "; $student = $r->student;
$dispo = $r->dispo;
$accepted = $r->accepted;
if (!$accepted){
echo "<p>Vous avez une demande de $student pour un cours de $subject le $dispo</p>";
$noRequest = false;
}
}
if ($noRequest){
echo "<p>Vous n'avez aucune demande</p>";
} }
} }
......
...@@ -15,7 +15,9 @@ include("/opt/lampp/htdocs/pima/head.php"); ...@@ -15,7 +15,9 @@ include("/opt/lampp/htdocs/pima/head.php");
</header> </header>
<p> <p>
<php print_requests($userRepository); ?> <?php
$r = $_SESSION['currentRequest'];
print_requests($r); ?>
</p> </p>
</article> </article>
</div> </div>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter