diff --git a/diapo.php b/diapo.php index fbf2268..7579ca8 100644 --- a/diapo.php +++ b/diapo.php @@ -2,6 +2,12 @@ include("./Assets/functions.php"); $config = json_decode(file_get_contents("./Assets/config.json"), true); $bdd = connectBDD("localhost", $config["BDD_USER"], $config["BDD_PASSWD"], $config["BDD_NAME"]); + +/* Authentification */ +session_start(); +if(!isset($_SESSION['connected']) || !isset($_SESSION['site']) || !$_SESSION['connected']){ + header('location: ./event.php'); +} ?> diff --git a/event.php b/event.php index 900492f..562f73e 100644 --- a/event.php +++ b/event.php @@ -123,7 +123,6 @@ $couvertureImg = getEventBigImage($bdd, $_GET['event']); } } - // Fallback si pas de solution trouvée (cas avec 2-3 images) if (!$placed && !empty($images)) { $columns[$col][$row] = $images[0]['chemin']; }