mkdir -p "${_DATA}/cache" "${_DATA}/mappings" "${_DATA}/export" "${_DATA}/lock" "${_DATA}/ical" "${_DATA}/vcard"
-debug() {
- local dbg=/dev/stderr
- if [ ! "$DEBUG" ]; then
- [ "$#" -gt 0 ] && : || cat;
- elif [ "$#" -gt 0 ]; then
- printf '%s\n' "$@" >>"$dbg"
- else
- tee -a "$dbg"
- fi
-}
-
-debug() {
- local dbg=/dev/stderr
- if [ ! "$DEBUG" ]; then
- [ "$#" -gt 0 ] && : || cat;
- elif [ "$#" -gt 0 ]; then
- printf '%s\n' "$@" >>"$dbg"
- else
- tee -a "$dbg"
- fi
-}
-
. "$_EXEC/cgilite/cgilite.sh"
. "$_EXEC/cgilite/session.sh"
[html [head
[title Lobster]
[meta name="viewport" content="width=device-width"]
+ [link rel="stylesheet" type="text/css" href="/cgilite/common.css"]
[link rel="stylesheet" type="text/css" href="/style.css"]
'
[ -n "$style" ] && printf '
printf '
] [body #top class="%s"
' "$class"
- printf '[ul .menu [li [a "/cards/" . %s]][li [a "/courses/" . %s]]]' "$(l10n cards)" "$(l10n courses)"
[ "$message" ] && printf '[p #message\n%s\n]' "$(l10n "$message")"
cat
printf '] ]'
case ${_PATH} in
/) REDIRECT /cards/
;;
-# /export/*.pdf) . "$_EXEC/cgilite/file.sh"
-# FILE "${_DATA}/${_PATH}" "application/pdf"
-# ;;
-# /export/*) . "$_EXEC/cgilite/file.sh"
-# FILE "${_DATA}/${_PATH}"
-# ;;
*)
if [ -d "${_EXEC}/${_PATH}" -a -x "${_EXEC}/${_PATH}/index.cgi" ]; then
. "${_EXEC}/${_PATH}/index.cgi"