if (! is_file($newImgFile))
{
- $ext = strtolower(substr($file, -4));
+ $ext = strtolower(substr($imgFile, -4));
if ($ext == ".jpg")
$img = imagecreatefromjpeg($imgFile);
else
{
$ext = strtolower(substr($file, -4));
if ($ext == ".jpg" or $ext == ".png")
- $imageFiles[] = array( "name" => $file, "url" => getPreview("$realDir/$file"), "link" => dirname($scriptUrlPath)."/view/$shortPath/$file" );
+ $imageFiles[] = array( "name" => $file, "url" => getPreview("$realDir/$file"), "link" => dirname($scriptUrlPath)."/view$shortPath/$file" );
else
$otherFiles[] = array( "name" => $file, "link" => dirname($scriptUrlPath)."/$realDir/$file" );
}