Hi all, i've set this script for my gallery, it works, it display me the name of the albums, but when i click to see the pictures inside, the page is blank, and also don't appear the "Back to the albums" link, i can't find the error in the code...
<html>
<head>
<script type="text/javascript" src="../lightbox2.05/js/lightbox.js">
</script>
</head>
<body>
<?php
$page = $_SERVER['PHP_SELF'];
//settings
$column = 5;
//directories
$base = "carrelli_noleggio";
$thumbs = "thumbs";
// get album
$get_album = $_GET['album'];
//if no album selected
if (!$get_album) {
echo "<b>Select an album:</b><p />";
//find each album and display as links
$handle = opendir($base);
while (($file = readdir($handle))!==FALSE)
{
if (is_dir($base."/".$file) && $file != "." && $file != ".." && $file != $thumbs)
{
echo "<a href='$page?album=$file'>$file</a><br />";
} }
closedir($handle); }
else {
//check if album exist, and additional security checks
if (!is_dir($base."/".$get_album) || strstr($get_album,".") !=NULL || strstr($get_album,"/") !=NULL || strstr($get_album,"\") !=NULL) {
echo "Album doesn't exist."; }
else {
$x = 0;
echo "<b>$get_album</b><p />";
$handle = opendir($base."/".$get_album);
while (($file = readdir($handle)) !== FALSE)
{
if ($file != "." && $file != "..")
{
echo "<table style='display:inline;'><tr><td><a href='$base/$get_album/$files' ref='lightbox'<img src='$base/$thumbs/$file' height='100' width'100'></a></td></tr></table>";
$x++;
if ($x==$column)
{
echo"<br />";
$x = 0;
}
}
}
closedir($handle);
echo "<p /><a href='$page>Back to albums</a>"; } }
?>
</body>
</html>