-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1.html
58 lines (57 loc) · 2.09 KB
/
1.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
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<script>
function Portals() {
var usertype = document.getElementById("user-type").value;
var username = document.getElementById("Portalusername").value;
var password = document.getElementById("PortalPassword").value;
if (usertype === "admin") {
if (username === "fahad" && password === "fahad") {
window.location.href = "/AdminPortal/admindashboard.html";
} else if (username === "mehboob" && password === "mehboob") {
window.location.href = "/AdminPortal/admindashboard.html";
} else {
alert("Invalid account credentials. Please try again.");
}
} else if (usertype === "receptionist") {
if (username === "mehboob" && password === "mehboob") {
window.location.href = "/Receptionist/ReceptionistDashboard.html";
} else if (username === "taimoor" && password === "taimoor") {
window.location.href = "/Receptionist/ReceptionistDashboard.html";
} else {
alert("Invalid account credentials. Please try again.");
}
} else if (usertype === "doctor") {
if (username === "fahad" && password === "fahad") {
window.location.href = "/Doctor/DoctorDashboard.html";
} else if (username === "mehboob" && password === "mehboob") {
window.location.href = "/Doctor/DoctorDashboard.html";
} else {
alert("Invalid account credentials. Please try again.");
}
}
}
</script>
</head>
<body>
<h1>Login</h1>
<form id="login-form">
<label for="user-type">User Type:</label>
<select id="user-type">
<option value="admin">Admin</option>
<option value="receptionist">Receptionist</option>
<option value="doctor">Doctor</option>
</select>
<br>
<label for="Portalusername">Username:</label>
<input type="text" id="Portalusername">
<br>
<label for="PortalPassword">Password:</label>
<input type="password" id="PortalPassword">
<br>
<button type="button" onclick="Portals()">Login</button>
</form>
</body>
</html>