Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- ini_set('display_error', '1');
- $DI = new DirectoryIterator('.');
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>lista zdjec w katalogu</title>
- <style type="text/css">
- html,
- body { background:#ccc; padding:0; margin:0; }
- div,
- img { width:300px; height:200px; }
- div { float:left; position:relative; margin:0; padding:0; border:0.1em solid #ccc; }
- div a { position:absolute; bottom:0.5em; background:rgba(255,255,255,0.2); padding:0.5em 1em; text-decoration:none; color:#000; font-weight:bold; font-family:Arial; }
- div a:hover { background:rgba(200,30,30,0.2); }
- div a.raw { left:0.5em; }
- div a.big { right:0.5em; }
- </style>
- </head>
- <body>
- <?php foreach($DI as $path): ?>
- <?php if(!$DI->isDot() && strtolower($DI->getExtension()) == 'jpg'): ?>
- <div>
- <img src="thumb/thumb.<?=$DI->getFilename()?>" />
- <a class="raw" href="<?=substr($DI->getFilename(), 0, strlen($DI->getFilename())-3)?>NEF">NEF</a>
- <a class="big" href="<?=$DI->getFilename()?>">BIG</a>
- </div>
- <?php endif; ?>
- <?php endforeach; ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement