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. <?php
  13. themeInclude('../search/display.php');
  14.  
  15. SetHTMLTitle(_t('search','section'))// set HTML title
  16.  
  17. if(ActiveItemKey($GLOBALS['activeitem'])=='search-result'{
  18.   SetHTMLTitle(_t('search','result'))// set HTML title
  19.   echo '<h1>'._t('search','result').'</h1>';
  20.  
  21.   if(!isset($_REQUEST['search']|| strlen($_REQUEST['search'])<=3{
  22.     echo '<div class="info">';
  23.     echo _t('search','min_length');
  24.     echo '</div>';
  25.   else {
  26.     $str=strip_tags($_REQUEST['search']);
  27.     $searchtype=isset($_REQUEST['searchtype']$_REQUEST['searchtype''one';
  28.     echo '<h2>'._t('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(_t('menu','advancedsearch'))// set HTML title 
  40.   echo '<h1>'._t('menu','advancedsearch').'</h1>';
  41.  
  42. }
  43. ?>

Documentation generated on Fri, 16 Oct 2009 09:40:11 +0200 by phpDocumentor 1.4.1