3 USER_REQUIREEMAIL=false
5 . "${_EXEC:-${0%/*}}"/cgilite/cgilite.sh
6 . "$_EXEC"/cgilite/session.sh nocookie
7 . "$_EXEC"/cgilite/users.sh
9 PATH_INFO="$(PATH "/${PATH_INFO#${_BASE}}")"
11 export MD_HTML="false"
12 if [ "$(which awk)" ]; then
13 markdown() { awk -f "$_EXEC/cgilite/markdown.awk"; }
15 markdown() { busybox awk -f "$_EXEC/cgilite/markdown.awk"; }
19 title="${1:-RAW:NET}" page="$2"
20 printf '%s\r\n' 'Content-Type: text/html; charset=utf-8' \
21 "Content-Security-Policy: script-src 'none'" \
25 [meta name="viewport" content="width=device-width"]
26 [link rel="stylesheet" type="text/css" href="%s/cgilite/common.css"]
27 [link rel="stylesheet" type="text/css" href="%s/rawnet.css"]
30 ' "$_BASE" "$_BASE" "$(HTML "$title")" "$page"
33 [form method=POST action="%s/search/"
34 [input name=search placeholder="Search"]
39 } |"$_EXEC/cgilite/html-sh.sed" -u
43 /favicon.ico) printf '%s\r\n' 'Content-Length: 0' '';;
45 . "${_EXEC}/cgilite/file.sh"
46 FILE "${_EXEC}/${PATH_INFO}"
49 if [ "$USER_ID" ]; then
52 yield_page 'RAW:NET Login' login <<-EOF
58 yield_page 'RAW:NET Register User' register <<-EOF
63 yield_page 'RAW:NET Recover Account' recover <<-EOF
67 /|/channel/*) . "${_EXEC}/page_channel.sh";;
68 /playlist/*) . "${_EXEC}/page_playlist.sh";;
69 /search/*) . "${_EXEC}/page_search.sh";;
70 *) . "${_EXEC}/page_404.sh";;