X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/e3be85e24011ce42b9c48e19a21b9e7faba72767..2bed41fd9817049d5f8822e381c4f70cc3bf33c8:/foto/index.php
diff --git a/foto/index.php b/foto/index.php
index e9b9521..0acd44e 100644
--- a/foto/index.php
+++ b/foto/index.php
@@ -1,42 +1,44 @@
link;
-if ($User and $User->admin('foto')) {
- $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);
-$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)
{
// assume all album entries are symlinks to archive originals
$target = preg_replace('{^(\.\./)*}', '', readlink($path));
- $thumb = 'thumb/250/' . $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
- $Article->image = "/$img";
+ $Page->image = "/$img";
continue;
}
if (!is_link($img)) continue;