forked from Julikona/batterybtg27
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
30 lines (29 loc) · 1.12 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
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Redirecting...</title>
<script>
window.onload = function() {
// Überprüfen, ob die Login-Daten in der Session gespeichert sind
const username = sessionStorage.getItem("username");
const role = sessionStorage.getItem("role");
if (username && role) {
// Wenn die Daten vorhanden sind, weiter zur Main-Seite
if (role === "tutor") {
window.location.href = "main-tutor.html";
} else {
window.location.href = 'main-student.html';
}
} else {
// Wenn die Daten nicht vorhanden sind, weiter zur Login-Seite
window.location.href = "login.html";
}
};
</script>
</head>
<body>
<p>Sie werden in Kürze zur richtigen Seite weitergeleitet...</p>
</body>
</html>