shouldShowDesktop()) { header('Location: /auth/login', true, 302); exit; } $assetVersion = static function (string $publicPath) use ($projectRoot): string { $filesystemPath = $projectRoot . '/public' . $publicPath; if (!is_file($filesystemPath)) { return $publicPath; } $mtime = filemtime($filesystemPath); return $mtime === false ? $publicPath : $publicPath . '?v=' . $mtime; }; $sections = [ ['key' => 'overview', 'label' => 'Übersicht'], ['key' => 'upload', 'label' => 'Upload'], ['key' => 'measurements', 'label' => 'Mining-History'], ['key' => 'wallet', 'label' => 'Wallet'], ['key' => 'mining', 'label' => 'Miner-Daten'], ['key' => 'dashboards', 'label' => 'Dashboards'], ]; $defaultProjectKey = getenv('MINING_CHECKER_DEFAULT_PROJECT_KEY') ?: 'doge-main'; $activeView = trim((string) ($_GET['view'] ?? 'overview')); $sectionKeys = array_values(array_filter(array_map( static fn (mixed $section): string => is_array($section) ? trim((string) ($section['key'] ?? '')) : '', $sections ))); if ($sectionKeys === []) { $sectionKeys = ['overview']; } if (!in_array($activeView, $sectionKeys, true)) { $activeView = $sectionKeys[0]; } $sectionsJson = json_encode($sections, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); ?> Mining-Checker