Kerroch - 2005-09-27 16:32:06
Hello,
I propose some little modifications for the class called class.image.php.
If there is an image which has not a good extension,the number of images displayed is not good.
I have added a variable named $invalid which decrease the number of invalid image from the total number of files in the folder.
class AffichImage
{
// show directory content
function showDir($dir, $i, $lar, $lon, $lin)
{
.......script .....
if($tmp[1] == 'jpg' OR $tmp[1] == 'bmp' OR $tmp[1] == 'gif' OR $tmp[1] == 'png' OR $tmp[1] == 'tga' OR $tmp[1] == 'tif' OR $tmp[1] == 'eps')
{
print("<td>") ;
print("<table class='box' bgcolor='#9ABBC1' cellspacing='0'
script ......script.....
print("</tr></table>\n") ;
print("</td>") ;
}
else
{$x-- ;
$invalid++; // modified}
}
print("</tr></table>\n") ;
print("<br><small>" . ($k-$invalid). " Images displayed<b></b></small>") ;
}
closedir($checkDir);
}
}
}
best regards
kerroch