-
Notifications
You must be signed in to change notification settings - Fork 27
/
login.php
56 lines (43 loc) · 1.81 KB
/
login.php
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
include './app/require.php';
include './app/controllers/authController.php';
Util::isUser();
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['login'])) {
$response = (new authController())->login($_POST);
}
Util::head('Login');
Util::navbar();
?>
<main class="container mt-2">
<div class="row justify-content-center">
<div class="col-12 mt-3 mb-2">
<?php if (isset($response)) : ?>
<div class="alert alert-primary" role="alert">
<?= Util::display($response); ?>
</div>
<?php endif; ?>
</div>
<div class="col-xl-3 col-lg-4 col-md-5 col-sm-7 col-xs-12 my-3">
<div class="card">
<div class="card-body">
<h4 class="card-title text-center">Login</h4>
<form method="POST">
<div class="form-group">
<input type="text" class="form-control form-control-sm" placeholder="Username"
name="username" required>
</div>
<div class="form-group">
<input type="password" class="form-control form-control-sm" placeholder="Password"
name="password" required>
</div>
<button class="btn btn-outline-primary btn-block" name="login" id="submit" type="submit"
value="submit">
Login
</button>
</form>
</div>
</div>
</div>
</div>
</main>
<?php Util::footer(); ?>