diff options
Diffstat (limited to 'banners.php')
| -rw-r--r-- | banners.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/banners.php b/banners.php new file mode 100644 index 00000000..48e312f2 --- /dev/null +++ b/banners.php @@ -0,0 +1,22 @@ +<html> +<head> +<title>Lainchan Banners</title> +</head> +<body> +<?php +function listBannersInDir($dir) { + if ($handle = opendir($dir)) { + while (false !== ($entry = readdir($handle))) { + if ($entry != "." && $entry != "..") { + echo "<a href=\"$dir/$entry\"><img src=\"$dir/$entry\" alt=\"$entry\" style=\"width:348px;height:128px\"></a> "; + } + } + closedir($handle); + } +} + +listBannersInDir("banners_priority"); +listBannersInDir("banners"); +?> +</body> +</html> |
