Ejemplo n.º 1
0
    if (!$text) {
        return ' ';
    }
    $re = implode($word_array, '|');
    return eregi_replace("({$re})", '<span style="background-color:pink">\\1</span>', $text);
}
function error_while_in_rss($descr)
{
    header("Content-Type: text/plain");
    print '<channel></channel>';
    exit;
}
if (!$rss) {
    $HTML->header(array('title' => 'Search'));
    echo "<P><CENTER>";
    menu_show_search_box();
}
/*
	Force them to enter at least three characters
*/
if (!$words) {
    $words = $q;
}
$words = trim($words);
if ($words && strlen($words) < 3) {
    if ($rss) {
        error_while_in_rss('Search must be at least three characters');
    }
    echo "<H2>Search must be at least three characters</H2>";
    $HTML->footer(array());
    exit;
Ejemplo n.º 2
0
function menu_search()
{
    global $HTML, $Language;
    $HTML->menuhtml_top($Language->SEARCH);
    menu_show_search_box();
    $HTML->menuhtml_bottom();
}