SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | error_reporting(E_ALL); | |
3 | ini_set('display_error', '1'); | |
4 | $DI = new DirectoryIterator('.'); | |
5 | ?> | |
6 | <!DOCTYPE html> | |
7 | <html> | |
8 | <head> | |
9 | <title>lista zdjec w katalogu</title> | |
10 | - | <style type="text/css"> |
10 | + | <style type="text/css"> |
11 | - | html, |
11 | + | html, |
12 | - | body { background:#ccc; padding:0; margin:0; } |
12 | + | body { background:#ccc; padding:0; margin:0; } |
13 | - | div, |
13 | + | div, |
14 | - | img { width:300px; height:200px; } |
14 | + | img { width:300px; height:200px; } |
15 | - | div { float:left; position:relative; margin:0; padding:0; border:0.1em solid #ccc; } |
15 | + | div { float:left; position:relative; margin:0; padding:0; border:0.1em solid #ccc; } |
16 | - | 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; } |
16 | + | 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; } |
17 | - | div a:hover { background:rgba(200,30,30,0.2); } |
17 | + | div a:hover { background:rgba(200,30,30,0.2); } |
18 | - | div a.raw { left:0.5em; } |
18 | + | div a.raw { left:0.5em; } |
19 | - | div a.big { right:0.5em; } |
19 | + | div a.big { right:0.5em; } |
20 | - | </style> |
20 | + | </style> |
21 | </head> | |
22 | <body> | |
23 | <?php foreach($DI as $path): ?> | |
24 | <?php if(!$DI->isDot() && strtolower($DI->getExtension()) == 'jpg'): ?> | |
25 | <div> | |
26 | <img src="thumb/thumb.<?=$DI->getFilename()?>" /> | |
27 | <a class="raw" href="<?=substr($DI->getFilename(), 0, strlen($DI->getFilename())-3)?>NEF">NEF</a> | |
28 | <a class="big" href="<?=$DI->getFilename()?>">BIG</a> | |
29 | </div> | |
30 | <?php endif; ?> | |
31 | <?php endforeach; ?> | |
32 | </body> | |
33 | </html> |