2026-02-24 14:26:25 +00:00
|
|
|
<?php
|
|
|
|
|
include("./Assets/functions.php");
|
2026-02-25 07:52:22 +00:00
|
|
|
$config = json_decode(file_get_contents("./Assets/config.json"), true);
|
|
|
|
|
$bdd = connectBDD("localhost", $config["BDD_USER"], $config["BDD_PASSWD"], $config["BDD_NAME"]);
|
2026-02-26 07:41:16 +00:00
|
|
|
$page = 'photos';
|
2026-02-24 14:26:25 +00:00
|
|
|
|
|
|
|
|
/* Gestion de la connexion */
|
|
|
|
|
session_start();
|
|
|
|
|
if(!isset($_SESSION['connected']) || $_SESSION['connected'] == false){
|
2026-02-27 13:56:12 +00:00
|
|
|
header('location: login.php?redirect_to=photos.php');
|
2026-02-24 14:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Récupération des évènements */
|
|
|
|
|
$evenements = getEvenements($bdd, $_SESSION['site']);
|
2026-03-04 13:26:06 +00:00
|
|
|
$prefixe = $config['LOCAL_IMG_PREFIXE']
|
2026-02-24 14:26:25 +00:00
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
<!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');?>
|
|
|
|
|
|
|
|
|
|
<h3>Évènements de <?= getSiteName($bdd, $_SESSION['site']) ?></h3>
|
|
|
|
|
|
|
|
|
|
<div class="parent">
|
|
|
|
|
<div class="div1">
|
2026-03-04 13:26:06 +00:00
|
|
|
<?php $debut = str_starts_with($evenements[0]["couverture"], "http") ? '' : $prefixe; ?>
|
2026-02-24 14:26:25 +00:00
|
|
|
<a href="./event.php?event=<?= $evenements[0]["id"] ?>">
|
2026-03-04 13:26:06 +00:00
|
|
|
<img src="<?= $debut . $evenements[0]["couverture"] ?>" alt="">
|
2026-02-24 14:26:25 +00:00
|
|
|
<div class="overlay">
|
|
|
|
|
<p><?= $evenements[0]["titre"] ?></p>
|
|
|
|
|
</div>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="div2">
|
2026-03-04 13:26:06 +00:00
|
|
|
<?php $debut = str_starts_with($evenements[1]["couverture"], "http") ? '' : $prefixe; ?>
|
2026-02-24 14:26:25 +00:00
|
|
|
<a href="./event.php?event=<?= $evenements[1]["id"] ?>">
|
2026-03-04 13:26:06 +00:00
|
|
|
<img src="<?= $debut . $evenements[1]["couverture"] ?>" alt="">
|
2026-02-24 14:26:25 +00:00
|
|
|
<div class="overlay">
|
|
|
|
|
<p><?= $evenements[1]["titre"] ?></p>
|
|
|
|
|
</div>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="div3">
|
2026-03-04 13:26:06 +00:00
|
|
|
<?php $debut = str_starts_with($evenements[2]["couverture"], "http") ? '' : $prefixe; ?>
|
2026-02-24 14:26:25 +00:00
|
|
|
<a href="./event.php?event=<?= $evenements[2]["id"] ?>">
|
2026-03-04 13:26:06 +00:00
|
|
|
<img src="<?= $debut . $evenements[2]["couverture"] ?>" alt="">
|
2026-02-24 14:26:25 +00:00
|
|
|
<div class="overlay">
|
|
|
|
|
<p><?= $evenements[2]["titre"] ?></p>
|
|
|
|
|
</div>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="div4">
|
2026-03-04 13:26:06 +00:00
|
|
|
<?php $debut = str_starts_with($evenements[3]["couverture"], "http") ? '' : $prefixe; ?>
|
2026-02-24 14:26:25 +00:00
|
|
|
<a href="./event.php?event=<?= $evenements[3]["id"] ?>">
|
2026-03-04 13:26:06 +00:00
|
|
|
<img src="<?= $debut . $evenements[3]["couverture"] ?>" alt="">
|
2026-02-24 14:26:25 +00:00
|
|
|
<div class="overlay">
|
|
|
|
|
<p><?= $evenements[3]["titre"] ?></p>
|
|
|
|
|
</div>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 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>
|