<?php } ?> </form> <?php } else { // Load all images $images = fileList($album_path); $imagethumbs = array(); $imginfo = array(); if (count($images) > 0) { foreach ($images as $index => $file) { $imagethumbs[$index] = '../../../media/albums/' . $album . '/_thumbs/' . $file; $thumb_path = $album_path . '/_thumbs/' . $file; $img_path = $album_path . '/' . $file; $imginfo[$index] = calc_thumb_padding($img_path, $thumb_path); } } ?> <h2><?php echo $ccms['lang']['album']['manage']; ?> </h2> <form action="lightbox.Process.php?page_id=<?php echo $page_id; ?> &album=<?php echo $album; ?> &action=del-images" accept-charset="utf-8" method="post" id="album-pics"> <div class="right">
if (is_array($imginfo)) { $show_thumb = $imginfo['show']; } switch ($show_thumb) { case 1: echo "\n<div class=\"album-item\">"; echo "<a rel=\"imagezoom[{$album}]\" href=\"{$album_url}/{$album}/{$content}\" title=\"{$caption}\">"; echo "<img src=\"" . $album_url . "/" . $album . "/_thumbs/" . $content . "\" " . $imginfo['style'] . " />"; echo "</a></div>\n"; break; case 0: default: // If album does exist, but no contents (empty album) echo "\n<div class=\"album-item\">"; $thumb_path = BASE_PATH . "lib/modules/lightbox/resources/empty.png"; $imginfo = calc_thumb_padding($thumb_path); echo "<img src=\"" . $cfg['rootdir'] . "lib/modules/lightbox/resources/empty.png\" " . $imginfo['style'] . " />"; echo "</div>\n"; break; case 2: // Otherwise show the first image of non-empty album and scale it to 80x80 echo "\n<div class=\"album-item\">"; echo "<a rel=\"imagezoom[{$album}]\" href=\"{$album_url}/{$album}/{$content}\" title=\"{$caption}\">"; echo "<img src=\"" . $album_url . "/" . $album . "/" . $content . "\" " . $imginfo['style'] . " />"; echo "</div>\n"; break; } } } else { echo '<p> </p><p>' . $ccms['lang']['system']['error_value'] . '</p>'; }