<?php
session_start();

/**
 * Check if admin is logged in
 */
function checkAdmin() {
    if(!isset($_SESSION['admin']) || empty($_SESSION['admin']['id'])) {
        header("Location: login.php");
        exit;
    }
}
