Example #1
0
include_once "autoloader.php";
$pdo_singleton = new PDOSingleton();
if (isset($_GET["id"])) {
    if ($_GET["id"] == 41) {
        header("location: http://best.insa-lyon.fr/project_x/course.html");
    } elseif ($_GET["id"] == 44) {
        header("location: http://best.insa-lyon.fr/ebec.html");
    }
    $is_event = TRUE;
    $event_page = Page::get($_GET["id"]);
    //rajouter controle ici
} else {
    $is_event = FALSE;
    $event_page = Page::get("events_presentation");
    $events = new PageArray();
    $events->get_events();
}
?>

<!DOCTYPE html>
<html>
	<head>
		<title>
			<?php 
echo $is_event ? $event_page->title . " par BEST Lyon" : "&Eacute;v&egrave;nements BEST Lyon";
?>
		</title>
		<link type="text/css" rel="stylesheet" href="./css/events.css"/>
		<link href='https://fonts.googleapis.com/css?family=Libre+Baskerville' rel='stylesheet' type='text/css'>
		<link href='https://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>