-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
90 lines (76 loc) · 3.7 KB
/
Copy pathindex.php
File metadata and controls
90 lines (76 loc) · 3.7 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
require_once __DIR__ . '/autoload.php';
use App\Core\Bootstrap;
use App\Helpers\SecurityHelper;
Bootstrap::init();
if (isset($_SESSION['user_id'])) {
header("Location: dashboard.php");
exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login | Expense Manager</title>
<!-- Bootstrap 5 CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.0/css/all.min.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<div class="container-fluid">
<div class="auth-wrapper">
<div class="glass-panel auth-card">
<div class="text-center mb-4">
<div class="brand-logo justify-content-center mb-0">
<i class="fa-solid fa-wallet"></i> ExpenseMngr
</div>
</div>
<h2 class="auth-title text-center">Welcome Back</h2>
<p class="auth-subtitle text-center">Please enter your details to sign in.</p>
<?php if (isset($_GET['error'])): ?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<?php echo htmlspecialchars($_GET['error']); ?>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<?php endif; ?>
<form action="auth.php" method="POST">
<input type="hidden" name="csrf_token" value="<?php echo SecurityHelper::generateCsrfToken(); ?>">
<div class="form-floating mb-3">
<input type="email" class="form-control" id="emailInput" name="email"
placeholder="name@example.com" required>
<label for="emailInput">Email address</label>
</div>
<div class="form-floating mb-4">
<input type="password" class="form-control" id="passwordInput" name="password"
placeholder="Password" required>
<label for="passwordInput">Password</label>
</div>
<div class="d-flex justify-content-between align-items-center mb-4">
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="rememberMe">
<label class="form-check-label text-muted small" for="rememberMe">
Remember me
</label>
</div>
<a href="#" class="text-decoration-none small fw-bold"
style="color: var(--primary-color);">Forgot Password?</a>
</div>
<button type="submit" class="btn btn-primary w-100 py-3 mb-3">Sign in</button>
<div class="text-center">
<span class="text-muted small">Don't have an account? </span>
<a href="signup.php" class="text-decoration-none small fw-bold"
style="color: var(--primary-color);">Sign up</a>
</div>
</form>
</div>
</div>
</div>
<!-- Bootstrap JS Bundle -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>