<?php /** * Index.php : switch between different parts of the website. * * use session and GET to switch. general variable are load in main. specific controller are load in each part. * */ session_start(); require_once "php/main.php"; try { $c = new Chargement(); if (empty($_SESSION['login'])) { $c->_nouvelle_session(); } elseif (!empty($_SESSION['login'])) { require_once "php/requetemysql.php"; $c->_session_en_cours(); } } catch (Exception $e) { echo 'Une exception a été lancée. Message d\'erreur : ', $e->getMessage(); die("Error in index.php switch. " . $e->getMessage()); }