aboutsummaryrefslogtreecommitdiff
path: root/views/login/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/login/index.php')
-rw-r--r--views/login/index.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/views/login/index.php b/views/login/index.php
new file mode 100644
index 0000000..a77f106
--- /dev/null
+++ b/views/login/index.php
@@ -0,0 +1,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: <?php echo $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>