Hey,
i keep getting an Parse error on this line:
if (is_dir($base."/".$file) && $file != "." && $file !=".." && $file != $thumbs)
Can anyone help me with this?
it is placed in here:
<?php
$page = $_SERVER['PHP_SELF'];
//setting photo width
$column = 5;
//directory
$base = "data";
$thumbs = "thumbs";
//get album
$get_album = $_GET['album'];
if(!$get_album)
{
echo "<p><b> Select a album:</b></p>";
$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
{
if (!is_dir($base."/".$get_album) || strstr($get_album,".") !=NULL || strstr($get_album,"/") !=NULL || strstr($get_album,"\\") !=NULL)
{
echo "Album bestaat niet meer.";
}
else
{
$x = 0;
echo "<p><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/$file' rel='lightbox'><img src='$base/$thumbs/$file' height='100' width='100'></a></td></tr></table><br />";
$x++;
if ($x==$column)
{
echo "<br />";
$x = 0;
}
}
}
closedir($handle);
echo "<p><a href='$page'>Terug naar Album</a>";
}
}
?>
i keep getting an Parse error on this line:
if (is_dir($base."/".$file) && $file != "." && $file !=".." && $file != $thumbs)
Can anyone help me with this?
it is placed in here:
<?php
$page = $_SERVER['PHP_SELF'];
//setting photo width
$column = 5;
//directory
$base = "data";
$thumbs = "thumbs";
//get album
$get_album = $_GET['album'];
if(!$get_album)
{
echo "<p><b> Select a album:</b></p>";
$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
{
if (!is_dir($base."/".$get_album) || strstr($get_album,".") !=NULL || strstr($get_album,"/") !=NULL || strstr($get_album,"\\") !=NULL)
{
echo "Album bestaat niet meer.";
}
else
{
$x = 0;
echo "<p><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/$file' rel='lightbox'><img src='$base/$thumbs/$file' height='100' width='100'></a></td></tr></table><br />";
$x++;
if ($x==$column)
{
echo "<br />";
$x = 0;
}
}
}
closedir($handle);
echo "<p><a href='$page'>Terug naar Album</a>";
}
}
?>