foto: replace deprecated <strike> element by <s>
[minimedit.git] / foto / index.php
index e9b9521f76b6e5fc36e3094ab6a6d9865c3022f8..850d82a722d49b55b429089aebb6bd02739d3cdf 100644 (file)
@@ -1,16 +1,18 @@
 <?php
 $rootdir = $Page . $Args;
 
-if ($User and $User->admin('foto')) {
-       $access = '🔓 Openbaar';
-       if (isset($PageAccess)) {
-               $access = "🔒 Bewoners";
+if ($User->admin('foto')) {
+       if (!empty($PageAccess)) {
+               $access = '<span class="icon icon-locked">&#x1F512;</span> Bewoners';
                if ($PageAccess != $rootdir) {
                        $access .= sprintf(' vanaf <a href="%s">%s</a>',
                                "/$PageAccess", pathinfo($PageAccess, PATHINFO_FILENAME)
                        );
                }
        }
+       else {
+               $access = '<span class="icon icon-locked">&#x1F513;</span> Openbaar';
+       }
        print "<aside>$access</aside>\n\n";
 }
 
@@ -36,7 +38,7 @@ 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 = '<img src="/'.$cover.'" />';
                $html .= "<figcaption>$album</figcaption>";
-               if (empty($User) and file_exists("$path/.private")) {
-                       $html = '<strike title="bewoners">'.$html.'</strike>';
+               if (!$User->login and file_exists("$path/.private")) {
+                       $html = '<s title="bewoners">'.$html.'</s>';
                }
                $html = "<figure>$html</figure>";