".$l['content_search_header'].""; $searchstring = strip($_GET['q']); $c['main'] .= '

'; if(!empty($searchstring)) { $sql_searchstring = escape_for_mysql($searchstring); $sql = " SELECT id, url, UNIX_TIMESTAMP(date) AS date_url, 0 AS comment_id, topic, UNIX_TIMESTAMP(date) AS date, keywords, teaser, section, comments, MATCH ( topic, keywords, teaser, content ) AGAINST ('".$sql_searchstring."') AS scoring FROM ".JLOG_DB_CONTENT." WHERE MATCH ( topic, keywords, teaser, content ) AGAINST ( '".$sql_searchstring."' ) UNION SELECT ".JLOG_DB_COMMENTS.".reference AS id, ".JLOG_DB_CONTENT.".url AS url, UNIX_TIMESTAMP(".JLOG_DB_CONTENT.".date) AS date_url, ".JLOG_DB_COMMENTS.".id AS comment_id, name AS topic, UNIX_TIMESTAMP(".JLOG_DB_COMMENTS.".date) AS date, 'comment_keywords' AS keywords, ".JLOG_DB_COMMENTS.".content AS teaser, 'comment', 2, MATCH(name, city, email, homepage, ".JLOG_DB_COMMENTS.".content) AGAINST ('".$sql_searchstring."') AS scoring FROM ".JLOG_DB_COMMENTS.", ".JLOG_DB_CONTENT." WHERE MATCH ( name, city, email, homepage, ".JLOG_DB_COMMENTS.".content ) AGAINST ( '".$sql_searchstring."' ) AND ".JLOG_DB_COMMENTS.".reference = ".JLOG_DB_CONTENT.".id AND ".JLOG_DB_COMMENTS.".type = '' ORDER BY scoring desc LIMIT 40;"; $search = new Query($sql); if($search->error()) { echo "
\n";
        echo $search->getError();
        echo "
\n"; die(); } if($search->numRows() < 1) { $c['main'] .= "

".$l['content_nothing_found']."

"; } else { $cc = count_comments(); $c['main'] .= "\n"; } } require(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'do_template.php'); echo $body; ?>