-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathold.php
61 lines (56 loc) · 1.22 KB
/
old.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Random kitteh of the now</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<style type="text/css">
img {
display:block;
margin-left: auto;
margin-right: auto;
border: 15px black solid;
border-radius: 15px;
-moz-border-radius: 15px;
}
body {
background-image: url('bg.png');
}
h1 {
text-align: center;
color:white;
text-shadow: white 0px 0px 10px;
}
#footer {
color: gray;
font-size:0.5em;
}
a {
color: gray;
}
</style>
</head>
<body>
<h1>Random lolcat</h1>
<p>
<?
$dir = opendir("/srv/http/lolcats/imgs");
if ($dir) {
$files = array();
while ($file = readdir($dir)) {
if (!is_dir($file)) {
$files[] = $file;
}
}
closedir($dir);
$file = $files[rand(0, count($files))];
print "<a href='http://lolcats.iskrembilen.com/old.php'><img src='imgs/" . $file . "' alt='lolcat' /></a>";
print "<a href='imgs/" . $file . "'>Link to image</a>";
} else {
die("Unable to open image folder");
}
?>
</p>
<p id="footer"> © 2010 lolwat</p>
</body>
</html>