61 lines
2.7 KiB
PHP
61 lines
2.7 KiB
PHP
<?php
|
|
session_start();
|
|
|
|
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) {
|
|
header('location: index.php');
|
|
exit;
|
|
}
|
|
|
|
$error = '';
|
|
if (isset($_SESSION['error']) && !empty($_SESSION['error'])) {
|
|
$error = $_SESSION['error'];
|
|
unset($_SESSION['error']);
|
|
}
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Login - Employee Attendance System</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
|
<link rel="stylesheet" href="assets/css/custom.css">
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
</head>
|
|
<body class="login-body">
|
|
<div class="container">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-6 col-lg-4">
|
|
<div class="card shadow-lg border-0 rounded-lg mt-5">
|
|
<div class="card-header bg-primary text-white text-center">
|
|
<h3 class="fw-bold my-4">Employee Attendance System</h3>
|
|
</div>
|
|
<div class="card-body p-4 p-sm-5">
|
|
<form action="auth.php" method="post">
|
|
<?php if ($error): ?>
|
|
<div class="alert alert-danger"><?php echo htmlspecialchars($error); ?></div>
|
|
<?php endif; ?>
|
|
<div class="form-floating mb-3">
|
|
<input type="text" class="form-control" id="username" name="username" placeholder="Username" required>
|
|
<label for="username">Username</label>
|
|
</div>
|
|
<div class="form-floating mb-3">
|
|
<input type="password" class="form-control" id="password" name="password" placeholder="Password" required>
|
|
<label for="password">Password</label>
|
|
</div>
|
|
<div class="d-grid">
|
|
<button class="btn btn-primary btn-lg fw-bold" type="submit">Login</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html>
|