2020-07-16 23:10:31 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-02-28 17:43:40 +01:00
|
|
|
declare -A strings
|
|
|
|
|
2020-07-16 23:10:31 +02:00
|
|
|
if [[ ${post_data[login]} != '' && ${post_data[password]} != '' ]]; then
|
2021-02-18 01:18:06 +01:00
|
|
|
login "${post_data[login]}" "${post_data[password]}"
|
2020-07-16 23:10:31 +02:00
|
|
|
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]}"
|
2020-07-16 23:10:31 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2023-04-19 22:42:30 +02:00
|
|
|
#source templates/head.sh
|
|
|
|
source "${cfg[namespace]}/templates/header.shs"
|
2020-07-16 23:10:31 +02:00
|
|
|
|
|
|
|
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]=""
|
2020-07-16 23:10:31 +02:00
|
|
|
fi
|
|
|
|
|
2023-01-18 01:08:05 +01:00
|
|
|
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/login.html"
|