git-interface: Factor out configuration file parsing
[aur.git] / web / html / register.php
blob6c6d52e6b65977a89519d3eeff7d306c55e80319
1 <?php
3 set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
5 include_once('aur.inc.php'); # access AUR common functions
6 include_once('acctfuncs.inc.php'); # access Account specific functions
8 set_lang(); # this sets up the visitor's language
9 check_sid(); # see if they're still logged in
11 if (isset($_COOKIE["AURSID"])) {
12 header('Location: /');
13 exit();
16 html_header(__('Register'));
18 echo '<div class="box">';
19 echo '<h2>' . __('Register') . '</h2>';
21 if (in_request("Action") == "NewAccount") {
22 list($success, $message) = process_account_form(
23 "new",
24 "NewAccount",
25 in_request("U"),
28 in_request("E"),
29 in_request("H"),
30 '',
31 '',
32 in_request("R"),
33 in_request("L"),
34 in_request("HP"),
35 in_request("I"),
36 in_request("K"),
37 in_request("PK"),
39 in_request("CN"),
40 in_request("UN"),
41 in_request("ON"));
43 print $message;
45 if (!$success) {
46 display_account_form("NewAccount",
47 in_request("U"),
50 in_request("E"),
51 in_request("H"),
52 '',
53 '',
54 in_request("R"),
55 in_request("L"),
56 in_request("HP"),
57 in_request("I"),
58 in_request("K"),
59 in_request("PK"),
61 in_request("CN"),
62 in_request("UN"),
63 in_request("ON"));
65 } else {
66 print '<p>' . __("Use this form to create an account.") . '</p>';
67 display_account_form("NewAccount", "", "", "", "", "", "", "", "", $LANG);
70 echo '</div>';
72 html_footer(AURWEB_VERSION);