26 lines
554 B
Bash
Executable file
26 lines
554 B
Bash
Executable file
#!/bin/bash
|
|
|
|
declare -A strings
|
|
|
|
if [[ ${post_data[login]} != '' && ${post_data[password]} != '' ]]; then
|
|
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
|
|
strings[reason]="$reason"
|
|
else
|
|
strings[reason]=""
|
|
fi
|
|
|
|
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/login.t"
|