-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatenschutz.php
60 lines (49 loc) · 1.69 KB
/
datenschutz.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<link rel="stylesheet" href="styles.css">
<?php
include 'layout/header.php';
require 'main.php';
connectmysql();
$guestid = checkforcookie();
if($guestid != null){
if(get_data_from_guest($guestid, "groupid") > $current_group){
echo '
<p>Deine Gast-ID: <kbd>' . $guestid . '</kbd></p>
<p>Deine Position in der Warteschlange: ' . (get_data_from_guest($guestid, "groupid")-$current_group) . ' </p>
';
} else if (get_data_from_guest($guestid, "groupid") == $current_group){
echo '
<p>Deine Gast-ID: <kbd>' . $guestid . '</kbd></p>
<p>Deine Position in der Warteschlange: DU BIST AN DER REIHE!!! </p>
';
} else {
echo '
<p>Deine Gast-ID: <kbd>' . $guestid . '</kbd></p>
<p>Deine Position in der Warteschlange: Es gab einen Fehler... </p>
';
}
}
?>
<h2>DATENSCHUTZ</h2>
<p>Hier kommt die Datenschutzerklärung hin irgendwie...</p>
<br>
<p><a href="index.php" class="button">Zurück zur Hauptseite</a></p>
<?php
include 'layout/footer.php';
?>
<script>
document.addEventListener("DOMContentLoaded", function (event) {
window.setInterval('refresh()', 30000);
//Show hide
let showHideElements = [...document.querySelectorAll('[data-behaviour="showhide"]')];
showHideElements.forEach((element) => {
element.addEventListener("click", (e) => {
e.preventDefault();
element.parentNode.classList.toggle("hidden")
})
});
});
function refresh() {
window.location.reload();
window.location.href = window.location.href.split("?")[0];
}
</script>