Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_GET['s']) && !mb_detect_encoding($_GET['s'], 'UTF-8', true)) {
- $_GET['s'] = utf8_encode($_GET['s']);
- $params = 's=' . $_GET['s'];
- // parâmetros do ac
- if (isset($_GET['p'])) {
- $params .= '&p=' . $_GET['p'];
- }
- if (isset($_GET['ranking'])) {
- $params .= '&ranking=' . $_GET['ranking'];
- }
- if (isset($_GET['typeclick'])) {
- $params .= '&typeclick=' . $_GET['typeclick'];
- }
- if (isset($_GET['ac_pos'])) {
- $params .= '&ac_pos=' . $_GET['ac_pos'];
- }
- header("HTTP/1.1 301 Moved Permanently");
- header('Location: /busca?' . $params);
- exit();
- }
- if (isset($_GET['pesquisa'])) {
- header("HTTP/1.1 301 Moved Permanently");
- header('Location: /busca?s=' . $_GET['pesquisa']);
- exit();
- }
- /**
- * Includes the site general functions
- */
- include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'define.php';
- try
- {
- // Instantiate the neemu object
- $neemu = new Neemu($storeConfig);
- // runs the search
- $neemu->localSearch($searchConfig);
- // ajaxSearch
- if (isset($_GET['ajaxSearch']) && $_GET['ajaxSearch'] == 1 ) {
- echo $neemu->getAjaxJson();
- exit;
- }else {
- redirectPDP($neemu);
- }
- }
- catch (Exception $e)
- {
- include 'header.php';
- include 'not-found.php';
- include 'footer.php';
- exit;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement