accelRedirect('/index.html'); $response->setContentType('text/html; charset=utf-8'); } #[Route('GET', '/stats.json')] public function getStats() { $dbConn = $this->dbCtx->getConnection(); $stats = new stdClass; $stats->files = 0; $stats->size = 0; $stats->types = 0; $stats->members = 0; $result = $dbConn->query('SELECT COUNT(upload_id), SUM(upload_size), COUNT(DISTINCT upload_type) FROM prm_uploads WHERE upload_deleted IS NULL'); if($result->next()) { $stats->files = $result->getInteger(0); $stats->size = $result->getInteger(1); $stats->types = $result->getInteger(2); } $result = $dbConn->query('SELECT COUNT(user_id) FROM prm_users WHERE user_restricted IS NULL'); if($result->next()) $stats->members = $result->getInteger(0); return $stats; } #[Route('GET', '/eeprom.js')] public function getEepromJs($response) { $response->accelRedirect('/scripts/eepromv1.js'); $response->setContentType('application/javascript; charset=utf-8'); } }