bashtube/webroot/login.shs

26 lines
557 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/___/?/')"
fi
fi
fi
source templates/head.sh
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"