from the URL folder (/3070/…), or // the default gym for pages outside a gym folder (privacy page, events). // Unknown slugs — and unpublished gyms for anyone not logged in to the // backoffice — are a plain 404. $gym = site_gym($pdo); if (!$gym) { require __DIR__ . '/404.php'; exit; } $GLOBALS['_gym'] = $gym; $info = site_info($pdo, (int) $gym['id']); $navbar = site_navbar($gym); $current_uri_2 = $current_uri_2 ?? ''; $GLOBALS['_view_shared'] = compact('info', 'navbar', 'current_uri_2', 'gym'); echo view('include'); // renders view('seo') inside
echo view('navbar'); echo view('messenger_chat'); // Staff previewing a gym that isn't public yet. if (empty($gym['is_published'])) { echo '' . "\n"; } // Page content landmark — closed at the top of site/includes/footer.php, so // every public page gets one