// Version define('VERSION', '2.3.0.2'); /* $ip = $_SERVER['REMOTE_ADDR']; $details = json_decode(file_get_contents("http://ipinfo.io/{$ip}/json")); if(isset($details->org) && strpos(strtolower($details->org), 'amazon.com') !== FALSE){ if($ip=='35.168.24.103' || $ip=='35.153.250.186' || $ip=='35.170.222.215' || $ip=='34.237.55.166'){ //do nothing }else{ exit; } } */ // Configuration if (is_file('config.php')) { require_once('config.php'); } //require_once(DIR_SYSTEM . 'library/v2pagecache.php'); //V2PAGECACHE //$pagecache = new V2PageCache(); //V2PAGECACHE //if (/*$pagecache->isCrawlBot() && */ false && $pagecache->ServeFromCache()) { //V2PAGECACHE // exit here if we served this page from the cache //V2PAGECACHE // return; //V2PAGECACHE //} //V2PAGECACHE // Install if (!defined('DIR_APPLICATION')) { header('Location: install/index.php'); exit; } //if (file_exists(DIR_SYSTEM.'lightning/gamma.php')) require(DIR_SYSTEM.'lightning/gamma.php'); //Lightning // Startup require_once(DIR_SYSTEM . 'startup.php'); start('catalog'); register_shutdown_function(function() { if (class_exists('\DB\MySQLi')) { gc_collect_cycles(); // Optional: help clean up circular references } }); // Close DB connection manually to prevent idle 'Sleep' state if (isset($registry) && $registry->has('db')) { $db = $registry->get('db'); if (method_exists($db, '__destruct')) { $db->__destruct(); // Manually call destructor } }