$formatterMonth = new \IntlDateFormatter( 'fr_FR', \IntlDateFormatter::NONE, \IntlDateFormatter::NONE, 'Europe/Paris', \IntlDateFormatter::GREGORIAN, 'MMM' ); $formatterYear = new \IntlDateFormatter( 'fr_FR', \IntlDateFormatter::NONE, \IntlDateFormatter::NONE, 'Europe/Paris', \IntlDateFormatter::GREGORIAN, 'yyyy' ); $dateDebut = new DateTime($result['date_debut']); $dateFin = new DateTime($result['date_fin']); $url = "https://e3mg.ga/event-single-".$result['event_id']; $encodedUrl = urlencode($url); $encodedTitle = urlencode($result['titre']); // Liens de partage $whatsappLink = "https://wa.me/?text=$encodedTitle%20$encodedUrl"; $facebookLink = "https://www.facebook.com/sharer/sharer.php?u=$encodedUrl"; ?> <!-- ============================================ PAGE TITLE SECTION - Bannière Événement ============================================ --> <section class="page-title-section overlay" data-background="/images/backgrounds/batiment-e3mg.jpg"> <div class="container"> <div class="row"> <div class="col-md-10"> <ul class="list-inline custom-breadcrumb"> <li class="list-inline-item">
$router->map('GET','/login',function(){ require_once "../views/auth/login.php"; },'login'); $router->map('POST','/connexion',function(){ require_once "../controllers/connexion.php"; },'connexion'); $router->map('GET', '/logout', function () { require_once '../controllers/logout.php'; }, 'logout'); //Route pour les évènements //front end $router->map('GET','/event',function(){ require_once "../views/pages/events.php"; },'event'); $router->map('GET','/event-single-[i:id]',function($id){ require_once "../views/pages/event-single.php"; },'event.single'); //back end of event $router->map('GET', '/list-event', function () { require_once "../views/event/index.php"; }, 'list.event'); $router->map('GET', '/add-event', function () { require_once "../views/event/add.php"; }, 'add.event'); $router->map('GET', '/edit-event-[i:id]', function ($id) { require_once "../views/event/edit.php"; }, 'edit.event'); $router->map('POST', '/Update-event-[i:id]', function ($id) { require_once "../controllers/process.php"; }, 'update.event');
} else { // En production, log les erreurs sans les afficher ini_set('display_errors', 0); ini_set('log_errors', 1); error_reporting(E_ALL); } $router = new AltoRouter(); require __DIR__.'/../configs/route.php'; $match = $router->match(); // call closure or throw 404 status if(is_array($match)){ if(is_callable( $match['target'] ) ) { call_user_func_array( $match['target'], $match['params'] ); } else { // no route was matched // $params = $match['params']; // require "../templates/{$match['target']}.php"; header( $_SERVER["SERVER_PROTOCOL"] . ' 404 Not Found'); } }else{ include "../views/error/404.view.php"; }