-
Notifications
You must be signed in to change notification settings - Fork 0
/
list.php
52 lines (47 loc) · 1.15 KB
/
list.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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Sprout - Voxel Coloring Book</title>
<link rel="stylesheet" href="/sprout/main.css" type="text/css" />
<link rel="shortcut icon" href="http://cdn.spout.org/img/ico/spout.ico" />
</head>
<body>
<table>
<tr>
<td>
<div id="main">
<div class="central">
<a href="/sprout"><img src="/sprout/sprout-logo.png" /></a>
<div id="gallery">
<?php
$files = array();
$times = array();
if ($handle = opendir('final')) {
while (false !== ($entry = readdir($handle))) {
$fname = basename($entry, ".png");
if ($entry != "." && $entry != ".." && substr($fname, -2) != "-t") {
$files[] = $fname;
$times[] = filemtime("final/" . $entry);
}
}
}
array_multisort($times, SORT_DESC, $files);
foreach ($files as $fname) {
?><a href="/sprout/<?php print $fname; ?>"><img src="/sprout/<?php print $fname; ?>-t.png" /></a><?php
}
?>
</div>
</div>
</div>
</td>
</tr>
<tr id="footer">
<td>
<div class="central">
<a href="//forums.spout.org">Continue to the forums</a>
</div>
</td>
</tr>
</table>
</body>
</html>