X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/78b500b4027c74ccf7c4bf887183918f37307ddd..50f9b29cc21f5adef555d3cf21940124ceadb0eb:/foto/index.php
diff --git a/foto/index.php b/foto/index.php
index ee37df1..0acd44e 100644
--- a/foto/index.php
+++ b/foto/index.php
@@ -1,42 +1,44 @@
link;
-$rootdir = $Page . $Args;
-
-if (!empty($User['admin'])) {
- $access = 'ð Openbaar';
- if (isset($PageAccess)) {
- $access = "ð Bewoners";
- if ($PageAccess != $rootdir) {
+if ($User->admin('foto')) {
+ 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);
-$Place['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";
-print $intro;
+if (isset($Page->raw)) {
+ print $Page->raw; # page intro
+}
function showthumb($path)
{
// assume all album entries are symlinks to archive originals
$target = preg_replace('{^(\.\./)*}', '', readlink($path));
- $thumb = 'thumb/200/' . $target;
+ $thumb = 'thumb/262/' . $target;
@list ($order, $size, $title) = explode(':', pathinfo($path, PATHINFO_FILENAME), 3);
$imgtag = 'img src="/'.$thumb.'"';
@@ -64,8 +66,8 @@ if ($imgs = glob("$rootdir/*", GLOB_ONLYDIR)) {
$html = '';
$html .= "$album";
- if (empty($User) and file_exists("$path/.private")) {
- $html = ''.$html.'';
+ if (!$User->login and file_exists("$path/.private")) {
+ $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
- $Place['image'] = "/thumb/640x/$img";
+ $Page->image = "/$img";
continue;
}
if (!is_link($img)) continue;
@@ -89,3 +91,5 @@ if ($imgs = glob("$rootdir/*.jpg")) {
include 'foto/album.inc.php';
}
+
+return;