* @version $Id$ * @access public * @license http://opensource.org/licenses/gpl-3.0.html */ ?>
' . _t('menu','search') . '' . PHP_EOL; ?>

/> /> /> />

'.PHP_EOL; echo _t('search','min_length'); echo '
'.PHP_EOL; } else { if (isset($_REQUEST['searchincome'])) $str = trim($_REQUEST['searchincome']); else $str = $_REQUEST['search']; if (!isset($_REQUEST['searchtype'])) $searchtype = 'one'; else $searchtype = $_REQUEST['searchtype']; if($searchtype=='one') $display_method=_t('search','one_of_them'); if($searchtype=='all') $display_method=_t('search','all_of_them'); if($searchtype=='exp') $display_method=_t('search','expression'); if($searchtype=='expanded') $display_method=_t('search','expanded'); echo '

' . _t('search','result') . '

' . PHP_EOL; echo '
'.PHP_EOL; echo _t('search','keywords'); echo formatText($str, '2HTML').'
'.PHP_EOL; echo _t('search','method'); echo $display_method.'
'.PHP_EOL; echo '
'.PHP_EOL; echo '
'.PHP_EOL; $start_time = getmicrotime(); if ($rub == 'home') $rub = 'all'; switch ($rub) { case 'page': $l21auth->isSuperAdmin() ? DisplaySearchPage($str, $type, $searchtype) : ReloadIndex('admin'); break; case 'project': $l21auth->isSuperAdmin() ? DisplaySearchProject($str, $type, $searchtype) : ReloadIndex('admin'); if(defined('PROJECT_TASK') && PROJECT_TASK == 1) { $l21auth->isSuperAdmin() ? DisplaySearchProjectTasks($str, $type, $searchtype) : ReloadIndex('admin'); } break; case 'news': $l21auth->hasRight('news') ? DisplaySearchNews($str, $type, $searchtype) : ReloadIndex('admin'); break; case 'newsletter': $l21auth->isSuperAdmin() ? DisplaySearchNewsletter($str, $type, $searchtype) : ReloadIndex('admin'); break; case 'publication': $l21auth->hasRight('publication') ? DisplaySearchPublication($str, $type, $searchtype) : ReloadIndex('admin'); $l21auth->hasRight('publication') ? DisplaySearchPubliContents($str, $type, $searchtype) : ReloadIndex('admin'); break; case 'workshop': $l21auth->hasRight('workshop') ? DisplaySearchWorkshop($str, $type, $searchtype) : ReloadIndex('admin'); $l21auth->hasRight('workshop') ? DisplaySearchWorkshopRep($str, $type, $searchtype) : ReloadIndex('admin'); $l21auth->hasRight('workshop') ? DisplaySearchWorkshopRepContents($str, $type, $searchtype) : ReloadIndex('admin'); $l21auth->hasRight('workshop') ? DisplaySearchWorkshopCalendar($str, $type, $searchtype) : ReloadIndex('admin'); $l21auth->hasRight('workshop') ? DisplaySearchWorkshopCom($str, $type, $searchtype) : ReloadIndex('admin'); break; case 'workshoprep': $l21auth->hasRight('workshop') ? DisplaySearchWorkshopRep($str, $type, $searchtype) : ReloadIndex('admin'); $l21auth->hasRight('workshop') ? DisplaySearchWorkshopRepContents($str, $type, $searchtype) : ReloadIndex('admin'); break; case 'dashboard': $l21auth->hasRight('dashboard') ? DisplaySearchSdi($str, $type, $searchtype) : ReloadIndex('admin'); break; case 'sdi': $l21auth->hasRight('dashboard') ? DisplaySearchSdi($str, $type, $searchtype) : ReloadIndex('admin'); break; case 'comment': $l21auth->isSuperAdmin() ? DisplaySearchComment($str, $type, $searchtype) : ReloadIndex('admin'); break; case 'yellowpages': $l21auth->isSuperAdmin() ? DisplaySearchYellowpages($str, $type, $searchtype) : ReloadIndex('admin'); break; case 'user': $l21auth->isSuperAdmin() ? DisplaySearchUser($str, $type, $searchtype) : ReloadIndex('admin'); break; case 'level': $l21auth->isSuperAdmin() ? DisplaySearchLevel($str, $type, $searchtype) : ReloadIndex('admin'); break; case 'tag': $l21auth->isSuperAdmin() ? DisplaySearchTag($str, $type, $searchtype) : ReloadIndex('admin'); break; case 'scale': $l21auth->isSuperAdmin() ? DisplaySearchScale($str, $type, $searchtype) : ReloadIndex('admin'); break; case 'all': if ($l21auth->isSuperAdmin()) DisplaySearchPage($str, $type, $searchtype); if ($l21auth->isSuperAdmin()) DisplaySearchProject($str, $type, $searchtype); if(defined('PROJECT_TASK') && PROJECT_TASK == 1) { $l21auth->isSuperAdmin() ? DisplaySearchProjectTasks($str, $type, $searchtype) : ReloadIndex('admin'); } if ($l21auth->hasRight('news')) DisplaySearchNews($str, $type, $searchtype); if ($l21auth->isSuperAdmin()) DisplaySearchNewsletter($str, $type, $searchtype); if ($l21auth->hasRight('publication')) DisplaySearchPublication($str, $type, $searchtype); if ($l21auth->hasRight('publication')) DisplaySearchPubliContents($str, $type, $searchtype); if ($l21auth->hasRight('workshop')) DisplaySearchWorkshop($str, $type, $searchtype); if ($l21auth->hasRight('workshop')) DisplaySearchWorkshopRep($str, $type, $searchtype); if ($l21auth->hasRight('workshop')) DisplaySearchWorkshopRepContents($str, $type, $searchtype); if ($l21auth->hasRight('workshop')) DisplaySearchWorkshopCalendar($str, $type, $searchtype); if ($l21auth->hasRight('workshop')) DisplaySearchWorkshopCom($str, $type, $searchtype); if ($l21auth->hasRight('dashboard')) DisplaySearchSdi($str, $type, $searchtype); if ($l21auth->isSuperAdmin()) DisplaySearchComment($str, $type, $searchtype); if ($l21auth->isSuperAdmin()) DisplaySearchYellowpages($str, $type, $searchtype); if ($l21auth->isSuperAdmin()) DisplaySearchUser($str, $type, $searchtype); if ($l21auth->isSuperAdmin()) DisplaySearchLevel($str, $type, $searchtype); if ($l21auth->isSuperAdmin()) DisplaySearchTag($str, $type, $searchtype); if ($l21auth->isSuperAdmin()) DisplaySearchScale($str, $type, $searchtype); break; default: } echo '
'.PHP_EOL; $end_time = getmicrotime(); DisplayQueryTime($start_time, $end_time); logfile(LOG_MAINFILE,array('[action] performing search', $str, $type, $searchtype, $rub, i2c_realip())); footerAddJS('../lib/js/jquery.easyMark.js'); // we remove words < 3 chars $keywords = preg_replace(array('/\b\w{1,2}\b/','/\s+/'),array('',' '),$_REQUEST['search']); $js = "$('#search-results').easymark('highlight', '".formatText($keywords, '2ATT')."');"; footerAddInlineJS($js); } } ?>