3 . "$_EXEC/cgilite/cgilite.sh"
7 [ $# = 0 ] && set -- "*"
9 printf '<div class="macro gallery">'
12 [ "$page" = "$glob" ] && page=./
13 [ ! "$page" ] && page=/
15 acl_read "$(page_abs "${page}")" \
16 && attachment_glob "$glob"
18 | grep -xiE '.*\.jpe?g|.*\.png|.*\.gif' \
19 | while read attachment; do
22 printf '<a href="%s"><img src="%s"></a>' \
23 "${attachment%/*}/[attachment]/${attachment##*/}" "${attachment}"
26 printf '<a href="%s"><img src="%s"></a>' \
27 "[attachment]/${attachment}" "${attachment}"