aboutsummaryrefslogtreecommitdiff
path: root/views/login/index.php
blob: 1580cf27fdc901faa34cc609bbcced6988fa928e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
    $title = 'Login to your account';
    include '../meta.php';

    $status = null;
    $token = null;
    runController('login');
?>

<?php if ($status !== null): ?>
    <?php if ($status !== ""): ?>
        <p>
            Fail: <?= $status ?>
        </p>
    <?php else: ?>
        <p>
            Success! Token: <?php echo $token ?>
        </p>
    <?php endif; ?>
<?php endif; ?>

<form action="./index.php" method="POST">
    <input type="text" name="username" placeholder="Username" minlength="1" pattern="[A-Za-z][A-Za-z_0-9]*">
    <input type="password" name="password" placeholder="Password" minlength="4">
    <input type="submit" value="Login">
</form>