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

Documentation generated on Fri, 01 Apr 2011 09:35:15 +0200 by phpDocumentor 1.4.1