/account.php |
@@ -9,16 +9,10 @@ |
?> |
<!DOCTYPE html> |
<html> |
<head> |
<title>Clockwerk</title> |
<link rel="stylesheet" href="css/grey.css" type="text/css" /> |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
</head> |
<body class="dark-grey"> |
<link rel="stylesheet" href="css/green.css" type="text/css" /> |
<body> |
<div> |
<img src="img/clockwerk-logo.png" alt="logo"> |
<h1><?php print gethostname(); ?></h1> |
<hr> |
<img src="img/clockwerk-logo.png"> |
<p> |
<?php |
|
@@ -31,40 +25,33 @@ |
$_SERVER["REMOTE_ADDR"], |
$_POST["recaptcha_challenge_field"], |
$_POST["recaptcha_response_field"]); |
|
switch((bool)$resp->is_valid) { |
case TRUE: |
$req = new wasRemoteAdmin('http://127.0.0.1:10000', 'opensim'); |
$uuid = UUID::v4(); |
$ret = $req->admin_create_user($first, $last, $password, '128', '128'); |
$rep = new SimpleXMLElement($ret); |
foreach($rep->params->param->value->struct->member as $member) { |
switch($member->name) { |
case "success": |
switch((bool)$member->value->boolean) { |
case TRUE: |
echo '<p>Account created successfully.</p>'; |
goto last; |
default: |
echo '<p>Sorry, the account could not be created.</p>'; |
goto last; |
} |
break; |
} |
|
if(!$resp->is_valid) { |
echo '<p>Sorry, incorrect captcha. Please try again.</p>'; |
} |
else { |
$req = new wasRemoteAdmin('http://127.0.0.1:10000', 'opensim'); |
$uuid = UUID::v4(); |
$ret = $req->admin_create_user($first, $last, $password, '128', '128'); |
$rep = new SimpleXMLElement($ret); |
foreach($rep->params->param->value->struct->member as $member) { |
if($member->name == "success" && $member->value->boolean == "0") { |
echo '<p>Sorry, the account could not be created.</p>'; |
break; |
} |
break; |
default: |
echo '<p>Sorry, incorrect captcha. Please try again.</p>'; |
else { |
echo '<p>Account created successfully.</p>'; |
break; |
} |
} |
} |
|
last: |
|
?> |
|
<form class="dark-grey"> |
<input type="button" onclick="parent.location='register.php'" value="Create a New Account"> |
<input type="button" onclick="parent.location='welcome.php'" value="Main Page"> |
</form> |
</p> |
<p> |
<a class="so_button" href="register.php">Create a New Account</a> |
<a class="so_button" href="welcome.php">Cancel</a> |
</p> |
</div> |
</div> |
</body> |
</html> |