bashtube/webroot/register.shs

23 lines
487 B
Bash
Executable file

#!/bin/bash
declare -A strings
if [[ ${post_data[login]} != '' && ${post_data[password]} != '' ]]; then
register ${post_data[login]} ${post_data[password]}
status=$?
if [[ $status == 0 ]]; then
meta[redirect]='/'
fi
fi
#source templates/head.sh
source "${cfg[namespace]}/templates/header.shs"
if [[ $status == 1 && $reason != '' ]]; then
strings[reason]="$reason"
else
strings[reason]=""
fi
render strings "${cfg[namespace]}/templates/themes/${cfg[template]}/register.html"