Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
P
Projet
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Wiki externe
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Déploiement
Releases
Registre de conteneurs
Registre de modèles
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
PIMA Groupe 20
Projet
Validations
d820d8da
Valider
d820d8da
rédigé
Il y a 5 ans
par
Lucas BRIFFON
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
print matchs
parent
0022f9ee
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
4
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
4 fichiers modifiés
htdocs/data.php
+1
-0
1 ajout, 0 suppression
htdocs/data.php
htdocs/forms.php
+2
-14
2 ajouts, 14 suppressions
htdocs/forms.php
htdocs/requests/requests.php
+1
-1
1 ajout, 1 suppression
htdocs/requests/requests.php
htdocs/student/matchs.php
+51
-42
51 ajouts, 42 suppressions
htdocs/student/matchs.php
avec
55 ajouts
et
57 suppressions
htdocs/data.php
+
1
−
0
Voir le fichier @
d820d8da
...
@@ -35,6 +35,7 @@ function fill_table($bdd){
...
@@ -35,6 +35,7 @@ function fill_table($bdd){
$bdd
->
query
(
$sql
);
$bdd
->
query
(
$sql
);
$sql
=
"CREATE TABLE requests (
$sql
=
"CREATE TABLE requests (
ID int NOT NULL,
student int NOT NULL,
student int NOT NULL,
teacher int NOT NULL,
teacher int NOT NULL,
dispo varchar(20) NOT NULL,
dispo varchar(20) NOT NULL,
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
htdocs/forms.php
+
2
−
14
Voir le fichier @
d820d8da
...
@@ -83,7 +83,7 @@ function inscription_student($bdd){
...
@@ -83,7 +83,7 @@ function inscription_student($bdd){
</div>
</div>
</div>
</div>
<div
class=
"col-sm-
1
"
>
<div
class=
"col-sm-
2
"
>
<div
class=
"form-check form-check-inline"
>
<div
class=
"form-check form-check-inline"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"inlineCheckbox23"
value=
"mercredi"
name=
"mercredi"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"inlineCheckbox23"
value=
"mercredi"
name=
"mercredi"
>
<label
class=
"form-check-label"
for=
"inlineCheckbox23"
>
Mercredi
</label>
<label
class=
"form-check-label"
for=
"inlineCheckbox23"
>
Mercredi
</label>
...
@@ -97,7 +97,7 @@ function inscription_student($bdd){
...
@@ -97,7 +97,7 @@ function inscription_student($bdd){
</div>
</div>
</div>
</div>
<div
class=
"col-sm-
1
"
>
<div
class=
"col-sm-
2
"
>
<div
class=
"form-check form-check-inline"
>
<div
class=
"form-check form-check-inline"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"inlineCheckbox25"
value=
"vendredi"
name=
"vendredi"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"inlineCheckbox25"
value=
"vendredi"
name=
"vendredi"
>
<label
class=
"form-check-label"
for=
"inlineCheckbox25"
>
Vendredi
</label>
<label
class=
"form-check-label"
for=
"inlineCheckbox25"
>
Vendredi
</label>
...
@@ -314,16 +314,4 @@ function connection($bdd){
...
@@ -314,16 +314,4 @@ function connection($bdd){
<?php
<?php
}
}
function
match
(
$student
,
$userRepository
)
{
$matchs
=
match_script
(
$student
,
$userRepository
);
foreach
(
$matchs
as
$match
)
{
$firstnameProf
=
$match
[
"teacher"
]
->
getFirstname
();
$nameProf
=
$match
[
"teacher"
]
->
getName
();
$subject
=
$match
[
"subject"
];
$dispo
=
$match
[
"dispo"
];
echo
"Le professeur <b>
$firstnameProf
$nameProf
</b> est disponible pour un cours de <b>
$subject
</b> le <b>
$dispo
</b>.</br>"
;
}
}
?>
?>
Ce diff est replié.
Cliquez pour l'agrandir.
htdocs/requests/requests.php
+
1
−
1
Voir le fichier @
d820d8da
Ce diff est replié.
Cliquez pour l'agrandir.
htdocs/student/matchs.php
+
51
−
42
Voir le fichier @
d820d8da
...
@@ -14,54 +14,63 @@ include("/opt/lampp/htdocs/pima/head.php");
...
@@ -14,54 +14,63 @@ include("/opt/lampp/htdocs/pima/head.php");
if
(
isset
(
$_SESSION
[
'currentMail'
]))
{
if
(
isset
(
$_SESSION
[
'currentMail'
]))
{
$students
=
$userRepository
->
fetchStudent
();
$students
=
$userRepository
->
fetchStudent
();
foreach
(
$students
as
$student
)
{
foreach
(
$students
as
$student
)
{
if
(
$_SESSION
[
'currentMail'
]
==
$student
->
getMail
())
{
if
(
$_SESSION
[
'currentMail'
]
!=
$student
->
getMail
())
{
echo
"<header><h2>Mes matchs</h2></header> <p>"
;
match
(
$student
,
$userRepository
);
echo
"</p>"
;
}
}
}
if
(
isset
(
$_POST
[
'id'
]))
{
$students
=
$userRepository
->
fetchStudent
();
foreach
(
$students
as
$student
)
{
if
(
$_POST
[
'id'
]
==
$student
->
getID
())
{
$firstname
=
$student
->
getFirstname
();
$name
=
$student
->
getName
();
echo
"<header><h2>Mes matchs (
$firstname
$name
)</h2></header> <p>"
;
match
(
$student
,
$userRepository
);
echo
"</p>"
;
}
}
}
else
{
?>
?>
<header><h2>
Accès interdit
</h2></header>
<header><h2>
Accès interdit
</h2></header>
<p>
Vous devez être authentifié⋅e en tant qu'élève pour avoir accès à cette page.
</p>
<p>
Vous devez être authentifié⋅e en tant qu'élève pour avoir accès à cette page.
</p>
<?php
<?php
}
}
?>
else
{
echo
"<header><h2>Mes matchs</h2></header> <p>"
;
<!-- Formulaire pour tester l'affichage. Quand l'authentification sera faite,
$matchs
=
match_script
(
$student
,
$userRepository
);
le supprimer et utiliser l'ID dans _SESSION au lieu de _POST -->
$idMatch
=
0
;
<p>
<form
action=
"matchs.php"
method=
"post"
>
echo
'<form action="/pima/student/matchs.php" method="post">'
;
foreach
(
$matchs
as
$match
)
{
$firstnameProf
=
$match
[
"teacher"
]
->
getFirstname
();
$nameProf
=
$match
[
"teacher"
]
->
getName
();
$subject
=
$match
[
"subject"
];
$dispo
=
$match
[
"dispo"
];
$idMatch
++
;
?>
<div
class=
"form-group form-row"
>
<div
class=
"form-group form-row"
>
<label
for=
"inputId"
class=
"col-sm-2 col-form-label"
>
Identifiant
</label>
<div
class=
"form-check"
>
<div
class=
"col-sm-10"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"checkbox
<?php
echo
"
$idMatch
"
?>
"
value=
"match
<?php
echo
"
$idMatch
"
?>
"
name=
"match
<?php
echo
"
$idMatch
"
?>
"
>
<input
type=
'text'
class=
"form-control"
id=
"inputIde"
name=
'id'
placeholder=
"Identifiant"
>
<label
class=
"form-check-label"
for=
"checkbox
<?php
echo
"
$idMatch
"
?>
"
style=
"font-weight: 300;"
>
<?php
echo
"Cours de <b>
$subject
</b> le <b>
$dispo
</b> par <b>
$firstnameProf
$nameProf
</b>"
?>
</label>
</div>
</div>
</div>
</div>
<?php
}
?>
<div
class=
"form-group form-row"
>
<div
class=
"form-group form-row"
>
<div
class=
"offset-sm-2"
>
<input
type=
"submit"
value=
"Demander"
>
<!-- <button type="submit">S'inscrire</button> -->
<input
type=
"submit"
value=
"Se connecter"
>
</div>
</div>
</div>
</form>
</form>
</p>
</p>
<?php
/*if (isset($_POST['match1'])){
$firstname = $_POST['firstname'];
$name = $_POST['name'];
$type = "Student";
$mail = $_POST['mail'];
$mdp = $_POST['mdp'];
$sql = "INSERT INTO users(student, teacher, dispo, subject, accepted) values (?, ?, ?, ?, ?, ?)";
$bdd->prepare($sql)->execute([$firstname,$name,$type,$mail,$mdp]);
}*/
}
}
}
?>
</div>
</div>
</div>
</div>
</section>
</section>
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter