-if (!function_exists('showthumb')) {
-function showthumb($path)
-{
- // assume all album entries are symlinks to archive originals
- $target = preg_replace('{^(\.\./)*}', '', readlink($path));
- $thumb = 'thumb/262/' . $target;
-
- @list ($order, $size, $title) = explode(':', pathinfo($path, PATHINFO_FILENAME), 3);
- $imgtag = 'img src="/'.$thumb.'"';
- if ($title) {
- $imgtag .= ' title="'.htmlspecialchars(urldecode($title)).'"';
- }
- if ($size) {
- $imgtag .= ' data-size="'.$size.'"';
- }
-
- return sprintf('<a href="/%s"><%s /></a>'."\n", $target, $imgtag);
-}
-}
-