<?php
require_once __DIR__ . '/../../app/core/bootstrap.php';
$pdo = crm_pdo();
$admin = $pdo->query("SELECT * FROM users WHERE role = 'administrator' OR role = 'admin' LIMIT 1")->fetch();

if (!$admin) {
    die("No admin found locally.");
}

// simulate session
session_start();
$_SESSION['auth_user'] = $admin;

// execute the file
ob_start();
require __DIR__ . '/assistant_status.php';
$output = ob_get_clean();

echo $output;
