bashtube/webroot/login.shs

28 lines
658 B
Plaintext
Raw Normal View History

#!/bin/bash
2021-02-28 17:43:40 +01:00
declare -A strings
if [[ ${post_data[login]} != '' && ${post_data[password]} != '' ]]; then
2021-02-18 01:18:06 +01:00
login "${post_data[login]}" "${post_data[password]}"
status=$?
if [[ $status == 0 ]]; then
if [[ ${get_data[r]} == '' ]]; then
meta[redirect]='/'
else
meta[redirect]="$(echo ${get_data[r]} | sed -s 's/<//g;s/___/?/')"
2023-04-20 02:01:43 +02:00
#meta[redirect]="/watch?v=$(echo ${get_data[r]}"
fi
fi
fi
#source templates/head.sh
source "${cfg[namespace]}/templates/header.shs"
if [[ $status == 1 && $reason != '' ]]; then
2021-02-28 17:43:40 +01:00
strings[reason]="$reason"
2021-03-01 23:53:15 +01:00
else
strings[reason]=""
fi
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/login.html"