public function getMain() { $output = ""; $output .= "<h2>Search</h2>"; $output .= SearchPage::getSearchForm(); return $output; }
public function getMain() { $output = ""; $output .= "<h2>Search</h2>"; $output .= SearchPage::getSearchForm($this->options["keywords"], $this->options); $results = $this->search($this->options); $output .= "<p>There are " . sizeof($results) . " results</p>"; $output .= "<div id='allResults'><ul class='results'>"; $chapter = 0; foreach ($results as $result) { $currentChapter = implode(".", array_slice(explode(".", $result["book_id"]), 0, 1)); if ($result["type"] != "item" and $chapter != $currentChapter) { $chapter = $currentChapter; $chapterInformation = getChapter($currentChapter); $output .= "</ul>"; $output .= "<h3>Chapter " . $currentChapter . ": " . parseAccents($chapterInformation["title"]) . "</h3>"; $output .= "<ul class='results'>"; } $output .= $this->printResult($result, false); // we never show the proofs in the preview, although it would be possible } $output .= "</div>"; return $output; }