26 lines
596 B
Plaintext
26 lines
596 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
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
|
||
|
|
||
|
if [[ $status == 1 && $reason != '' ]]; then
|
||
|
echo $reason
|
||
|
fi
|
||
|
|
||
|
echo "<h1>Register</h1>
|
||
|
<form method='post'>
|
||
|
<label for='login'>Login:</label>
|
||
|
<input type='text' name='login'><br>
|
||
|
<label for='password'>Password:</label>
|
||
|
<input type='password' name='password'><br>
|
||
|
<input type='submit' value='Register'>
|
||
|
</form>
|
||
|
(please make sure that you're connecting over SSL)"
|