<?php
/**
 * Middleware to require admin access for protected pages
 * Include this at the top of any admin-only page
 */

// Make sure we have access to our configuration and functions
require_once dirname(__FILE__) . '/config.php';
require_once dirname(__FILE__) . '/db.php';
require_once dirname(__FILE__) . '/functions.php';

// Check if user is logged in and is admin
requireAdmin();
?>