<?php include 'lib/user.php'; include 'lib/PDO.php'; if (!empty($_POST['action']) && $_POST['action'] == 'ajout') { include 'modele/evenements/proposer_covoiturage.php'; proposer_covoiturage($_POST); } //page infos envent+liste participants if (!empty($_GET['evenement'])) { if (!empty($_POST['action']) && $_POST['action'] == 'participer_evenement') { User::participerA($_SESSION['user_id'], $_POST['evenement'], $_POST['participation']); } else { if (!empty($_POST['action']) && $_POST['action'] == 'proposer_covoiturage') { User::addCovoiturage($_POST['evenement'], $_SESSION['user_id'], $_SESSION['username'], $_POST['nb_passagers'], $_POST['fumeur'], $_POST['lieu_depart'], $_POST['heure_depart']); } else { if (!empty($_POST['action']) && $_POST['action'] == 'reserver_covoiturage') { User::reserverSiegeCovoiturage($_POST['covoiturage'], $_SESSION['user_id'], $_SESSION['username']); } else { if (!empty($_POST['action']) && $_POST['action'] == 'ajout') { include 'modele/evenements/proposer_covoiturage.php'; proposer_covoiturage($_POST); } } } } include 'modele/evenements/get_particular_event.php'; $event = get_particular_event($_GET['evenement']); include 'modele/evenements/get_liste_participants.php'; $liste_participants = get_liste_participants($_GET['evenement']); include 'modele/evenements/get_covoiturages.php';