* @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': if ($l21auth->isSuperAdmin()) DisplaySearchPage($str, $type, $searchtype); break; case 'project': if ($l21auth->isSuperAdmin() || $l21auth->hasRight('project')) DisplaySearchProject($str, $type, $searchtype); if(defined('PROJECT_TASK') && PROJECT_TASK == 1) { if ($l21auth->isSuperAdmin() || $l21auth->hasRight('project')) DisplaySearchProjectTasks($str, $type, $searchtype); } break; case 'news': if ($l21auth->hasRight('news')) DisplaySearchNews($str, $type, $searchtype); break; case 'newsletter': if ($l21auth->isSuperAdmin()) DisplaySearchNewsletter($str, $type, $searchtype); break; case 'publication': if($l21auth->hasRight('publication')) DisplaySearchPublication($str, $type, $searchtype); if($l21auth->hasRight('publication')) DisplaySearchPubliContents($str, $type, $searchtype); break; case 'workshop': 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); break; case 'workshoprep': if($l21auth->hasRight('workshop')) DisplaySearchWorkshopRep($str, $type, $searchtype); if($l21auth->hasRight('workshop')) DisplaySearchWorkshopRepContents($str, $type, $searchtype); break; case 'dashboard': if($l21auth->hasRight('dashboard')) DisplaySearchSdi($str, $type, $searchtype); break; case 'sdi': if($l21auth->hasRight('dashboard')) DisplaySearchSdi($str, $type, $searchtype); break; case 'comment': if ($l21auth->isSuperAdmin()) DisplaySearchComment($str, $type, $searchtype); break; case 'yellowpages': if ($l21auth->isSuperAdmin()) DisplaySearchYellowpages($str, $type, $searchtype); break; case 'user': if ($l21auth->isSuperAdmin()) DisplaySearchUser($str, $type, $searchtype); break; case 'level': if ($l21auth->isSuperAdmin()) DisplaySearchLevel($str, $type, $searchtype); break; case 'tag': if ($l21auth->isSuperAdmin()) DisplaySearchTag($str, $type, $searchtype); break; case 'scale': if ($l21auth->isSuperAdmin()) DisplaySearchScale($str, $type, $searchtype); break; case 'all': if ($l21auth->isSuperAdmin()) DisplaySearchPage($str, $type, $searchtype); if ($l21auth->isSuperAdmin() || $l21auth->hasRight('project')) DisplaySearchProject($str, $type, $searchtype); if(defined('PROJECT_TASK') && PROJECT_TASK == 1) { if ($l21auth->isSuperAdmin() || $l21auth->hasRight('project')) DisplaySearchProjectTasks($str, $type, $searchtype); } 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); } } ?>