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'" \
26 [meta name="viewport" content="width=device-width"]
27 [link rel="stylesheet" type="text/css" href="$_BASE/cgilite/common.css"]
28 [link rel="stylesheet" type="text/css" href="$_BASE/rawnet.css"]
29 [title . $(HTML "$title")]
32 [form method=POST action="$_BASE/search/"
33 [input name=search placeholder="Search"]
36 && printf '[div #user_login [a href="%s/login/" Login]]' "$_BASE" \
43 } |"$_EXEC/cgilite/html-sh.sed" -u
47 /favicon.ico) printf '%s\r\n' 'Content-Length: 0' '';;
49 . "${_EXEC}/cgilite/file.sh"
50 FILE "${_EXEC}/${PATH_INFO}"
53 if [ "$USER_ID" ]; then
56 yield_page 'RAW:NET Login' login <<-EOF
62 yield_page 'RAW:NET Register User' register <<-EOF
67 yield_page 'RAW:NET Recover Account' recover <<-EOF
71 /|/channel/*) . "${_EXEC}/page_channel.sh";;
72 /playlist/*) . "${_EXEC}/page_playlist.sh";;
73 /search/*) . "${_EXEC}/page_search.sh";;
74 *) . "${_EXEC}/page_404.sh";;