<?php
if (!ob_get_level()) ob_start();
if (!isset($_SESSION)) session_start();
require __DIR__ . '/../auth.php';
require_once __DIR__ . '/admin_lib.php';

$CAN_EDIT = $GLOBALS['CAN_EDIT'] ?? false;
$CAN_VIEW = $GLOBALS['CAN_VIEW'] ?? true;

if (!isset($pageTitle)) $pageTitle = "Admin — Thunder Mountain Radio";
if (!isset($pageClass)) $pageClass = "page-admin";

include __DIR__ . '/../../includes/header.php';
include __DIR__ . '/../../includes/nav.php';
?>
<main class="content-area">
  <div class="smurf-divider"></div>
  <div class="content-wrapper admin-main">
    <div class="admin-topbar">
      <a class="admin-return" href="index.php">← Return to Admin Dashboard</a>
      <a class="admin-return" href="../index.php" style="margin-left:10px;">Return to Main Site</a>
      <a class="admin-return" href="logout.php" style="margin-left:10px;">Logout</a>
    </div>
