-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcookie.php
More file actions
49 lines (43 loc) · 1.92 KB
/
cookie.php
File metadata and controls
49 lines (43 loc) · 1.92 KB
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
<?php include('manageCookie.php'); ?>
<div class="cookie"><p>This website uses cookies to provide you with the best possible browsing experience.
By clicking "Accept," you consent to the use of cookies.
These cookies are essential for the operation of the website and help us analyze site traffic,
personalize content, and improve the overall user experience. Additionally,
third-party cookies may be used for targeted advertising purposes.
However, please note that blocking some types of cookies may impact your experience on the site and the services we are able to offer.
For more information about how we use cookies and your rights regarding your personal data, please review our <a href="#">Privacy Policy</a>.
</p>
<button id="acceptBtn">
<span class="circle1"></span>
<span class="circle2"></span>
<span class="circle3"></span>
<span class="circle4"></span>
<span class="circle5"></span>
<span class="text accept">Accept all</span>
</button>
<button id="discardBtn">
<span class="circle1"></span>
<span class="circle2"></span>
<span class="circle3"></span>
<span class="circle4"></span>
<span class="circle5"></span>
<span class="text discard">Discard all</span>
</button>
</div>
<script type="text/javascript">
// Aggiungi un evento click
document.getElementById("acceptBtn").addEventListener("click", function() {
// Imposta un cookie per indicare l'accettazione
document.cookie = "cookie_accepted=1";
// Nascondi il div dei cookie
document.querySelector(".cookie").style.display = "none";
document.getElementById("log").style.display = "block";
});
document.getElementById("discardBtn").addEventListener("click", function() {
// Imposta un cookie per indicare il rifiuto
document.cookie = "cookie_accepted=0";
// Nascondi il div dei cookie
document.querySelector(".cookie").style.display = "none";
document.getElementById("log").style.display = "none";
});
</script>