5 . "$_EXEC/cgilite/logging.sh"
6 . "$_EXEC/cgilite/cgilite.sh"
7 . "$_EXEC/cgilite/session.sh"
8 . "$_EXEC/cgilite/storage.sh"
10 LOCATION="$(PATH "$PATH_INFO")"
11 LOCATION="${LOCATION#/}"
12 LOCATION="${LOCATION%%/*}"
16 printf 'Content-Type: text/html; charset=utf-8\r\n\r\n'
19 [meta name="viewport" content="width=device-width"]
20 [link rel="stylesheet" type="text/css" href="/webchat.css"]
24 [ "$QUERY_STRING" = settings ] && settings_menu
27 } |"$_EXEC/cgilite/html-sh.sed" -u
32 [form #settings method="POST" action="?"
33 [h1 Settings][a .settings href="?" Close]'
35 [a .section href="#nick" Nickname]
36 [div #nick [input name="nickname" value="%s"][submit "action" "nick" Set Cookie]]
37 ' "$(HTML "${nickname#\?}")"
39 [a .section href="#register" Register Nickname]
41 [p Registration will set a permanent Cookie in your Browser.
42 Registration requires neither a password, nor an email address.]
43 [input name="regnick" value="%s"][submit "action" "register" Register]
44 ]' "$(HTML "${nickname#\?}")"
48 . "$_EXEC/usernick.sh"
52 . "$_EXEC/cgilite/file.sh"
53 FILE "$_EXEC/webchat.css"
57 chatfile="$_DATA/${LOCATION}"
62 if [ -d "$_DATA/${LOCATION}" ]; then
63 chatfile="$_DATA/${LOCATION}/?${SESSION_ID}"
71 if [ -d "$_DATA/@${LOCATION#~}" ]; then
72 pubinfo="$_DATA/@${LOCATION#~}/pubinfo"
77 '') yield_page front <<-EOF