5 path="$(HTML "${ITEM}/$1")"
6 printf '[a .list .dir href="%s" %s]' \
12 path="$(HTML "$ITEM/$1")"
13 printf '[div .list .file [a href="%s" [img src="%s?a=thumbnail"] %s]]' \
14 "$path" "$path" "$name"
18 [ "$ITEM" ] && printf '..\n'
20 find ./ -type d -mindepth 1 -maxdepth 1 \
21 -exec stat -c '%Y %n' '{}' +
23 | { [ "$(GET o)" = Date ] && sort -rn || sort -k 2; } \
29 find ./ -type f -mindepth 1 -maxdepth 1 \
30 -exec stat -c '%Y %n' "${f#./}" '{}' + 2>&-
32 | { [ "$(GET o)" = Date ] && sort -rn || sort -k 2; } \
39 -exec stat -c '%Y %n' '{}' +
41 | { [ "$(GET o)" = Date ] && sort -rn || sort -k 2; } \
45 printf 'Content-Type: text/html;charset=utf-8\r\n\r\n'
47 "$_EXEC/cgilite/html-sh.sed" <<-EOF
49 [html [head [title Listing]
50 [link rel=stylesheet href="/style.css" ]
53 [input type=checkbox #t_prefs .toggle ][label for=t_prefs ⚙]
55 $(if [ "$(COOKIE mode)" = index ]; then
56 list_tree |while read -r file; do list_file "$file"; done
58 list_dirs |while read -r dir; do list_dir "$dir"; done
60 list_files |while read -r file; do list_file "$file"; done