-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.html
More file actions
30 lines (29 loc) · 765 Bytes
/
main.html
File metadata and controls
30 lines (29 loc) · 765 Bytes
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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Users Management System using JS </title>
<link rel="stylesheet" href="bootstrap.min.css">
</head>
<body>
<script>
if(sessionStorage.is_logged_in === undefined) {
alert("You are Not Allowed to view this page Login first");
window.location = "login.html";
}
</script>
<div class="container">
<div class="col-md-12">
<h1>Welcome Suleman!</h1>
<h5>You are Now logged in</h5>
<a href="#" class="btn btn-info" onclick="logout()">Logout</a>
</div>
</div>
<script>
function logout() {
sessionStorage.removeItem("is_logged_in");
location.reload();
}
</script>
</body>
</html>