$rootdir = $Page . $Args;
-if (!empty($User['admin'])) {
+if ($User and $User->admin) {
$access = '🔓 Openbaar';
if (isset($PageAccess)) {
$access = "🔒 Bewoners";
$nav = explode('/', $rootdir);
$nav[0] = "Foto's"; # override of root 'foto'
$title = array_pop($nav);
+$Place['title'] = implode(' ', $nav) . ': ' . $title;
$link = '';
print "<h2>";
if ($imgs = glob("$rootdir/*.jpg")) {
print '<ul class="gallery album">'."\n";
foreach ($imgs as $img) {
- if ($img == "$rootdir/index.jpg") continue;
+ if ($img == "$rootdir/index.jpg") {
+ # cover image of current album
+ $Place['image'] = "/thumb/640x/$img";
+ continue;
+ }
if (!is_link($img)) continue;
print '<li>'.showthumb($img);
}