-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
91 lines (82 loc) · 2.98 KB
/
index.html
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html lang="it">
<head>
<title>2.0</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="http://localhost/2.0/css/main.css">
<script src="http://localhost/2.0/js/menu.js"></script>
</head>
<body background="messina.jpg">
<div class="container">
<!-- navbar -->
<nav class="navbar">
<span class="open-slide">
<a href="#" onclick="openSlideMenu()">
<svg width="30" height="30">
<path d = "M0,5 30,5" stroke="#fff" stroke-width="5"/>
<path d = "M0,14 30,14" stroke="#fff" stroke-width="5"/>
<path d = "M0,23 30,23" stroke="#fff" stroke-width="5"/>
</svg>
</a>
</span>
<ul class="navbar-nav">
<li><a href="#">Home</a></li>
<li><a href="http://localhost/2.0/problemi.html">Naviga Problemi</a></li>
<li><a href="http://localhost/2.0/risolti.html">Naviga Problemi Risolti</a></li>
<li><a href="http://localhost/2.0/report.html">Riporta Problema</a></li>
<li><a href="http://localhost/2.0/login.html">Login/Registrati</a></li>
<li><a href="http://localhost/2.0/cerca.html"> Cerca Problemi</a><li>
<button id="p"style="background-color:#3b5998; color:white; border:none;margin-top:15px;">LogOut</button>
</ul>
<script>
//verifico se l'utente è loggato
var logged = document.cookie.substring(document.cookie.indexOf("secretID:"),document.cookie.indexOf(";"));
var a = logged.split("=");
var id = parseInt(a[1]);
if(!isNaN(id)){
document.getElementById("p").style.visibility="visibile";
}else{
document.getElementById("p").style.visibility="hidden";
}
document.getElementById("p").addEventListener("click",logout);
//funzione di logout
function logout(){
var d = new Date();
d.setTime(d.getTime() *0);
var expires = "expires="+ d.toUTCString();
console.log(document.cookie);
console.log(document.cookie["secretID"]);
//document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
document.cookie="secretID"+"="+document.cookie+";"+expires+"path=/"
console.log(document.cookie);
}
</script>
</nav>
<!--Menu a scomparsa-->
<div id="side-menu" class="side-nav">
<a href="#" class="btn-close" onclick="closeSlideMenu()">×</a>
<a href="#">Home</a>
<a href="#">Naviga Problemi</a></a>
<a href="#">Riporta Problema</a>
<a href="#">Login/Registrati</a>
</div>
<!-- main body-->
<div class="stripe">
<h1>BENVENUTO NEL PORTALE Problem Solver </h1>
<p>
<b>
riporta i tuoi problemi o consulta i problemi già riportati navigando tramite il menù soprastante
</b>
</p>
</div>
<div></div>
<!-- footer-->
<div class="footer">
<p><b>
Se non acconsenti all'utilizzo dei cookies non potrai segnalare problemi o commentarli ma solo prenderne visione
</b></p>
</div>
</div>
</body>
</html>