Topic: Question gallery
Hi I am trying to create a gallery and I have this data:
This would be what generates the gallery locate in admin/themes/default
path = $path;
//---Save a fix all files in directory
$folder = opendir($this->path);
while ($fil = readdir($folder)) {
//---If not a dir
if(!is_dir($fil)){
$arr = explode('.', $fil);
if(count($arr) > 1){
//---Save the names
$this->files[] = $fil;
}
}
}
//---Close dir
closedir($folder);
//---Sort alphabetically arrangement
sort($this->files);
}
function show($area = 500, $width = 100, $space = 10){
//---Create the gallery with the names of all files
$total = count($this->files);
$cont = 0;
echo '';
}
}
?>And this would call
loadFolder('public/uploads/theme-photos'); // gallery folder
$mygallery->show(960, 300, 10); // 960 content 300 photos and 10 margin
?>Preview
this is correct or would have serious security problems?

