<?php
/**
 * @package linea21.core
 * @subpackage public
 * @author linea21 <info@linea21.com>
 * @version $id SVN
 * @access public
 * @license http://opensource.org/licenses/gpl-3.0.html
 */
?>

<div id="contenu"><?php
include_once('../search/display.php');

SetHTMLTitle($GLOBALS['lang']['search']['section']); // set HTML title

if(ActiveItemKey($GLOBALS['activeitem'])=='search-result') {
  SetHTMLTitle($GLOBALS['lang']['search']['result']); // set HTML title
  echo '<h1>'.$GLOBALS['lang']['search']['result'].'</h1>';

  if(!isset($_REQUEST['search']) || strlen($_REQUEST['search'])<=3) {
    echo '<div class="info">';
    echo $GLOBALS['lang']['search']['min_length'];
    echo '</div>';
  } else {
    $str=$_REQUEST['search'];
    $searchtype=isset($_REQUEST['searchtype']) ? $_REQUEST['searchtype'] : 'one';
    echo '<h2>'.$GLOBALS['lang']['search']['keywords'] .'\''.formatText($str,'2HTML').'\'</h2>'.END_LINE;

    $start_time = getmicrotime();
    DisplayPublicResults($str, $searchtype);
    $end_time = getmicrotime();
    DisplayQueryTime($start_time, $end_time);
    LogKeywordsSearch($str, 'PUBLIC', $searchtype);
  }
}

if(ActiveItemKey($GLOBALS['activeitem'])=='search') {
  SetHTMLTitle($GLOBALS['lang']['menu']['advancedsearch']); // set HTML title 
  echo '<h1>'.$GLOBALS['lang']['menu']['advancedsearch'].'</h1>';

  DisplayAdvancedSearchForm();
}
?></div>





