121 lines
4.3 KiB
PHP
Executable File
121 lines
4.3 KiB
PHP
Executable File
<?php
|
|
require("../include/variables.php");
|
|
require("../include/init.php");
|
|
require("../include/main-functions.php");
|
|
require("../include/objects.php");
|
|
require("../include/panels.php");
|
|
|
|
$pdo = sqlConnect($sqlDatabaseHost, $sqlDatabaseName, $sqlDatabaseUser, $sqlDatabasePass);
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
|
|
<head>
|
|
<?php fillHead($rootPageURL, $pageTitle, $darkTheme, $lightTheme);?>
|
|
<style>
|
|
main {
|
|
background: none;
|
|
min-height: 0;
|
|
}
|
|
.video-background {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
z-index: -1;
|
|
}
|
|
|
|
.video-background video {
|
|
min-width: 100%;
|
|
min-height: 100%;
|
|
width: auto;
|
|
height: auto;
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
z-index: -1;
|
|
}
|
|
|
|
#main-panel {
|
|
margin: 8em auto;
|
|
text-align: center;
|
|
overflow: hidden;
|
|
}
|
|
|
|
#main-panel h1 {
|
|
width: 80%;
|
|
margin: 1em auto;
|
|
}
|
|
|
|
.second-panel {
|
|
background: var(--background);
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="body">
|
|
|
|
<header>
|
|
<div class="panel-content">
|
|
<?php fillHeader($rootPageURL, $headerTitle, $headerSubtitle, $social);?>
|
|
</div>
|
|
<meta name="description" content="Rassembler les étudiants dans des projets innovants.">
|
|
<meta name="author" content="E59">
|
|
|
|
<meta property="og:locale" content="fr_FR">
|
|
<meta property="og:site_name" content="e59.fr">
|
|
<meta property="og:type" content="website">
|
|
<meta property="og:title" content="Association E59">
|
|
<meta property="og:description" content="Rassembler les étudiants dans des projets innovants.">
|
|
<meta property="og:url" content="https://e59.fr">
|
|
<meta property="og:image" content="https://e59.fr/src/img/e59-pp.png">
|
|
<meta property="og:image:width" content="500">
|
|
<meta property="og:image:height" content="500">
|
|
<meta property="og:image:type" content="image/png">
|
|
</header>
|
|
|
|
<nav>
|
|
<div class="panel-content">
|
|
<?php fillNav($rootPageURL);?>
|
|
</div>
|
|
</nav>
|
|
|
|
<main>
|
|
<div id="main-panel">
|
|
<div class="video-background">
|
|
<video autoplay muted loop id="animation">
|
|
<source src="/src/videos/e59-animation.mp4" type="video/mp4">
|
|
</video>
|
|
</div>
|
|
<h1>Rassembler les étudiants dans des projets innovants</h1>
|
|
<a href="https://discord.gg/K6WwKYR8EV" class="button" style="margin: 5em 0 0 0; font-size: 1.2em;">Discord</a>
|
|
</div>
|
|
<div class="second-panel">
|
|
<div class="content">
|
|
<h2>Nos dernières actualités</h2>
|
|
<div class="articles-list">
|
|
<?php
|
|
$sqlRequest = "SELECT articles.ID, articles.title, articles.creation_date, articles.miniature, articles.resume, users.username, users.display_name, roles.badge_svg FROM articles INNER JOIN users ON articles.author = users.ID LEFT JOIN roles ON users.role = roles.ID WHERE articles.classification <= :userAccreditation ORDER BY articles.creation_date DESC LIMIT 3";
|
|
$request = $pdo->prepare($sqlRequest);
|
|
$request->bindParam(":userAccreditation", $_SESSION['userAccreditation']);
|
|
$request->execute();
|
|
$result = $request->fetchAll(PDO::FETCH_ASSOC);
|
|
if ($result) {
|
|
listArticles($result, $rootPageURL);
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<footer>
|
|
<div class="panel-content">
|
|
<?php fillFooter($footerText);?>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|