diff --git a/pa.php b/pa.php deleted file mode 100644 index ca34cd1..0000000 --- a/pa.php +++ /dev/null @@ -1,188 +0,0 @@ - - - - - uniqid(), - 'title' => htmlspecialchars(trim($title)), - 'nombre' => htmlspecialchars(trim($nombre)), - 'description' => htmlspecialchars(trim($description) ?: "Aucun détail supplémentaire fourni."), - 'transport_option' => htmlspecialchars(trim($transportOption)), - 'date' => date('d-m-Y \à\ H:i:s') - ]; - $annonces[] = $annonce; - saveAnnonces($annonces); - return $annonce; -} - -// Afficher toutes les annonces existantes avec le comptage des options de transport -function displayAnnonces() -{ - $annonces = loadAnnonces(); - $totalCovoiturage = 0; - $totalRdv = 0; - - if (empty($annonces)) { - echo "
Aucune personne inscrite pour le moment.
"; - } else { - foreach ($annonces as $annonce) { - echo "Nombre de personnes : " . $annonce['nombre'] . "
"; - echo "Option choisie : " . $annonce['transport_option'] . "
"; - - // Incrémenter les totaux en fonction de l'option choisie - if ($annonce['transport_option'] === 'Covoiturage') { - $totalCovoiturage += (int)$annonce['nombre']; - } elseif ($annonce['transport_option'] === 'Rendez-vous départ') { - $totalRdv += (int)$annonce['nombre']; - } - } else { - echo "Cette personne a indiqué qu'elle ne sera pas présente.
"; - } - echo "" . $annonce['description'] . "
"; - echo "Publié le " . $annonce['date'] . ""; - echo "Veuillez sélectionner une option de transport.
"; - } else { - addAnnonce($_POST['title'], $nombre, $description, $transportOption); - header("Location: " . $_SERVER['PHP_SELF']); - exit; - } -} -?> - - - - - - - -