-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
53 lines (51 loc) · 853 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
44
45
46
47
48
49
50
51
52
53
<html>
<head>
<title>503 Service Temporarily Unavailable</title>
</head>
<body bgcolor="white">
<center>
<h1>503 Service Temporarily Unavailable</h1>
</center>
<style>
.item {
overflow:hidden;
width:500px;
padding-bottom:10px;
margin:0 auto;
}
.item img {
width:500px;
}
/* Mobile Styles */
@media only screen and (max-width: 400px) {
.item {
max-width:100%;
max-height:auto;
}
.item img {
width:100%;
max-width:100%;
}
}
</style>
<?php
if ($handle = opendir('files/')) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
$files[]=$entry;
}
}
closedir($handle);
}
rsort ($files); // reverse Sort
foreach ($files as $entry) {
drawItem($entry);
}
function drawItem($item) {
?>
<div class="item"><img src="files/<?=$item?>" /></div>
<?
}
?>
</body>
</html>