view('template/header', [ "title" => "Resultater", "hide_nav" => TRUE, "hide_menu" => TRUE ] ); $app->view('pages/race/results', [ "view" => "focused" ] ); $app->view('template/footer'); break; case 'summary': $team_mapper = new TeamMapper($app->database->conn); $teams = $team_mapper->getAll(); $filtered_teams = []; // filter out any teams that have no rounds foreach ($teams as $team) { if ($team->rounds !== 0) { $filtered_teams[] = $team; } } $app->view('template/header', ["title" => "Sammendrag"]); $app->view('pages/race/results', [ "view" => "summary", "teams" => $filtered_teams ] ); $app->view('template/footer'); break; default: $app->view('template/header', ["title" => "Resultater"]); $app->view('pages/race/results'); $app->view('template/footer'); break; }