<?php
include 'config.php';

if (isset($_POST['login'])) {
    if ($_POST['username'] === 'admin' && $_POST['password'] === '123456') {
        $_SESSION['admin'] = true;
        header("Location: dashboard.php");
        exit;
    }
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="bg-light d-flex justify-content-center align-items-center" style="height:100vh">

<form method="post" class="card p-4" style="width:300px">
<h5 class="mb-3 text-center">Admin Login</h5>
<input class="form-control mb-3" name="username" placeholder="Username" required>
<input type="password" class="form-control mb-3" name="password" placeholder="Password" required>
<button class="btn btn-primary w-100" name="login">Login</button>
</form>

</body>
</html>
