WeakWiki


include\search.include.php



/********************************************************************************
WeakWiki (WeakWiki search user interface include file: search.include.php)
Copyright (C) 2010 Alexander Lang

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this
program; if not, see .

Project Home: http://weakwiki.robnet.wmweb.at/
Contact:      robbiblubber@robnet.wmweb.at
********************************************************************************/



require_once(_lang('search'));


$pm = new PageMenu();
if(allowEdit())
{
	$pm->add("" . _L_SE_0000 . "");
}
$pm->add("" . _L_SE_0001 . "");


$f = new Search();


if($_GET['action'] == 'ftsearch')
{
	$pm->write();
	
	$f->find($_GET['title'], SEARCH_FULLTEXT);
	
	if($f->hasResults())
	{
		echo("


" . _L_SE_0011 . "\"" . $_GET['title'] . "\"" . _L_SE_0012 . "

\n"); foreach($f->getResults() as $i) { echo("  " . $i . "
\n"); } } else { echo("



". _L_SE_0010 . "

\n"); } } else if($f->hasDirectHit($_GET['title'])) { echo("\n"); } else { $pm->write(); $f->find($_GET['title'], SEARCH_DEFAULT); if($f->hasResults()) { echo("


" . _L_SE_0011 . "\"" . $_GET['title'] . "\"" . _L_SE_0012 . "

\n"); foreach($f->getResults() as $i) { echo("  " . $i . "
\n"); } echo("
" . _L_SE_0020 . "
\n"); } else { echo("



" . _L_SE_0010 . "

\n"); echo("
" . _L_SE_0020 . "
\n"); } } ?>

WeakWiki