opensim-www – Blame information for rev 10
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | eva | 1 | <?php |
2 | |||
3 | require_once 'lib/recaptchalib.php'; |
||
10 | eva | 4 | require_once 'lib/wasRemoteAdmin.php'; |
1 | eva | 5 | require_once 'lib/uuid.php'; |
6 | |||
7 | define('RECAPTCHA_PRIVATE_KEY', '6Lcz9ukSAAAAAC3u90rcOIdnNnaK_JgMjrOsSzZr'); |
||
8 | |||
9 | ?> |
||
10 | <!DOCTYPE html> |
||
11 | <html> |
||
12 | <link rel="stylesheet" href="css/green.css" type="text/css" /> |
||
13 | <body> |
||
14 | <div> |
||
15 | <img src="img/spectacledowl-logo.png"> |
||
16 | <p> |
||
17 | <?php |
||
18 | |||
19 | $first = $_POST["first"]; |
||
20 | $last = $_POST["last"]; |
||
21 | $password = $_POST["password"]; |
||
22 | $email = $_POST["email"]; |
||
23 | |||
24 | $resp=recaptcha_check_answer(RECAPTCHA_PRIVATE_KEY, |
||
25 | $_SERVER["REMOTE_ADDR"], |
||
26 | $_POST["recaptcha_challenge_field"], |
||
27 | $_POST["recaptcha_response_field"]); |
||
28 | |||
29 | if(!$resp->is_valid) { |
||
30 | echo '<p>Sorry, incorrect captcha. Please try again.</p>'; |
||
31 | } |
||
32 | else { |
||
9 | eva | 33 | $req = new wasRemoteAdmin('http://127.0.0.1:10000', 'opensim'); |
1 | eva | 34 | $uuid = UUID::v4(); |
9 | eva | 35 | $req->admin_console_command('create user '.$first.' '.$last.' '.$password.' '.$email.' '.$uuid); |
1 | eva | 36 | echo '<p>Account created successfully.</p>'; |
37 | } |
||
38 | ?> |
||
39 | </p> |
||
40 | <p> |
||
41 | <a class="so_button" href="register.php">Create a New Account</a> |
||
42 | <a class="so_button" href="welcome.php">Cancel</a> |
||
43 | </p> |
||
44 | </div> |
||
45 | </div> |
||
46 | </body> |
||
47 | </html> |