<?php
// um-admin/auth.php — Include at top of every admin page
if (session_status() === PHP_SESSION_NONE) session_start();
if (empty($_SESSION['um_admin'])) {
    header('Location: ' . (strpos($_SERVER['REQUEST_URI'], '/lol-admin/') !== false ? 'index.php' : '/lol-admin/index.php'));
    exit;
}
// Path helper for includes
define('ADMIN_ROOT', __DIR__);
define('SITE_ROOT',  dirname(__DIR__));
require_once SITE_ROOT . '/config.php';
