<?php
// Print title of search page.
echo '<h1>Search Results for "'.htmlspecialchars($request->getString('search', '', 64)) .'"</h1>';
// Display search listings.
if ($out = $node->getElementsByClassName('AstSearchListing')) {
echo '<div id="listings" class="search"><ul>';
foreach ($out as $c) {
echo searchListing($c->url, $c->title, $c->description, $c->isStar, $c->category, $c->nofollow);
}
echo '</ul></div>';
// Make the previous and next buttons. There are 20 results on each page.
echo '<div class="buttonSearch">';
if (($request->getInt('start', 0)) > 1) {
echo '<div class="buttonSearchPrevious"><a href="' . $webAct->action(new WebAction('prevResult'),
array('start' => $request->getInt('start', 0) - 20)) . '">Previous</a></div>';
}
echo '<div class="buttonSearchNext"><a href="' . $webAct->action(new WebAction('nextResult'),
array('start' => $request->getInt('start', 0) + 20)) . '">Next</a></div>';
echo '</div>';
}
// Make another search form at the bottom.
echo makeSearchForm();
?>