From def0b42acb4f2987f3e2e720a9b03798bae8eb73 Mon Sep 17 00:00:00 2001 From: Killian <killian.delarue@gmail.com> Date: Fri, 6 Dec 2019 11:26:21 +0100 Subject: [PATCH] add requests --- htdocs/forms.php | 5 ----- htdocs/header.php | 18 +++++++++++++++++- htdocs/requests/requests.php | 24 ++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 htdocs/requests/requests.php diff --git a/htdocs/forms.php b/htdocs/forms.php index 3bc3221..f597e7a 100644 --- a/htdocs/forms.php +++ b/htdocs/forms.php @@ -323,12 +323,7 @@ function match($student, $userRepository) { $nameProf = $match["teacher"]->getName(); $subject = $match["subject"]; $dispo = $match["dispo"]; -<<<<<<< HEAD - $mail = $match["mail"]; - echo "Le professeur <b>$firstnameProf $nameProf</b> est disponible pour un cours de <b>$subject</b> le <b>$dispo</b> et son mail est <b>$mail</b> </br>"; -======= echo "Le professeur <b>$firstnameProf $nameProf</b> est disponible pour un cours de <b>$subject</b> le <b>$dispo</b>.</br>"; ->>>>>>> 8f529a4815643ab9298439c4796f7d7e21e15266 } } diff --git a/htdocs/header.php b/htdocs/header.php index ae0816a..f370766 100644 --- a/htdocs/header.php +++ b/htdocs/header.php @@ -50,7 +50,7 @@ <?php } - if ($_SESSION['connected'] == true) { + if ($_SESSION['connected'] == true){ if ($_SESSION['currentType'] == 'Student') { ?> @@ -64,6 +64,20 @@ <a href="/pima/student/matchs.php">Mes matchs</a> </li> + <?php } + + if ($_SESSION['currentType'] == 'Teacher') { + ?> + + <li + + <?php + if (basename(getcwd()) == 'requests') + echo 'class="current"'; + ?> > + <a href="/pima/requests/requests.php">Mes demandes</a> + </li> + <?php } ?> <li @@ -77,6 +91,8 @@ <?php } ?> + + </ul> </nav> </header> \ No newline at end of file diff --git a/htdocs/requests/requests.php b/htdocs/requests/requests.php new file mode 100644 index 0000000..5eb0d06 --- /dev/null +++ b/htdocs/requests/requests.php @@ -0,0 +1,24 @@ +<?php +$title = 'Projet PIMA'; +include("/opt/lampp/htdocs/pima/head.php"); +?> +</head> + +<?php include("/opt/lampp/htdocs/pima/header.php"); ?> + +<section class="wrapper style1"> + <div class="container"> + <div id="content"> + <article> + <header> + <h2>Mes demandes</h2> + </header> + + <p> + test + </p> + </article> + </div> + </div> +</section> +<?php #include("/opt/lampp/htdocs/pima/footer.php"); ?> \ No newline at end of file -- GitLab