opensim-www – Rev 9
?pathlinks?
<?php
require_once 'lib/recaptchalib.php';
require_once 'lib/kos.php';
require_once 'lib/uuid.php';
define('RECAPTCHA_PRIVATE_KEY', '6Lcz9ukSAAAAAC3u90rcOIdnNnaK_JgMjrOsSzZr');
?>
<!DOCTYPE html>
<html>
<link rel="stylesheet" href="css/green.css" type="text/css" />
<body>
<div>
<img src="img/spectacledowl-logo.png">
<p>
<?php
$first = $_POST["first"];
$last = $_POST["last"];
$password = $_POST["password"];
$email = $_POST["email"];
$resp=recaptcha_check_answer(RECAPTCHA_PRIVATE_KEY,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
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();
$req->admin_console_command('create user '.$first.' '.$last.' '.$password.' '.$email.' '.$uuid);
echo '<p>Account created successfully.</p>';
}
?>
</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>