Session expired, please log in again!'); exit; } include($config['html_dir'] . "/includes/cache-data.inc.php"); $query_limit = 8; // Limit per query $vars = get_vars(['POST', 'GET']); // Is there a POST/GET query string? if (isset($vars['queryString'])) { $queryString = trim($vars['queryString']); // Is the string length greater than 0? if (strlen($queryString) > 0) { $query_param = "%$queryString%"; // Start out with a clean slate $search_results = []; // Increase query_limit by one, so we can show "+" on result display if there are more than $query_limit entries $query_limit++; // Run search modules foreach ($config['wui']['search_modules'] as $module) { if (is_file($config['html_dir'] . "/includes/search/$module.inc.php")) { include($config['html_dir'] . "/includes/search/$module.inc.php"); } } // Reset query_limit $query_limit--; foreach ($search_results as $results) { $display_count = safe_count($results['results']); // If there are more results than query_limit (can happen, as we ++'d above), cut array to desired size and add + to counter if ($display_count > $query_limit) { $results['results'] = array_slice($results['results'], 0, $query_limit); $display_count .= '+'; } echo('' . PHP_EOL); foreach ($results['results'] as $result) { $data = []; foreach ($result['data'] as $str) { $str = str_replace('| |', '|', $str); $data[] = rtrim($str, ' |'); } echo('
  • ' . PHP_EOL); echo('
  • ' . PHP_EOL . ' ' . PHP_EOL); echo(' ' . PHP_EOL); echo(' ' . PHP_EOL); echo('
  • ' . PHP_EOL); } } if (!safe_count($search_results)) { echo(''); } } } else { // There is no queryString, we shouldn't get here. echo(''); } // EOF