linea21-core
[ class tree: linea21-core ] [ index: linea21-core ] [ all elements ]

Source for file tpl_search.php

Documentation is available at tpl_search.php

  1. <?php
  2. /**
  3.  * @package linea21.core
  4.  * @subpackage public
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10. ?>
  11.  
  12. <div id="contenu"><?php
  13. include_once('../search/display.php');
  14.  
  15. SetHTMLTitle($GLOBALS['lang']['search']['section']); // set HTML title
  16.  
  17. if(ActiveItemKey($GLOBALS['activeitem'])=='search-result') {
  18.   SetHTMLTitle($GLOBALS['lang']['search']['result']); // set HTML title
  19.   echo '<h1>'.$GLOBALS['lang']['search']['result'].'</h1>';
  20.  
  21.   if(!isset($_REQUEST['search']) || strlen($_REQUEST['search'])<=3) {
  22.     echo '<div class="info">';
  23.     echo $GLOBALS['lang']['search']['min_length'];
  24.     echo '</div>';
  25.   } else {
  26.     $str=$_REQUEST['search'];
  27.     $searchtype=isset($_REQUEST['searchtype']) ? $_REQUEST['searchtype'] : 'one';
  28.     echo '<h2>'.$GLOBALS['lang']['search']['keywords'] .'\''.formatText($str,'2HTML').'\'</h2>'.END_LINE;
  29.  
  30.     $start_time = getmicrotime();
  31.     DisplayPublicResults($str, $searchtype);
  32.     $end_time = getmicrotime();
  33.     DisplayQueryTime($start_time, $end_time);
  34.     LogKeywordsSearch($str, 'PUBLIC', $searchtype);
  35.   }
  36. }
  37.  
  38. if(ActiveItemKey($GLOBALS['activeitem'])=='search') {
  39.   SetHTMLTitle($GLOBALS['lang']['menu']['advancedsearch']); // set HTML title 
  40.   echo '<h1>'.$GLOBALS['lang']['menu']['advancedsearch'].'</h1>';
  41.  
  42. }
  43. ?></div>

Documentation generated on Sat, 08 Nov 2008 14:54:46 +0100 by phpDocumentor 1.4.1