107 lines
3.0 KiB
PHP
107 lines
3.0 KiB
PHP
<?php
|
|
session_start();
|
|
|
|
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) {
|
|
header('Location: admin/index.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 - Association Management</title>
|
|
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
|
<style>
|
|
body, html {
|
|
height: 100%;
|
|
margin: 0;
|
|
font-family: 'Poppins', sans-serif;
|
|
background-color: #F4F7F6;
|
|
}
|
|
.login-container {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 100%;
|
|
}
|
|
.login-box {
|
|
background: #FFFFFF;
|
|
padding: 2.5rem;
|
|
border-radius: 0.5rem;
|
|
box-shadow: 0 10px 25px rgba(0,0,0,0.1);
|
|
width: 100%;
|
|
max-width: 400px;
|
|
text-align: center;
|
|
}
|
|
.login-box h2 {
|
|
margin-bottom: 1.5rem;
|
|
color: #333;
|
|
}
|
|
.form-group {
|
|
margin-bottom: 1.5rem;
|
|
text-align: left;
|
|
}
|
|
.form-group label {
|
|
display: block;
|
|
margin-bottom: 0.5rem;
|
|
color: #666;
|
|
font-weight: 600;
|
|
}
|
|
.form-group input {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
border: 1px solid #ddd;
|
|
border-radius: 0.5rem;
|
|
font-family: 'Poppins', sans-serif;
|
|
}
|
|
.btn {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
border: none;
|
|
border-radius: 0.5rem;
|
|
background: linear-gradient(45deg, #4A90E2, #50E3C2);
|
|
color: white;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: opacity 0.3s;
|
|
}
|
|
.btn:hover {
|
|
opacity: 0.9;
|
|
}
|
|
.error-message {
|
|
color: #E24A4A;
|
|
margin-bottom: 1rem;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="login-container">
|
|
<div class="login-box">
|
|
<h2>Admin Login</h2>
|
|
<?php
|
|
if (isset($_GET['error'])) {
|
|
echo '<p class="error-message">' . htmlspecialchars($_GET['error']) . '</p>';
|
|
}
|
|
?>
|
|
<form action="admin/auth.php" method="POST">
|
|
<div class="form-group">
|
|
<label for="username">Username</label>
|
|
<input type="text" id="username" name="username" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="password">Password</label>
|
|
<input type="password" id="password" name="password" required>
|
|
</div>
|
|
<button type="submit" class="btn">Login</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|