-
Notifications
You must be signed in to change notification settings - Fork 0
/
scores.php
57 lines (54 loc) · 1.54 KB
/
scores.php
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
<?php
session_save_path(__DIR__ . '/sessions/');
session_name('shutTheBox');
session_start();
if($_SESSION['loggedin'] === false or !isset($_SESSION['loggedin'])){
header('Location: login.php');
exit;
}
?>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="./username.js" defer></script>
<script src="./welcome.js" defer></script>
<script src="./scores.js" defer></script>
<link rel='stylesheet' href='style.css'>
<title>Shut The Box</title>
</head>
<body>
<header>
<h1>
Shut The Box
</h1>
</header>
<section>
<h2>
Scores
</h2>
<p>
Well done! Here are the scores so far...
</p>
<p id='scores'>
<?php
if(file_exists("scores.txt")){
echo file_get_contents("scores.txt");
}
?>
</p>
</section>
<fieldset>
<input type="button" id="btn" value="PLAY AGAIN!!!" onclick="redirect();">
</fieldset>
<fieldset>
<input type="button" id="btn" value="Force update / start updating" onclick="force_print();">
<input type="button" id="btn" value="Stop updating" onclick="stop_printing();">
</fieldset>
<footer>
<hr>
<small>© Jion Kim, 2021 (the year after the world ended)</small>
</footer>
</body>
</html>