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"]
26 } |"$_EXEC/cgilite/html-sh.sed" -u
31 [input #check_settings type="checkbox"][label for=check_settings Settings]
33 [h1 Settings][label for=check_settings Close]
34 [input #set_nick type=radio name="setting" value="nick" selected][label for=set_nick Nickname]
35 [div [input name="nickname" value="%s"][submit "action" "nick" Set Cookie]]
37 ' "$(HTML "${nickname#\?}")"
41 \&?*) chatfile="$_DATA/${LOCATION}"
45 @?*) if [ -d "$_DATA/${LOCATION}" ]; then
46 chatfile="$_DATA/${LOCATION}/?${SESSION_ID}"
53 ~?*) if [ -d "$_DATA/@${LOCATION#~}" ]; then
54 pubinfo="$_DATA/@${LOCATION#~}/pubinfo"
62 FILE "$_EXEC/webchat.css"
69 case "$page $(POST action)" in
71 front\ *) yield_page front <<-EOF