-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrisolti.html
73 lines (70 loc) · 2.71 KB
/
risolti.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
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="utf-8" />
<title>2.0</title>
<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>
<script src="http://localhost/2.0/js/risolti.js"></script>
</head>
<body class="parallax">
<!-- navbar -->
<nav class="navbar" style=" position: -webkit-sticky;
position: sticky;
top: 0;
z-index:1;">
<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="http://localhost/2.0/index.html">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>
<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="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>
<div id="problema"></div>
<div id= "divCommenti"></div>
<div id="problemi"></div>
</body>
</html>