<?php
// Simple password protection for the admin area.
// IMPORTANT: For a real application, use a proper authentication system.
define('ADMIN_USERNAME', 'admin');
define('ADMIN_PASSWORD', 'password');

session_start();

function is_logged_in() {
    return isset($_SESSION['is_logged_in']) && $_SESSION['is_logged_in'] === true;
}

function require_login() {
    if (!is_logged_in()) {
        header('Location: login.php');
        exit;
    }
}
?>