clockwerk-www – Blame information for rev 47
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | eva | 1 | <?php |
2 | |||
3 | require_once 'lib/recaptchalib.php'; |
||
4 | require_once 'lib/wasRemoteAdmin.php'; |
||
5 | require_once 'lib/uuid.php'; |
||
6 | |||
7 | define('RECAPTCHA_PRIVATE_KEY', '6Lcz9ukSAAAAAC3u90rcOIdnNnaK_JgMjrOsSzZr'); |
||
8 | |||
9 | ?> |
||
10 | <!DOCTYPE html> |
||
11 | <html> |
||
47 | eva | 12 | <head> |
13 | <title>Clockwerk</title> |
||
1 | eva | 14 | <link rel="stylesheet" href="css/green.css" type="text/css" /> |
47 | eva | 15 | </head> |
17 | vero | 16 | <body class="dark-grey"> |
1 | eva | 17 | <div> |
18 | <img src="img/clockwerk-logo.png"> |
||
39 | zed | 19 | <h1><?php print gethostname(); ?></h1> |
20 | <hr> |
||
1 | eva | 21 | <p> |
22 | <?php |
||
23 | |||
24 | $first = $_POST["first"]; |
||
25 | $last = $_POST["last"]; |
||
26 | $password = $_POST["password"]; |
||
27 | $email = $_POST["email"]; |
||
28 | |||
29 | $resp=recaptcha_check_answer(RECAPTCHA_PRIVATE_KEY, |
||
30 | $_SERVER["REMOTE_ADDR"], |
||
31 | $_POST["recaptcha_challenge_field"], |
||
32 | $_POST["recaptcha_response_field"]); |
||
33 | |||
34 | if(!$resp->is_valid) { |
||
35 | echo '<p>Sorry, incorrect captcha. Please try again.</p>'; |
||
36 | } |
||
37 | else { |
||
38 | $req = new wasRemoteAdmin('http://127.0.0.1:10000', 'opensim'); |
||
39 | $uuid = UUID::v4(); |
||
40 | $ret = $req->admin_create_user($first, $last, $password, '128', '128'); |
||
41 | $rep = new SimpleXMLElement($ret); |
||
42 | foreach($rep->params->param->value->struct->member as $member) { |
||
43 | if($member->name == "success" && $member->value->boolean == "0") { |
||
44 | echo '<p>Sorry, the account could not be created.</p>'; |
||
45 | break; |
||
46 | } |
||
47 | else { |
||
48 | echo '<p>Account created successfully.</p>'; |
||
49 | break; |
||
50 | } |
||
51 | } |
||
52 | } |
||
53 | ?> |
||
54 | </p> |
||
55 | <p> |
||
10 | vero | 56 | <a class="button" href="register.php">Create a New Account</a> |
40 | vero | 57 | <a class="button" href="welcome.php">Main Page</a> |
1 | eva | 58 | </p> |
59 | </div> |
||
60 | </div> |
||
61 | </body> |
||
62 | </html> |