-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpermission-denied.html
148 lines (133 loc) · 6.49 KB
/
permission-denied.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE html>
<html>
<head>
<title>Permission Denied | Make-It-All</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
<link href="https://db.onlinewebfonts.com/c/77009ab521bc15b6e38fcc22dd5270f4?family=Churchward+Design+Bold" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@600&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha2/css/bootstrap.min.css">
<link rel="stylesheet" href="permission-denied.css">
</head>
<body onload="checkLogin()">
<nav class="myNav">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">
<img src="logo.PNG" id="logo" />
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" id="dashboard" href="#">Dashboard</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Posts
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="all-posts.html">All Posts</a>
<a class="dropdown-item" href="create-post.html">Create Post</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" id="btnInviteUser" onclick="openForm()" href="#">Invite User</a>
</li>
<li class="nav-item dropdown" id="accountBox">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span id="profileIcon" class="material-symbols-outlined">
account_circle
</span> Account
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="profile.html">My Profile</a>
<a class="dropdown-item logout" href="login.html">Logout</a>
</div>
</li>
</ul>
</div>
</nav>
</nav>
<div class="popup-background" id="inviteuseropaquebg">
<form class="inviteuser-form" action="javascript:getData()" method="get">
<h1>Invite User</h1>
<label for="email"><b>Email</b></label>
<input type="text" placeholder="Enter Email" id="email" name="email">
<label id="emailError" style="color: red; display: none">Email address is not valid</label>
<button type="submit" class="btn" onclick="sendInvite()">Send Invite Link</button>
<button type="button" class="btn cancel" onclick="closeForm()">Close</button>
</form>
</div>
<div id="content" class="container-fluid">
<br>
You do not have permission to access this page!
</div>
<footer class="myFooter">
<div class="footer">
<div class="footer-content">
<div class="footer-section about">
<h1 class="footer-title"> Make-It-All</h1>
<div class="contact-details">
<span><i class="fas fa-phone"></i> 01509 888999</span>
<span><i class="fas fa-envelope"></i> king@make-it-all.co.uk</span>
</div>
</div>
</div>
</div>
</footer>
<script>
var details = sessionStorage.getItem("user");
var role = JSON.parse(details).role;
var email = JSON.parse(details).email;
//Decides which Dash to link to
dashboard.addEventListener("click", function () {
var a = document.getElementById("dashboard");
switch (role) {
case "a":
a.href = "AdminDashboard.html";
break;
case "g":
a.href = "userdash.html";
break;
case "m":
a.href = "accessproject.php";
break;
case 'l':
a.href = "accessproject.php";
break;
default:
a.href = "#";
}
});
var inviteForm = document.getElementById("inviteuseropaquebg");
function openForm() {
inviteForm.style.display = "block";
}
function closeForm() {
inviteForm.style.display = "none";
document.getElementById("email").value = "";
document.getElementById("emailError").style.display = "none";
}
function sendInvite() {
var email = document.getElementById("email").value;
var label = document.getElementById("emailError");
if (email.slice(email.length - 18).toLowerCase() != "@make-it-all.co.uk") {
label.innerHTML = "Email address is not valid";
label.style.color = "red";
label.style.display = "block";
}
else {
label.innerHTML = "Invite sent!";
label.style.color = "#2fe617";
label.style.display = "block";
}
}
</script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha2/js/bootstrap.min.js"></script>
</body>
</html>