intranet-apei/event.php

44 lines
No EOL
1.7 KiB
PHP

<?php
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"]);
$page = 'Bonnes pratiques';
/* Gestion de la connexion */
session_start();
if(!isset($_SESSION['connected']) || $_SESSION['connected'] == false){
header('location: login.php');
}
/* Récupération de l'évènement */
$titre = getEventName($bdd, $_GET['event']);
$images = getEventImages($bdd, $_GET['event']);
$couvertureImg = getEventBigImage($bdd, $_GET['event']);
?>
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Intranet de l'APEI</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
<link rel="shortcut icon" href="./Assets/Icones/APEIMBGE.jpg" type="image/x-icon">
<link rel="stylesheet" href="./styles-scripts/photos.css">
</head>
<body>
<?php include('./Assets/navbar.php');?>
<div class="banniere" style="background-image: url('<?= $couvertureImg ?>'); margin-bottom: 2px;">
<div class="texte-banniere">
<?= $titre ?>
</div>
</div>
<?php foreach($images as $photo):?>
<img src="<?= $photo["chemin"] ?>" alt="" style="max-width: 350px;">
<?php endforeach ?>
<!-- footer pas toucher -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
</body>
</html>