List priority banners in banners.php.
This commit is contained in:
parent
afc2d2e4e1
commit
5cf54dbce0
15
banners.php
15
banners.php
@ -4,14 +4,19 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
if ($handle = opendir('banners')) {
|
function listBannersInDir($dir) {
|
||||||
while (false !== ($entry = readdir($handle))) {
|
if ($handle = opendir($dir)) {
|
||||||
if ($entry != "." && $entry != "..") {
|
while (false !== ($entry = readdir($handle))) {
|
||||||
echo "<a href=\"banners/$entry\"><img src=\"banners/$entry\" alt=\"$entry\" style=\"width:348px;height:128px\"></a> ";
|
if ($entry != "." && $entry != "..") {
|
||||||
|
echo "<a href=\"$dir/$entry\"><img src=\"$dir/$entry\" alt=\"$entry\" style=\"width:348px;height:128px\"></a> ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
closedir($handle);
|
||||||
}
|
}
|
||||||
closedir($handle);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
listBannersInDir("banners_priority");
|
||||||
|
listBannersInDir("banners");
|
||||||
?>
|
?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user