config('domain')));
    }
    public function get(): void
    {
        $opensim = new OpenSim($this->app->db());
        $table = '
| Benutzername | Region | 
|---|
';
        
        $statement = $this->app->db()->prepare("SELECT RegionID,UserID FROM Presence ORDER BY RegionID ASC");
        $statement->execute();
    
        while ($row = $statement->fetch()) {
            if ($row['RegionID'] != "00000000-0000-0000-0000-000000000000") {
                $table = $table.'| '.htmlspecialchars(trim($opensim->getUserName($row['UserID']))).' | '.htmlspecialchars($opensim->getRegionName($row['RegionID'])).' | 
';
            }
        }
    
        $this->app->template('__dashboard.php')->vars([
            'title' => 'Online Anzeige',
            'username' => $_SESSION['DISPLAYNAME']
        ])->unsafeVar('child-content', $table.'
')->render();
    }
}