Ejemplo n.º 1
0
        $resp = recaptcha_check_answer($RECAPTCHA_PRIVATE_KEY, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
        if (!$resp->is_valid) {
            // What happens when the CAPTCHA was entered incorrectly
            $okToCreateLogin = false;
            $displayStr = "The reCAPTCHA wasn't entered correctly. Go back and try it again. (reCAPTCHA said: " . $resp->error . ")";
        }
    }
    if ($okToCreateLogin) {
        if ($pHandler->checkLogin($emailAddr)) {
            if ($pHandler->register($_POST)) {
                header("Location: viewprofile.php");
            } else {
                $displayStr = 'FAILED: Unable to create user.<div style="margin-left:55px;">Please contact system administrator for assistance.</div>';
            }
        } else {
            $displayStr = $pHandler->getErrorStr();
        }
    }
}
?>
<html>
<head>
	<title><?php 
echo $defaultTitle;
?>
 - New User Profile</title>
	<meta http-equiv="X-Frame-Options" content="deny">
	<link href="../css/base.css?<?php 
echo $CSS_VERSION;
?>
" type="text/css" rel="stylesheet" />
Ejemplo n.º 2
0
    $password = trim($_POST["password"]);
    if ($pHandler->authenticate($password)) {
        if (!$refUrl || strtolower(substr($refUrl, 0, 4)) == 'http' || strpos($refUrl, 'newprofile.php')) {
            header("Location: ../index.php");
        } else {
            header("Location: " . $refUrl);
        }
    } else {
        $statusStr = 'Your username or password was incorrect. Please try again.<br/> If you are unable to remember your login credentials,<br/> use the controls below to retrieve your login or reset your password.';
    }
} elseif ($action == "Retrieve Login") {
    if ($emailAddr) {
        if ($pHandler->lookupUserName($emailAddr)) {
            $statusStr = "Your login name will be emailed to you.";
        } else {
            $statusStr = $pHandler->getErrorStr();
        }
    }
} elseif ($resetPwd) {
    $statusStr = $pHandler->resetPassword($login);
} else {
    $statusStr = $pHandler->getErrorStr();
}
?>

<html>
<head>
	<title><?php 
echo $defaultTitle;
?>
 Login</title>