blob: 71bd87ba30cb4a67573794b52fc14de28ad59d57 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
<?php
/*
Displays the register page and possible errors. Users specify their username and password and email address to register. As this page is invite-only users must enter their invite-key aswell.
TODO the email cannot differ from the address the mail was sent to.
It has already been checked that the user isn't already logged in.
$_GET["reason"] can have the following values:
password: Specifies that the password wasn't the same in both fields. The user is not registered.
database: Specifies that the request could not be fullfilled due to a database error. The user is not registered.
encoding: Specifies that the request could not be fullfilled due to invalid symbols in the password. TODO we should support the whole UTF-8
prohibited: Specifies that the request could not be fullfilled because the account has been marked "blocked"
TODO success?
TODO provide the entered data if an error occurred.
TODO username?
TODO email?
TODO invite-key?
==================================================================================================================================================
*/
?>
<?php include("static/header.html");?>
<link rel="stylesheet" type="text/css" href="/static/register.css">
<div class="register-area">
<h1 class="register-area"> Register </h1>
<div class="register-area" id="register-info-bar">
<?php if(isset($_GET['reason']) && $_GET['reason'] == 'password'){
echo '<h1 id="register-error">Passwords don't match</h1>
';
}elseif(isset($_GET['reason']) && $_GET['reason'] == 'encoding'){
echo '<h1 id="register-error">The password contains unsupported characters</h1>
';
}elseif(isset($_GET['reason']) && $_GET['reason'] == 'database'){
echo '<h1 id="register-error"> Internal Error. Please contact admin</h1>
';
}elseif(isset($_GET['reason']) && $_GET['reason'] == 'prohibited'){
echo '<h1 id="register-error">Activation of your account is prohibited</h1>
';
}?>
</div>
<form id="register-form" action="/register" method='post'>
<input type="text" placeholder="username" name="username" id="username-input" class="register-input" required>
<input type="password" placeholder="password" name="pswd" id="password-input" class="register-input" required>
<input type="password" placeholder="repeat password" name="2ndpswd" id="password-repeat-input" class="register-input" required>
<input type="text" placeholder="invite-key" name="key" id="key-input" class="register-input" required>
<input type="email" placeholder="email" name="email" id="email-input" class="register-input" required>
<input type="submit" name="register" id="button-input" class="register-input" value="register">
</form>
</div>
<?php include("static/footer.html");?>
|