示例#1
0
        <div class="section-padding align-centre mblue">
            <?php 
if (isset($_SESSION['status'])) {
    if ($_SESSION['status'] == 'notsignedin') {
        echo '<p class="full warn"><i class="ico-warning"></i>You must be logged in to view this page.</p>';
        unset($_SESSION['status']);
    } elseif ($_SESSION['status'] == 'signedin') {
        header("location: /user/{$_SESSION['username']}");
    }
}
?>
            <h1>SIGN IN</h1>
            <?php 
if (!empty($_POST['signin-submit'])) {
    if (!empty($_POST['email']) && !empty($_POST['password'])) {
        $response = $loginSystem->signin($_POST['email'], $_POST['password']);
        echo $response;
    } else {
        echo $wrapStart . 'Please enter your email and password.' . $wrapEnd;
    }
}
?>

            <form method="post" id="signin">
                <table>
                    <tr>
                        <td><label for="email">Email:</label></td>
                        <td><input type="email" name="email" required/></td>
                    </tr>

                    <tr>