-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
43 lines (40 loc) · 989 Bytes
/
index.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
<html>
<head>
<style>
.wrapper {
width: 500px;
margin: 0 auto;
text-align: center;
width: 400px;
}
input[type="submit"] {
height: 200px;
background: red;
border: 2px solid black;
border-radius: 8px;
color: white;
font-family: "Big John", sans-serif;
font-size: 25px;
}
</style>
</head>
<body>
<div class="wrapper" >
<h1>Velkommen <?php echo $_SERVER['REMOTE_USER']; ?>!</h1>
<?php
$msg = $_GET['msg'];
if ($msg) {
echo "<h2>" . $msg . "</h2>";
}
$logFile = file('coffee_log.txt');
$lastDrink = explode(' ', $logFile[count($logFile) - 1])[1];
$lastDrink = date("H:i:s - M-d", $lastDrink);
echo "Last drink: " . $lastDrink;
?>
<form action="register.php" >
<input type="Submit" value="Jeg drikker kaffe!">
</form>
<p><a href="list.php">Se liste over registreringer</a></p>
</div>
</body>
</html>