-
Notifications
You must be signed in to change notification settings - Fork 0
/
pasw_qr_2.html
47 lines (43 loc) · 1.84 KB
/
pasw_qr_2.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Velg lag</title>
<script>
// Angi hvilken QR-kode dette er (1 til 8)
var qrCodeNumber = 2; // Endre dette for hver QR-kode
// Task distribution for each QR code and team
var tasksPerQRCode = {
'1': ['task_1.html', 'task_4.html', 'task_6.html'], // Start tasks for each team
'2': ['task_2.html', 'task_5.html', 'task_7.html'], // Next set of tasks
'3': ['task_3.html', 'task_1.html', 'task_2.html'],
'4': ['task_4.html', 'task_6.html', 'task_3.html'],
'5': ['task_5.html', 'task_7.html', 'task_4.html'],
'6': ['task_6.html', 'task_2.html', 'task_5.html'],
'7': ['task_7.html', 'task_3.html', 'task_1.html'],
'8': ['task_8.html', 'task_8.html', 'task_8.html'] // Final task for all
};
function redirectToTask(teamNumber) {
var password = prompt("Skriv inn lagets passord:");
var correctPasswords = {
'1': 'ostepop',
'2': 'hestesko',
'3': 'oskaroskar'
};
if (password === correctPasswords[teamNumber]) {
var taskPage = tasksPerQRCode[teamNumber][qrCodeNumber - 1];
window.location.href = taskPage;
} else {
alert("Nå har du glemt passordet ditt din ku, det var virkelig ikke så vanskelig");
}
}
</script>
</head>
<body>
<h1>Velg lag</h1>
<button class="button" onclick="redirectToTask('1')">Lag 1</button>
<button class="button" onclick="redirectToTask('2')">Lag 2</button>
<button class="button" onclick="redirectToTask('3')">Lag 3</button>
</body>
</html>