Пример #1
0
<?php

include_once "common/base.php";
$pageTitle = "Register";
include_once "common/header.php";
if (!empty($_POST['username'])) {
    include_once "inc/class.users.inc.php";
    $users = new SpinnereyeUsers($db);
    echo $users->createAccount();
} else {
    ?>

<div class="signupform">
        <h2>Sign up</h2>
        <form name="signup" method="POST" action="signupform.php">
            <div class="emailinput">
            Enter your email address <input id="username" type="email" name="username" required="required"></input><div id="status"></div>
            </div>
            <div class="passwordinput">
            Enter a password <input id="password" type="password" name="password" required="required" /> 
            </div>
            <input id="surl" name="surl" type="hidden" value="spinnereye.com" />
            <button type="submit">Sign up</button>
        </form>
        
        </div>  
      
        
<?php 
}
include_once 'common/close.php';
Пример #2
0
<?php

session_start();
include_once "../inc/constants.inc.php";
include_once "../inc/class.users.inc.php";
$userObj = new SpinnereyeUsers();
if (!empty($_POST['action']) && isset($_SESSION['LoggedIn']) && $_SESSION['LoggedIn'] == 1) {
    if ($userObj->confirmAccount() === TRUE) {
        switch ($_POST['action']) {
            case 'changeemail':
                $status = $userObj->updateEmail() ? "changed" : "failed";
                header("Location: /account.php?email={$status}");
                break;
            case 'changepassword':
                $status = $userObj->updatePassword() ? "changed" : "nomatch";
                header("Location: /account.php?password={$status}");
                break;
            case 'deleteaccount':
                $userObj->deleteAccount();
                break;
            case 'testinput':
                error_log('testinput');
                $userObj->checkUsername();
                break;
            default:
                header("Location: /");
                break;
        }
    } else {
        $status = 'failed';
        header("Location: /account.php?password={$status}");
Пример #3
0
<?php

include_once "common/base.php";
if (!empty($_POST['username']) && $_POST['action'] == 'testinput') {
    include_once "inc/class.users.inc.php";
    $users = new SpinnereyeUsers($db);
    echo $users->checkUsername();
} elseif ($_POST['action'] == 'testinputtag') {
    error_log($_POST['action']);
    include_once "inc/class.users.inc.php";
    $users = new SpinnereyeUsers($db);
    echo $users->checkUserTag();
}
Пример #4
0
<?php

include_once "common/base.php";
if (isset($_GET['v']) && isset($_GET['e'])) {
    error_log('v+e');
    include_once "inc/class.users.inc.php";
    $users = new SpinnereyeUsers($db);
    $ret = $users->verifyAccount();
} elseif (isset($_POST['v'])) {
    error_log('v');
    include_once "inc/class.users.inc.php";
    $users = new SpinnereyeUsers($db);
    $status = $users->updatePassword() ? "changed" : "failed";
    header("Location: /account.php?password={$status}");
    exit;
} else {
    header("Location: /login.php");
    exit;
}
$pageTitle = "Reset Your Password";
include_once "common/header.php";
echo '<div class="wrapp">';
if (isset($ret[0])) {
    echo isset($ret[1]) ? $ret[1] : NULL;
    if ($ret[0] < 3) {
        ?>

        <h2>Reset Your Password</h2>

        <form method="post" action="accountverify.php">
            <div>
Пример #5
0
include_once "common/base.php";
$pageTitle = "Home";
include_once "common/header.php";
?>
<div class="wrapp">
<?php 
if (!empty($_SESSION['LoggedIn']) && !empty($_SESSION['Username'])) {
    ?>

        <p>You are currently <strong>logged in.</strong></p>
        <p><a href="/logout.php">Log out</a></p>
<?php 
} elseif (!empty($_POST['username']) && !empty($_POST['password'])) {
    include_once 'inc/class.users.inc.php';
    $users = new SpinnereyeUsers($db);
    if ($users->accountLogin() === TRUE) {
        echo "<meta http-equiv='refresh' content='0;/'>";
        exit;
    } else {
        ?>

<h2>Login Failed&mdash;Try Again?</h2>
        <form method="post" action="login.php" name="loginform" id="loginform">
            <div>
                <input type="text" name="username" id="username" />
                <label for="username">Email</label>
                <br /><br />
                <input type="password" name="password" id="password" />
                <label for="password">Password</label>
                <br /><br />
Пример #6
0
<?php

include_once "common/base.php";
$pageTitle = "Register";
include_once "common/header.php";
?>
<div class="wrapp">
    <div class="wrapsignup">
<?php 
if (!empty($_POST['username']) && !isset($_POST['action'])) {
    include_once "inc/class.users.inc.php";
    $users = new SpinnereyeUsers($db);
    echo $users->createAccount();
} elseif (!empty($_POST['username']) && $_POST['action'] === 'testinput') {
    include_once "inc/class.users.inc.php";
    $users = new SpinnereyeUsers($db);
    echo $users->checkUsername();
} else {
    ?>

        <h2>Sign up</h2>
        <form method="post" action="signup.php" id="registerform">
            <div>
                <label for="username">Email:</label>
                <input type="email" name="username" id="username" /><br />
                <label for="userTag">Username:</label>
                <input type="text" name="userTag" id="userTag" /><br />
                <input type="submit" name="register" id="register" value="Sign up" class="pure-button button-large" /><span id = "email_status"></span><span id = "tag_status"></span>
                
            </div>
        </form>
Пример #7
0
<?php

include_once "common/base.php";
$pageTitle = 'Account';
include_once "common/header.php";
include_once 'common/dashboard.php';
?>
    
<div id="main">
<?php 
if (isset($_SESSION['LoggedIn']) && $_SESSION['LoggedIn'] == 1) {
    $pageTitle = "Your Account";
    include_once "common/header.php";
    include_once 'inc/class.users.inc.php';
    $users = new SpinnereyeUsers($db);
    if (isset($_GET['email']) && $_GET['email'] == "changed") {
        echo "<div class='message good'>Your email address " . "has been changed.</div>";
    } else {
        if (isset($_GET['email']) && $_GET['email'] == "failed") {
            echo "<div class='message bad'>There was an error " . "changing your email address.</div>";
        }
    }
    if (isset($_GET['password']) && $_GET['password'] == "changed") {
        echo "<div class='message good'>Your password " . "has been changed.</div>";
    } elseif (isset($_GET['password']) && $_GET['password'] == "nomatch") {
        echo "<div class='message bad'>The two passwords " . "did not match. Try again!</div>";
    }
    if (isset($_GET['delete']) && $_GET['delete'] == "failed") {
        echo "<div class='message bad'>There was an error " . "deleting your account.</div>";
    }
    if (isset($_GET['password']) && $_GET['password'] == 'failed') {
Пример #8
0
<?php

include_once "common/base.php";
$pageTitle = "Verify Your Account";
include_once "common/header.php";
echo '<div class="wrapp">';
if (isset($_GET['v']) && isset($_GET['e'])) {
    include_once "inc/class.users.inc.php";
    $users = new SpinnereyeUsers($db);
    $ret = $users->verifyAccount();
} elseif (isset($_POST['v'])) {
    include_once "inc/class.users.inc.php";
    $users = new SpinnereyeUsers($db);
    $ret = $users->updatePassword();
} else {
    header("Location: /signup.php");
    exit;
}
if (isset($ret[0])) {
    echo isset($ret[1]) ? $ret[1] : NULL;
    if ($ret[0] < 3) {
        ?>
   
        <h2>Choose a Password</h2>

        <form method="post" action="accountverify.php">
            <div>
                <label for="p">Choose a Password:</label>
                <input type="password" name="p" id="p" /><br />
                <label for="r">Re-Type Password:</label>
                <input type="password" name="r" id="r" /><br />