-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
64 lines (60 loc) · 1.96 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE>
<html lang="nl">
<head>
<title>Christmas <?php echo date("Y"); ?></title>
<style>
body{
background-color: green
}
.core{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border: dotted darkred 5px;
padding: 10px;
background-color: #44ab44;
text-align: center;
}
.button{
border: solid black 1px;
padding: 10px;
color: black;
text-decoration: auto;
}
.noicon{
padding-left: 30px;
}
.button:hover{
background-color: lightgreen;
}
</style>
</head>
<body>
<div class="core">
<h1>Merry Christmas and a happy new year!!!</h1>
<br/>
<?php
if(file_exists(getcwd() . "/" . date("Y"))){
?>
<a class="button noicon" href="/<?php echo date("Y"); ?>/index.html">Play this years Christmas game</a><br/><br/><br/>
<?php
}
$files = scandir(getcwd());
foreach($files as $file)
{
if(is_dir($file)&&is_numeric($file))
{
?>
<a class="button noicon" href="/<?php echo $file; ?>/index.html">Play game for Christmas <?php echo $file; ?></a><br/><br/><br/>
<?php
}
}
?>
<br/><br/>
<a class="button" href="https://github.com/AdeRegt/Christmas2020"><img width="20" height="20" src="https://github.com/fluidicon.png"> See code at GitHub</a><br/>
<br/>
<br/>
</div>
</body>
</html>