fullText($query, $collection, $limit, $offset, $topicFilter, $stampFilter); $total = $searchModel->countResults($query, $collection, $topicFilter, $stampFilter); $totalPages = (int) ceil($total / $limit); } // Gather collection list for the filter dropdown $docModel = new Document(); $collections = $docModel->getCollections(); // Available topics and stamps for filter dropdowns $db = Database::getInstance(); $availableTopics = []; $availableStamps = []; try { $availableTopics = [ 'intelligence operations', 'national security', 'military operations', 'surveillance', 'assassination', 'congressional legislation', 'government oversight', 'civil rights', 'foreign policy', 'law enforcement', 'financial regulation', 'public health', 'human experimentation', 'scientific research', 'judicial proceedings', ]; $availableStamps = [ 'TOP SECRET', 'SECRET', 'CONFIDENTIAL', 'CLASSIFIED', 'UNCLASSIFIED', 'NOFORN', 'EYES ONLY', 'REDACTED', 'DECLASSIFIED', 'SEALED', ]; } catch (\PDOException $e) {} require __DIR__ . '/../views/search-results.php'; } }