";
// test for the existence of the upload directories, and if they're not there, create them.
if (!file_exists("uploads/ImageSets/"))
{
mkdir("uploads/ImageSets/");
chmod("uploads/ImageSets/", 0777);
}
if (!file_exists("uploads/ImageSets/$IMGSET_Name"))
{
mkdir("uploads/ImageSets/$IMGSET_Name");
chmod("uploads/ImageSets/$IMGSET_Name", 0777);
}
// create a quick gallery of thumbs (without the editing options).
$imagelist = ReadImageDir($IMGSET_Name);
foreach($imagelist as $imagename)
{
$ext = substr($imagename, -3, 3);
if(strtolower($ext) == "jpg" || strtolower($ext) == "gif" || strtolower($ext) == "png")
{
//$output .= "Found image file - ".$imagename."
";
if (substr($imagename, 0, 6) == "thumb_")
{
//This is the thumb so do nothing...
}
else
{
if (!file_exists("uploads/ImageSets/".$IMGSET_Name."/thumb_".$imagename))
{
//$output .= "creating thumb for ".$imagename."
";
//The thumb for this image doesn't exist so create it...
CreateThumb2($IMGSET_Name, $imagename);
$output .= "
";
$output .= "";
$output .= "\n";
}
}
}
if (substr($imagename, 0, 6) == "thumb_")
{
$output .= "
";
$output .= "";
$output .= "\n";
}
}
$output .= "