コード例 #1
0
    print '<p>' . get_string('noindexmessage', 'search') . '<a href="indexersplash.php">' . get_string('createanindex', 'search') . "</a></p>\n";
}
?>
</div>
<?php 
print_box_end();
// prints all the results in a box
if ($sq->is_valid()) {
    print_box_start();
    search_stopwatch();
    $hit_count = $sq->count();
    print "<br />";
    print $hit_count . ' ' . get_string('resultsreturnedfor', 'search') . " '" . stripslashes($query_string) . "'.";
    print "<br />";
    if ($hit_count > 0) {
        $page_links = $sq->page_numbers();
        $hits = $sq->results();
        if ($advanced) {
            // if in advanced mode, search options are saved in the session, so
            // we can remove the query string var from the page links, and replace
            // it with a=1 (Advanced = on) instead
            $page_links = preg_replace("/query_string=[^&]+/", 'a=1', $page_links);
        }
        print "<ol>";
        $typestr = get_string('type', 'search');
        $scorestr = get_string('score', 'search');
        $authorstr = get_string('author', 'search');
        foreach ($hits as $listing) {
            //if ($CFG->unicodedb) {
            //$listing->title = mb_convert_encoding($listing->title, 'auto', 'UTF8');
            //}