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
| $(document).ready(function() {
$('#gallery1 a').lightBox();
$('#gallery2 a').lightBox();
$('#gallery3 a').lightBox();
});
<div id="gallery1">
<ul>
<?php
$handle=@opendir("gallery1");
$title1="Galerie 1";
while ($gallery1 = @readdir($handle)) {
$extension=substr($gallery1,-3);
if ($gallery1!="." && $gallery1!=".." && (eregi("jpg",$extension) || eregi("JPG",$extension))) { ?>
<li><a href="img/gallery1/<?php echo $gallery1; ?>" title="<?php echo $title; ?>"><img src="img/gallery1/<?php echo $gallery1; ?>" width="72px" height="72px" /></a></li>
<?php }
} ?>
</ul>
</div>
<div id="gallery2">
<ul>
<?php
$handle=@opendir("gallery2");
$title2="Galerie 2";
while ($gallery2 = @readdir($handle)) {
$extension=substr($gallery2,-3);
if ($gallery2!="." && $gallery2!=".." && (eregi("jpg",$extension) || eregi("JPG",$extension))) { ?>
<li><a href="img/gallery2/<?php echo $gallery2; ?>" title="<?php echo $title; ?>"><img src="img/gallery2/<?php echo $gallery2; ?>" width="72px" height="72px" /></a></li>
<?php }
} ?>
</ul>
</div>
<div id="gallery3">
<ul>
<?php
$handle=@opendir("gallery3");
$title3="Galerie 3";
while ($gallery3 = @readdir($handle)) {
$extension=substr($gallery3,-3);
if ($gallery3!="." && $gallery3!=".." && (eregi("jpg",$extension) || eregi("JPG",$extension))) { ?>
<li><a href="img/gallery3/<?php echo $gallery3; ?>" title="<?php echo $title; ?>"><img src="img/gallery3/<?php echo $gallery3; ?>" width="72px" height="72px" /></a></li>
<?php }
} ?>
</ul>
</div> |
Partager