Index of galleries at blackshell
$REAL_BASE="/htdocs/pub/gallery";
$dir=opendir($REAL_BASE);
if(!$dir)
{
echo "
Error: I cannot read the directory.
\n";
}
else
{
$cnt=0;
$line=0;
while (($file=readdir($dir))!==false)
if($file!= '.' && $file!='..')
{
$rpn=realpath($REAL_BASE ."/" .$file);
if(is_dir($rpn))
{
if($cnt==0)
{
echo "
";
}
$cnt++;
if($line==0)
echo "\n";
echo " "
.$file ." | \n";
if($line==3)
{
$line=0;
echo "
\n";
}
else
$line++;
}
}
if($cnt==0)
echo"Sorry, there's no gallery to index.\n
\n";
else
{
if($line!=0)
echo " | \n";
echo "
\n";
}
closedir($dir);
}
?>
Generated by gallery index for gallery.sh.