mise à jour git

This commit is contained in:
Ghouar-Toussaint Rafael 2024-06-16 10:48:38 +02:00
parent a5a9cd7b0b
commit abe7bcde0b
4 changed files with 71 additions and 15 deletions

View File

@ -1 +1,57 @@
<?php echo "hello"; ?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<link rel="icon" href="https://dwarves.iut-fbleau.fr/~ghouar-t/SaeDEV2.2//img/jo2024.jpg">
<link rel="stylesheet" href="https://dwarves.iut-fbleau.fr/~ghouar-t/SaeDEV2.2/css/style.css">
<title>Évènements - Jeux Olympiques</title>
</head>
<body>
<header>
<h1 class='Hello'><?php echo $event -> Nom; ?></h1>
<nav>
<?php
if (isset($_SESSION['login'])) {
echo " <a href='https://dwarves.iut-fbleau.fr/~ghouar-t/SaeDEV2.2/' class='categorie'>Page d'accueil</a>";
echo " <a href='https://dwarves.iut-fbleau.fr/~ghouar-t/SaeDEV2.2/php/profil.php'><img class='profil' src='https://dwarves.iut-fbleau.fr/~ghouar-t/SaeDEV2.2/img/photo-profil.png' alt='profil'></a>";
echo "<a href='https://dwarves.iut-fbleau.fr/~ghouar-t/SaeDEV2.2/php/.php' class='categorie'>Déconnexion</a>";
}
else {
echo "<a href='https://dwarves.iut-fbleau.fr/~ghouar-t/SaeDEV2.2/' class='categorie'>Page d'accueil</a>";
echo "<a href='https://dwarves.iut-fbleau.fr/~ghouar-t/SaeDEV2.2/php/connexion.php' class='categorie'>Connexion</a>";
echo "<a href='https://dwarves.iut-fbleau.fr/~ghouar-t/SaeDEV2.2/php/inscription.php' class='categorie'>Inscription</a>";
}
?>
</nav>
</header>
<?php echo $event -> Nom; ?>
<table>
<?php
echo "<tr><td><b> Sport : </b> {$event ->Sport}</td></tr>";
echo "<tr><td><b> Lieux : </b>{$event ->Lieux}</td></tr>";
echo "<tr><td><b> Genre : </b> {$event ->Date}</td></tr>";
echo "<tr><td><b> Résumé : </b>{$event ->Description} </td></tr>";
echo "<tr><td><b> Pays : </b> {$event ->NbInscrit}</td></tr>";
echo "<tr><td><b> Casting : </b> <br>";
//foreach($actors as $act){
// echo "{$act['prenom']} {$act['nom']} as {$act['nomRole']}, <br> ";
//}
//echo " <a href = '/~ghouar-t/TPCodeIgniter/CI3/'> Retour</a>";
//echo "</td></tr>";
?>
</tables>
<footer>
<?php require_once('https://dwarves.iut-fbleau.fr/~ghouar-t/SaeDEV2.2/php/footer.php'); ?>
//</footer>
</body>
</html>

View File

@ -1,3 +0,0 @@
</body>
</html>

View File

@ -183,6 +183,8 @@
color: #000000;
}
.Event{
color: #ffffff;
table.Event{
color: #000000;
text-decoration: none;
column-width: 60rem;
}

View File

@ -7,9 +7,9 @@ $db = initDatabase();
// Initialisation des événements si la table est vide
$event = "SELECT * FROM evenement";
if (mysqli_num_rows(mysqli_query($db, $event)) == 0) {
mysqli_query($db, "INSERT INTO evenement VALUES(1, 'Ceremonie d ouverture des JO', 'Tour Eiffel', '2024-07-26', 'debut des JO', 0)");
mysqli_query($db, "INSERT INTO evenement VALUES(2, 'Football', 'Stade des Princes', '2024-07-27', 'premier match de foot', 0)");
mysqli_query($db, "INSERT INTO evenement VALUES(3, 'Natation', 'Piscine Olympique', '2024-07-27', 'premiere course', 0)");
mysqli_query($db, "INSERT INTO evenement VALUES(1, 'Ceremonie d ouverture des JO','Cérémonie', 'Tour Eiffel', '2024-07-26', 'debut des JO', 0)");
mysqli_query($db, "INSERT INTO evenement VALUES(2, 'match d ouverture Football','Football', 'Stade des Princes', '2024-07-27', 'premier match de foot', 0)");
mysqli_query($db, "INSERT INTO evenement VALUES(3, 'course d ouverture','Natation', 'Piscine Olympique', '2024-07-27', 'premiere course', 0)");
$event = mysqli_query($db, "SELECT * FROM evenement");
}
@ -88,19 +88,20 @@ $event = mysqli_stmt_get_result($stmt);
</div>
</form>
</div>
<table>
<table class="Event">
<thead>
<tr>
<br><th class="Event" scope="col"><a href="?order_by=Sport&order_dir=<?php echo $order_by == 'Sport' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Sport</a></th>
<th class="Event" scope="col"><a href="?order_by=Lieux&order_dir=<?php echo $order_by == 'Lieux' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Lieux de l'évènement</a></th>
<th class="Event" scope="col"><a href="?order_by=Date&order_dir=<?php echo $order_by == 'Date' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Date</a></th>
<th class="Event" scope="col"><a href="?order_by=NbInscrit&order_dir=<?php echo $order_by == 'NbInscrit' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Nombre de Participant</a></th>
<br><th scope="col"><a href="?order_by=Nom&order_dir=<?php echo $order_by == 'Nom' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Nom</a></th>
<th scope="col"><a href="?order_by=Sport&order_dir=<?php echo $order_by == 'Sport' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Sport</a></th>
<th scope="col"><a href="?order_by=Lieux&order_dir=<?php echo $order_by == 'Lieux' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Lieux de l'évènement</a></th>
<th scope="col"><a href="?order_by=Date&order_dir=<?php echo $order_by == 'Date' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Date</a></th>
<th scope="col"><a href="?order_by=NbInscrit&order_dir=<?php echo $order_by == 'NbInscrit' && $order_dir == 'ASC' ? 'DESC' : 'ASC'; ?>">Nombre de Participant</a></th>
</tr>
</thead>
<tbody>
<?php
while ($row = mysqli_fetch_assoc($event)) {
echo "<tr > <th scope='row' class='Event'><a href='/~ghouar-t/SaeDEV2.2/CI3/index.php/Evenement_info/view/{$row['id']}'><br>".$row['Sport']."</th><th><br>".$row['Lieux']."</th><th><br>".$row['Date']."</th><th><br>".$row['NbInscrit']."</th></tr>";
echo "<tr> <td scope='row'><a href='/~ghouar-t/SaeDEV2.2/CI3/index.php/Evenement_info/view/{$row['id']}'><br>".$row['Nom']."</td><td><br>".$row['Sport']."</td><td><br>".$row['Lieux']."</td><td><br>".$row['Date']."</td><td><br>".$row['NbInscrit']."</td></tr>";
}
?>
</tbody>