71 lines
2.4 KiB
PHP
71 lines
2.4 KiB
PHP
|
<?php
|
||
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/tools/dbConnect.php';
|
||
|
session_start();
|
||
|
|
||
|
if (isset($_COOKIE['userData'])) {
|
||
|
$userDataEncoded = $_COOKIE['userData'];
|
||
|
$userData = json_decode($userDataEncoded, true); // 'true' pour obtenir un tableau associatif
|
||
|
|
||
|
$email = $userData['email'];
|
||
|
$name = $userData['name'];
|
||
|
$familyName = $userData['familyName'];
|
||
|
$role = $userData['role'];
|
||
|
}
|
||
|
?>
|
||
|
|
||
|
<!DOCTYPE html>
|
||
|
<html lang="fr">
|
||
|
|
||
|
<head>
|
||
|
<meta charset="UTF-8" />
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
|
<link rel="stylesheet" href="/styles/main.css" />
|
||
|
<link rel="stylesheet" href="/styles/header.css" />
|
||
|
<link rel="stylesheet" href="/styles/footer.css" />
|
||
|
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet" />
|
||
|
|
||
|
<link rel="icon" type="image/png" sizes="32x32"
|
||
|
href="https://tickets.paris2024.org/obj/media/FR-Paris2024/specialLogos/favicons/favicon-32x32.png" />
|
||
|
<script src="https://kit.fontawesome.com/f16a36bad3.js" crossorigin="anonymous"></script>
|
||
|
<script src="/scripts/dateChecker.js" defer></script>
|
||
|
<title>List des évènements | Jeux Olympiques - Paris 2024</title>
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<?php include $_SERVER['DOCUMENT_ROOT'] . '/views/header.php' ?>
|
||
|
<h1>Liste des évènements</h1>
|
||
|
<div class="event-container">
|
||
|
<div class="searchbar">
|
||
|
<form action="search" method="get">
|
||
|
</form>
|
||
|
<input id="searchbar" name="search" placeholder="Rechercher un nom d'évènement" type="text">
|
||
|
<button type="submit"><i class="fas fa-search"></i> Rechercher</button>
|
||
|
</div>
|
||
|
|
||
|
<!-- menu déroulant permettant d'afficher les lieux pour lesquels un évènement est enregistré dans la base de données avec mysqli-connect ($db)-->
|
||
|
<p class="text">Sélectionner un lieu :</p>
|
||
|
<select name="location" id="location">
|
||
|
|
||
|
<?php
|
||
|
$query = "SELECT DISTINCT location FROM event";
|
||
|
$result = mysqli_query($db, $query);
|
||
|
|
||
|
while ($row = mysqli_fetch_assoc($result)) {
|
||
|
echo "<option value='" . $row['location'] . "'>" . $row['location'] . "</option>";
|
||
|
}
|
||
|
?>
|
||
|
</select>
|
||
|
<div class="event-date">
|
||
|
<label for="eventDate">
|
||
|
<p class="text">Sélectionner une date:</p>
|
||
|
</label>
|
||
|
<input type="date" id="eventDate" name="eventDate">
|
||
|
</div>
|
||
|
|
||
|
<!-- code de la page ici -->
|
||
|
|
||
|
</div>
|
||
|
<?php include $_SERVER['DOCUMENT_ROOT'] . '/views/footer.php' ?>
|
||
|
</body>
|
||
|
|
||
|
</html>
|