clockwerk-www – Blame information for rev 40

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