
I got to that point
`// Gallery Class //
class Gallery {
var $albums = NULL;
var $theme;
var $themes;
function Gallery() {
$albumdir = SERVERPATH . "/albums/";
if (!is_dir($albumdir) || !is_readable($albumdir)) {
die("Error: The 'albums' directory cannot be found or is not readable.");
}
$dp = opendir($albumdir);
$albums = array();
while ($file = readdir($dp)) {
if (is_dir($albumdir.$file) && substr($file, 0, 1) != '.') {
$albums[] = $file;
}
}
// Reverse the order to make recently added albums first.
$albums = array_reverse($albums);
// Sorting here? Alphabetical by default.
$this->albums = $albums;
}
function getAlbums($page=0) {
if ($page == 0) {
return $this->albums;
} else {
$albums_per_page = zp_conf('albums_per_page');
return array_slice($this->albums, $albums_per_page*($page-1), $albums_per_page);
}
} `
but what shell I do further? I'm a beginner in php.