6 . "$_EXEC/cgilite/logging.sh"
7 . "$_EXEC/cgilite/cgilite.sh"
8 . "$_EXEC/cgilite/session.sh"
9 . "$_EXEC/cgilite/storage.sh"
11 LOCATION="$(PATH "$PATH_INFO")"
12 LOCATION="${LOCATION#/}"
13 LOCATION="${LOCATION%%/*}"
17 printf '%s\r\n' 'Content-Type: text/html; charset=utf-8' \
18 "Content-Security-Policy: script-src 'none'" \
22 [meta name="viewport" content="width=device-width"]
23 [link rel="stylesheet" type="text/css" href="/webchat.css"]
27 [ "$QUERY_STRING" = settings ] && settings_menu
30 } |"$_EXEC/cgilite/html-sh.sed" -u
35 [form #settings method="POST" action="?"
36 [hidden "session_key" "%s"]
37 [h1 Settings][a .settings href="?" Close]'
39 [a .section href="#nick" Nickname]
40 [div #nick [input name="nickname" value="%s"][submit "action" "nick" Set Cookie]]
41 ' "$SESSION_KEY" "$(HTML "${nickname#\?}")"
43 [a .section href="#register" Register Nickname]
45 [p Registration will set a permanent Cookie in your Browser.
46 Registration requires neither a password, nor an email address.]
47 [input name="regnick" value="%s"][submit "action" "register" Register]
48 ]' "$(HTML "${nickname#\?}")"
52 . "$_EXEC/usernick.sh"
56 . "$_EXEC/cgilite/file.sh"
57 FILE "$_EXEC/webchat.css"
61 chatfile="$_DATA/${LOCATION}/channel"
66 if [ -d "$_DATA/${LOCATION}" ]; then
67 chatfile="$_DATA/${LOCATION}/?${SESSION_ID}"
75 if [ -d "$_DATA/@${LOCATION#~}" ]; then
76 pubinfo="$_DATA/@${LOCATION#~}/pubinfo"
81 '') yield_page front <<-EOF