-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
62 lines (57 loc) · 2.38 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
<!DOCTYPE html>
<html lang="en">
<link type="text/css" href="../theme.css" rel="stylesheet">
<link rel="shortcut icon" type="image/png" href="../VersionIcon/SM40.png"/>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:image" content="https://jose.heysora.net/SMArchive/VersionIcon/SM40.png" />
<meta property="og:site_name" content="StepMania Archive" />
<meta property="og:description" content="Announcers that you can use to excite more your gameplay."/>
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jose.heysora.net/SMArchive" />
<meta name="title" content="Announcers Archive" />
<meta name="description" content="Announcers that you can use to excite more your gameplay."/>
<meta name="theme-color" content="#f0d01f" />
<title>StepMania Announcers Archive</title>
<?php $CurrentPage = "Announcers"; ?>
</head>
<?php
$JSONContent = file_get_contents( "db.json" );
$decoded_data = json_decode($JSONContent, true);
function GetAuthor($item)
{
if( !array_key_exists('Author', $item) )
return "";
return $item['Author'];
}
?>
<body>
<div id="container">
<?php include '../php/TopPage.php' ?>
<div id="content-container" class="wide-container">
<?php include '../Builds/ArchiveHistoryQuick.php' ?>
<div class="content" id="BuildListing">
<h1>Announcer List</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Author</th>
<th>Sample</th>
</tr>
</thead>
<?php foreach( $decoded_data as $Name=>$Entry ) { ?>
<tr>
<td><a href="https://objects-us-east-1.dream.io/smannouncers/<?php echo $Entry['File'] ?>"><?php echo $Name ?></a></td>
<td><?php echo GetAuthor($Entry) ?></td>
<td><a href="https://objects-us-east-1.dream.io/smannouncers/AudioPreview/<?php echo $Name ?>.ogg">Preview</a></td>
</tr>
<?php } ?>
</table>
</div>
<?php include '../php/Footer.php' ?>
</div>
</div>
</body>
</html>