Ejemplo n.º 1
0
session_start();
require_once 'userAuth.class.php';
$USER = new userAuth();
if ($USER->isLogin()) {
    echo $USER->showEmail();
}
if (isset($_POST['login-button'])) {
    $login = $USER->Login($_POST['Lemail'], $_POST['LPass']);
    if ($login['State'] == true) {
        echo $USER->showEmail();
    } else {
        echo $login['Msg'];
    }
}
if (isset($_POST['register-button'])) {
    $register = $USER->Register($_POST['Remail'], $_POST['RPass1'], $_POST['RPass2'], $_POST['g-recaptcha-response']);
    if ($register['State'] == true) {
        echo "We have register your email to our databases.";
    } else {
        echo $register['Msg'];
    }
}
if (isset($_POST['logout-button'])) {
    $USER->Logout();
}
?>

<!DOCTYPE html>
<html>
<head>
    <title></title>