Add sotdlist.php
This commit is contained in:
parent
f0fa494782
commit
cff3091608
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
define("SOTD_LOCATION","/home/khuxkm/code/sotdbot/sotd.json");
|
||||
$sotd = json_decode(file_get_contents(SOTD_LOCATION),TRUE)["stored_data"];
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>SOTD List</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://tilde.team/css/hacker.css">
|
||||
<link rel="stylesheet" href="https://tilde.team/css/fork-awesome.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1><i class="fa fa-music" aria-hidden="true"></i> Song of the Day</h1>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<th>Username</th>
|
||||
<th>Song</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($sotd as $username => $data): ?>
|
||||
<tr><td><?=$username?></td>
|
||||
<td><a href="<?=$data["value"][1]?>"><?=$data["value"][0]?></a></td>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue