Move registration code to a separate unit
[aur.git] / web / html / register.php
blob014d8026fc60882fdb5b56e8d817326af91fc330
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 process_account_form("new", "NewAccount", in_request("U"), 1, 0,
23 in_request("E"), '', '', in_request("R"),
24 in_request("L"), in_request("I"), in_request("K"),
25 in_request("PK"));
27 } else {
28 print __("Use this form to create an account.");
29 display_account_form("NewAccount", "", "", "", "", "", "", "", $LANG);
32 echo '</div>';
34 html_footer(AURWEB_VERSION);