<?php
declare(strict_types=1);

require_once __DIR__ . "/../includes/session_staff.php";
require_staff(null);

function h($s){ return htmlspecialchars((string)$s, ENT_QUOTES, 'UTF-8'); }

$logoRel  = APP_BASE . "/assets/logo-480.png";
$logoFs   = __DIR__ . "/assets/logo-480.png";

$brandRel = APP_BASE . "/assets/brand-240x48.png";
$brandFs  = __DIR__ . "/assets/brand-240x48.png";

header("Content-Type: text/plain; charset=utf-8");

echo "APP_BASE: " . APP_BASE . PHP_EOL;
echo "__DIR__: " . __DIR__ . PHP_EOL . PHP_EOL;

echo "logoRel:  $logoRel" . PHP_EOL;
echo "logoFs:   $logoFs" . PHP_EOL;
echo "hasLogo:  " . (is_file($logoFs) ? "SIM" : "NAO") . PHP_EOL . PHP_EOL;

echo "brandRel: $brandRel" . PHP_EOL;
echo "brandFs:  $brandFs" . PHP_EOL;
echo "hasBrand: " . (is_file($brandFs) ? "SIM" : "NAO") . PHP_EOL . PHP_EOL;

echo "assets dir exists? " . (is_dir(__DIR__ . "/assets") ? "SIM" : "NAO") . PHP_EOL;
echo "assets realpath: " . (realpath(__DIR__ . "/assets") ?: "NAO") . PHP_EOL;
