query('SELECT id_occupant, name, pin, foto FROM occupant LIMIT 10'); $output['occupants'] = $stmt->fetchAll(); $manifestPath = __DIR__ . '/manifest_pin_tokens.json'; if (file_exists($manifestPath)) { $output['tokens'] = json_decode(file_get_contents($manifestPath), true); } else { $output['tokens'] = 'File not found'; } } catch (Exception $e) { $output['error'] = $e->getMessage(); } header('Content-Type: application/json'); echo json_encode($output, JSON_PRETTY_PRINT); ?>