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