getTotalPages(); $placeholder = Filter::plural($totalPages, [sprintf(_('Over %s page or enter the new one...'), $totalPages), sprintf(_('Over %s pages or enter the new one...'), $totalPages), sprintf(_('Over %s pages or enter the new one...'), $totalPages), ]); // Filter request data $q = !empty($_GET['q']) ? Filter::url($_GET['q']) : ''; // Crawl request if (filter_var($q, FILTER_VALIDATE_URL) && preg_match(CRAWL_URL_REGEXP, $q)) { $db->initPage($q, time()); } // Search request if (!empty($q)) { $results = $db->searchPages('"' . $q . '"'); $resultsTotal = $db->searchPagesTotal('"' . $q . '"'); } else { $results = []; $resultsTotal = 0; } ?>