summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/index.php b/index.php
index e38b418..d699efc 100644
--- a/index.php
+++ b/index.php
@@ -43,10 +43,19 @@ if (isset($_COOKIE["autoLogin"]) && $_SESSION["loggedIn"] == false) {
<?php echo('<html lang="'.$_SESSION["lang"].'">'.PHP_EOL); ?>
<!-- Balise contenant les metadata -->
<head>
+<?php
+if (isset($_COOKIE["RGPD_ACCEPT"]) && $_COOKIE["RGPD_ACCEPT"]) {
+ echo(' <!-- Google analitycs -->
+ <script async src="https://www.googletagmanager.com/gtag/js?id=G-YK3Q3ES11T"></script>
+ <script src="/Static/Js/googleAnalitycs.js"></script>');
+}?>
<?php require_once(dirname( __FILE__ )."/Template/Include/incl_global_header.php"); ?>
<?php if (isset($_SESSION["notification"]) && $_SESSION["notification"]) {
echo(' <link href="/Static/Css/notification.css" rel="stylesheet">'.PHP_EOL);
} ?>
+<?php if (!isset($_SESSION["rgpd"])) {
+ echo(' <link href="/Static/Css/rgpd.css" rel="stylesheet">'.PHP_EOL);
+} ?>
<?php echo(' <link href="/Static/Css/slideshow.css" rel="stylesheet">'.PHP_EOL); ?>
<?php echo(' <link href="/Static/Css/search.css" rel="stylesheet">'.PHP_EOL); ?>
<?php require_once(dirname( __FILE__ )."/Template/Include/".$_SESSION["lang"]."/title.php"); ?>
@@ -54,9 +63,6 @@ if (isset($_COOKIE["autoLogin"]) && $_SESSION["loggedIn"] == false) {
</head>
<!-- Balise principale contenant le corps du document HTML -->
<body>
-<?php if (isset($_SESSION["notification"]) && $_SESSION["notification"]) {
- require_once("./Template/Include/incl_global_notification.php");
-} ?>
<?php require_once("./Template/Include/incl_global_navbar.php"); ?>
<?php require_once("./Template/Include/incl_index_slideshow.php"); ?>
<?php require_once("./Template/Include/incl_index_search.php");?>
@@ -64,7 +70,13 @@ if (isset($_COOKIE["autoLogin"]) && $_SESSION["loggedIn"] == false) {
<script src="/Static/Js/main.js"></script>
<script src="/Static/Js/index.js"></script>
<?php if (isset($_SESSION["notification"]) && $_SESSION["notification"]) {
+ require_once("./Template/Include/incl_global_notification.php");
echo(' <script src="/Static/Js/notification.js"></script>');
} ?>
+<?php if (!isset($_COOKIE["RGPD_ACCEPT"])) {
+ require_once("./Template/Include/incl_index_rgpd.php");
+ echo(' <!-- RGPD -->
+ <script src="/Static/Js/rgpd.js"></script>');
+}?>
</body>
</html> \ No newline at end of file