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. include_once(themePath('../search/display.php'));
  14.  
  15. if(ActiveItemKey($GLOBALS['activeitem'])=='search-result'{
  16.   SetHTMLTitle(_t('search','section'))// set HTML title
  17.   SetHTMLTitle(_t('search','result'))// set HTML title
  18.   setBreadcrumb(array(ucfirst(_t('search','section')) => HrefMaker(array('rub'=> $GLOBALS['links'][U_L]['search']['linkvalue']))));
  19.   setBreadcrumb(array(ucfirst(_t('search','result')) => false));
  20.   
  21.   echo '<h1>'._t('search','result').'</h1>';
  22.  
  23.   if(!isset($_REQUEST['search']|| strlen($_REQUEST['search'])<=3{
  24.     echo '<div class="info">';
  25.     echo _t('search','min_length');
  26.     echo '</div>';
  27.   else {
  28.     $str=strip_tags($_REQUEST['search']);
  29.     $searchtype=isset($_REQUEST['searchtype']$_REQUEST['searchtype''one';
  30.     echo '<h2>'._t('search','keywords'.'\''.formatText($str,'2HTML').'\'</h2>'.END_LINE;
  31.  
  32.     $start_time getmicrotime();
  33.     DisplayPublicResults($str$searchtype);
  34.     $end_time getmicrotime();
  35.     DisplayQueryTime($start_time$end_time);
  36.     logfile(LOG_KEYWORDS,array($str'PUBLIC'$searchtypei2c_realip()));
  37.   }
  38. }
  39.  
  40. if(ActiveItemKey($GLOBALS['activeitem'])=='search'{
  41.   SetHTMLTitle(_t('menu','advancedsearch'))// set HTML title
  42.   setBreadcrumb(array(ucfirst(_t('menu','advancedsearch')) => false));
  43.   
  44.   echo '<h1>'._t('menu','advancedsearch').'</h1>';
  45. }
  46. ?>

Documentation generated on Thu, 03 May 2012 15:07:57 +0200 by phpDocumentor 1.4.1