X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/621fc2f9638a1a92aa8535310e7852de5542f11e..772961fd4e9be46ad340cad1e55ee5f28cc5b968:/foto/index.php?ds=sidebyside diff --git a/foto/index.php b/foto/index.php index a97ec1c..0acd44e 100644 --- a/foto/index.php +++ b/foto/index.php @@ -1,35 +1,37 @@ link; if ($User->admin('foto')) { - $access = '🔓 Openbaar'; - if (!empty($PageAccess)) { - $access = "🔒 Bewoners"; - if ($PageAccess != $rootdir) { + if ($Page->restricted) { + $access = '🔒 Bewoners'; + if ($Page->restricted != $rootdir) { $access .= sprintf(' vanaf %s', - "/$PageAccess", pathinfo($PageAccess, PATHINFO_FILENAME) + "/{$Page->restricted}", pathinfo($Page->restricted, PATHINFO_FILENAME) ); } } + else { + $access = '🔓 Openbaar'; + } print "\n\n"; } $nav = explode('/', $rootdir); $nav[0] = "Foto's"; # override of root 'foto' $title = array_pop($nav); -$Article->title = implode(' ', $nav) . ': ' . $title; +$Page->title = ($nav ? implode(' ', $nav) . ': ' : '') . $title; $link = ''; print "

"; foreach ($nav as $i => $linktitle) { - $link .= '/' . ($i ? $linktitle : $Page); + $link .= '/' . ($i ? $linktitle : $Page->handler); printf('%s →'."\n", $link, $linktitle); } print $title; print "

\n\n"; -if (isset($Article->raw)) { - print $Article->raw; # page intro +if (isset($Page->raw)) { + print $Page->raw; # page intro } function showthumb($path) @@ -65,7 +67,7 @@ if ($imgs = glob("$rootdir/*", GLOB_ONLYDIR)) { $html = ''; $html .= "
$album
"; if (!$User->login and file_exists("$path/.private")) { - $html = ''.$html.''; + $html = ''.$html.''; } $html = "
$html
"; @@ -79,7 +81,7 @@ if ($imgs = glob("$rootdir/*.jpg")) { foreach ($imgs as $img) { if ($img == "$rootdir/index.jpg") { # cover image of current album - $Article->image = "/$img"; + $Page->image = "/$img"; continue; } if (!is_link($img)) continue;