#####################################
# ShopCMS: Скрипт интернет-магазина
# Copyright (c) by ADGroup
# http://shopcms.ru
#####################################
function gmts(){
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
function set_cookie($name_cookie, $value_cookie = "", $expires_cookie = "", $secure_cookie = false, $path_cookie = "", $domain_cookie = "", $httponly_cookie = false ){
header("Set-Cookie: ".rawurlencode($name_cookie)."=".rawurlencode($value_cookie)
.(empty($expires_cookie) ? "" : "; expires=".gmdate("D, d-M-Y H:i:s", $expires_cookie)." GMT")
.(empty($path_cookie) ? "" : "; path=".$path_cookie)
.(empty($domain_cookie) ? "" : "; domain=".$domain_cookie)
.(!$secure_cookie ? "" : "; secure")
.(!$httponly_cookie ? "" : "; HttpOnly"), false);
}
define('SECURITY_STOP_MSG', 'License not found!');
define('SECURITY_NOLIC_MSG', 'Invalid license!');
define('ERROR_DB_INIT', 'Database connection problem!');
$sc_1 = gmts();
$sc_4 = 0;
$sc_8 = 0;
$gmc = 1;
if(!in_array(getenv('HTTP_HOST'), array("127.0.0.1", "localhost"))){
if(file_exists("core/config/license.txt")){
if(!in_array(md5(strtr($_SERVER['HTTP_HOST'], array("www." => ""))."sNLYnT"), explode("dlv1b", trim(file_get_contents("core/config/license.txt"))))){
exit(SECURITY_NOLIC_MSG);
}
}else{
exit(SECURITY_STOP_MSG);
}
}