{
    "cat_session": {
        "path": "\/home\/v\/vg2271\/fit\/public_html\/catalog\/controller\/startup\/session.php",
        "exists": true,
        "writable": true,
        "content": "<?php\nclass ControllerStartupSession extends Controller {\n\tpublic function index() {\n\t\tif (isset($this->request->get['api_token']) && isset($this->request->get['route']) && substr($this->request->get['route'], 0, 4) == 'api\/') {\n\t\t\t$this->db->query(\"DELETE FROM `\" . DB_PREFIX . \"api_session` WHERE TIMESTAMPADD(HOUR, 1, date_modified) < NOW()\");\n\t\t\t\t\t\n\t\t\t\/\/ Make sure the IP is allowed\n\t\t\t$api_query = $this->db->query(\"SELECT DISTINCT * FROM `\" . DB_PREFIX . \"api` `a` LEFT JOIN `\" . DB_PREFIX . \"api_session` `as` ON (a.api_id = as.api_id) LEFT JOIN \" . DB_PREFIX . \"api_ip `ai` ON (a.api_id = ai.api_id) WHERE a.status = '1' AND `as`.`session_id` = '\" . $this->db->escape($this->request->get['api_token']) . \"' AND ai.ip = '\" . $this->db->escape($this->request->server['REMOTE_ADDR']) . \"'\");\n\t\t \n\t\t\tif ($api_query->num_rows) {\n\t\t\t\t$this->session->start($this->request->get['api_token']);\n\t\t\t\t\n\t\t\t\t\/\/ keep the session alive\n\t\t\t\t$this->db->query(\"UPDATE `\" . DB_PREFIX . \"api_session` SET `date_modified` = NOW() WHERE `api_session_id` = '\" . (int)$api_query->row['api_session_id'] . \"'\");\n\t\t\t}\n\t\t} else {\n\t\t\tif (isset($_COOKIE[$this->config->get('session_name')])) {\n\t\t\t\t$session_id = $_COOKIE[$this->config->get('session_name')];\n\t\t\t} else {\n\t\t\t\t$session_id = '';\n\t\t\t}\n\t\t\t\n\t\t\t$this->session->start($session_id);\n\t\t\t\n\t\t\t$zm33_lifetime = (int)ini_get('session.cookie_lifetime');\n\t\t\t$zm33_cookie = array(\n\t\t\t\t'expires'  => $zm33_lifetime > 0 ? (time() + $zm33_lifetime) : 0,\n\t\t\t\t'path'     => ini_get('session.cookie_path') ? ini_get('session.cookie_path') : '\/',\n\t\t\t\t'domain'   => ini_get('session.cookie_domain') ? ini_get('session.cookie_domain') : '',\n\t\t\t\t'secure'   => true,\n\t\t\t\t'httponly' => true,\n\t\t\t\t'samesite' => 'Lax'\n\t\t\t);\n\t\t\tsetcookie($this->config->get('session_name'), $this->session->getId(), $zm33_cookie);\n\t\t\tif (!headers_sent() && empty($GLOBALS['zm33_sec_headers_sent_m208'])) {\n\t\t\t\t$GLOBALS['zm33_sec_headers_sent_m208'] = 1;\n\t\t\t\theader('Strict-Transport-Security: max-age=31536000; includeSubDomains');\n\t\t\t\theader('X-Frame-Options: SAMEORIGIN');\n\t\t\t\theader('X-Content-Type-Options: nosniff');\n\t\t\t\theader('Referrer-Policy: strict-origin-when-cross-origin');\n\t\t\t\theader(\"Content-Security-Policy: default-src 'self' https: data: blob:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https:; style-src 'self' 'unsafe-inline' https:; img-src 'self' data: https: blob:; font-src 'self' data: https:; frame-ancestors 'self'; base-uri 'self'; form-action 'self' https:; object-src 'none'\");\n\t\t\t}\t\n\t\t}\n\t}\n}"
    },
    "admin_session": {
        "path": "\/home\/v\/vg2271\/fit\/public_html\/admin\/controller\/startup\/session.php",
        "exists": false,
        "writable": false
    },
    "response": {
        "path": "\/home\/v\/vg2271\/fit\/public_html\/system\/library\/response.php",
        "exists": true,
        "writable": true,
        "content": "<?php\n\/**\n * @package\t\tOpenCart\n * @author\t\tDaniel Kerr\n * @copyright\tCopyright (c) 2005 - 2017, OpenCart, Ltd. (https:\/\/www.opencart.com\/)\n * @license\t\thttps:\/\/opensource.org\/licenses\/GPL-3.0\n * @link\t\thttps:\/\/www.opencart.com\n*\/\n\n\/**\n* Response class\n*\/\nclass Response {\n\tprivate $headers = array();\n\tprivate $level = 0;\n\tprivate $output;\n\n\t\/**\n\t * Constructor\n\t *\n\t * @param\tstring\t$header\n\t *\n \t*\/\n\tpublic function addHeader($header) {\n\t\t$this->headers[] = $header;\n\t}\n\t\n\t\/**\n\t * \n\t *\n\t * @param\tstring\t$url\n\t * @param\tint\t\t$status\n\t *\n \t*\/\n\tpublic function redirect($url, $status = 302) {\n\t\theader('Location: ' . str_replace(array('&amp;', \"\\n\", \"\\r\"), array('&', '', ''), $url), true, $status);\n\t\texit();\n\t}\n\t\n\t\/**\n\t * \n\t *\n\t * @param\tint\t\t$level\n \t*\/\n\tpublic function setCompression($level) {\n\t\t$this->level = $level;\n\t}\n\t\n\t\/**\n\t * \n\t *\n\t * @return\tarray\n \t*\/\n\tpublic function getOutput() {\n\t\treturn $this->output;\n\t}\n\t\n\t\/**\n\t * \n\t *\n\t * @param\tstring\t$output\n \t*\/\t\n\tpublic function setOutput($output) {\n\t\t$this->output = $output;\n\t}\n\t\n\t\/**\n\t * \n\t *\n\t * @param\tstring\t$data\n\t * @param\tint\t\t$level\n\t * \n\t * @return\tstring\n \t*\/\n\tprivate function compress($data, $level = 0) {\n\t\tif (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false)) {\n\t\t\t$encoding = 'gzip';\n\t\t}\n\n\t\tif (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') !== false)) {\n\t\t\t$encoding = 'x-gzip';\n\t\t}\n\n\t\tif (!isset($encoding) || ($level < -1 || $level > 9)) {\n\t\t\treturn $data;\n\t\t}\n\n\t\tif (!extension_loaded('zlib') || ini_get('zlib.output_compression')) {\n\t\t\treturn $data;\n\t\t}\n\n\t\tif (headers_sent()) {\n\t\t\treturn $data;\n\t\t}\n\n\t\tif (connection_status()) {\n\t\t\treturn $data;\n\t\t}\n\n\t\t$this->addHeader('Content-Encoding: ' . $encoding);\n\n\t\treturn gzencode($data, (int)$level);\n\t}\n\t\n\t\/**\n\t * \n \t*\/\n\tpublic function output() {\n\t\tif ($this->output) {\n\t\t\t$output = $this->level ? $this->compress($this->output, $this->level) : $this->output;\n\t\t\t\n\t\t\t\t\t\t\/\/ ZM33 security headers m208\n\t\t\tif (!isset($GLOBALS['zm33_sec_headers_m208'])) {\n\t\t\t\t$GLOBALS['zm33_sec_headers_m208'] = 1;\n\t\t\t\t$zm33_sec = array(\n\t\t\t\t\t'Strict-Transport-Security: max-age=31536000; includeSubDomains',\n\t\t\t\t\t'X-Frame-Options: SAMEORIGIN',\n\t\t\t\t\t'X-Content-Type-Options: nosniff',\n\t\t\t\t\t'Referrer-Policy: strict-origin-when-cross-origin',\n\t\t\t\t\t\"Content-Security-Policy: default-src 'self' https: data: blob:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https:; style-src 'self' 'unsafe-inline' https:; img-src 'self' data: https: blob:; font-src 'self' data: https:; frame-ancestors 'self'; base-uri 'self'; form-action 'self' https:; object-src 'none'\"\n\t\t\t\t);\n\t\t\t\tforeach ($zm33_sec as $zm33_h) {\n\t\t\t\t\t$zm33_name = strtolower(trim(strtok($zm33_h, ':')));\n\t\t\t\t\t$zm33_have = false;\n\t\t\t\t\tforeach ($this->headers as $zm33_ex) {\n\t\t\t\t\t\tif (stripos($zm33_ex, $zm33_name . ':') === 0) { $zm33_have = true; break; }\n\t\t\t\t\t}\n\t\t\t\t\tif (!$zm33_have) {\n\t\t\t\t\t\t$this->headers[] = $zm33_h;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!headers_sent()) {\n\t\t\t\tforeach ($this->headers as $header) {\n\t\t\t\t\theader($header, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\techo $output;\n\t\t}\n\t}\n}\n"
    },
    "mod_response": {
        "path": "\/home\/v\/vg2271\/fit\/storage\/modification\/system\/library\/response.php",
        "exists": true,
        "writable": true,
        "content": "<?php\n\/**\n * @package\t\tOpenCart\n * @author\t\tDaniel Kerr\n * @copyright\tCopyright (c) 2005 - 2017, OpenCart, Ltd. (https:\/\/www.opencart.com\/)\n * @license\t\thttps:\/\/opensource.org\/licenses\/GPL-3.0\n * @link\t\thttps:\/\/www.opencart.com\n*\/\n\n\/**\n* Response class\n*\/\nclass Response {\n\tprivate $headers = array();\n\tprivate $level = 0;\n\tprivate $output;\n\n\t\/**\n\t * Constructor\n\t *\n\t * @param\tstring\t$header\n\t *\n \t*\/\n\tpublic function addHeader($header) {\n\t\t$this->headers[] = $header;\n\t}\n\t\n\t\/**\n\t * \n\t *\n\t * @param\tstring\t$url\n\t * @param\tint\t\t$status\n\t *\n \t*\/\n\tpublic function redirect($url, $status = 302) {\n\t\theader('Location: ' . str_replace(array('&amp;', \"\\n\", \"\\r\"), array('&', '', ''), $url), true, $status);\n\t\texit();\n\t}\n\t\n\t\/**\n\t * \n\t *\n\t * @param\tint\t\t$level\n \t*\/\n\tpublic function setCompression($level) {\n\t\t$this->level = $level;\n\t}\n\t\n\t\/**\n\t * \n\t *\n\t * @return\tarray\n \t*\/\n\tpublic function getOutput() {\n\t\treturn $this->output;\n\t}\n\t\n\t\/**\n\t * \n\t *\n\t * @param\tstring\t$output\n \t*\/\t\n\tpublic function setOutput($output) {\n\t\t$this->output = $output;\n\t}\n\t\n\t\/**\n\t * \n\t *\n\t * @param\tstring\t$data\n\t * @param\tint\t\t$level\n\t * \n\t * @return\tstring\n \t*\/\n\tprivate function compress($data, $level = 0) {\n\t\tif (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false)) {\n\t\t\t$encoding = 'gzip';\n\t\t}\n\n\t\tif (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') !== false)) {\n\t\t\t$encoding = 'x-gzip';\n\t\t}\n\n\t\tif (!isset($encoding) || ($level < -1 || $level > 9)) {\n\t\t\treturn $data;\n\t\t}\n\n\t\tif (!extension_loaded('zlib') || ini_get('zlib.output_compression')) {\n\t\t\treturn $data;\n\t\t}\n\n\t\tif (headers_sent()) {\n\t\t\treturn $data;\n\t\t}\n\n\t\tif (connection_status()) {\n\t\t\treturn $data;\n\t\t}\n\n\t\t$this->addHeader('Content-Encoding: ' . $encoding);\n\n\t\treturn gzencode($data, (int)$level);\n\t}\n\t\n\t\/**\n\t * \n \t*\/\n \t\n\/\/WebP Images, author agatha65 agatha65.com, link www.opencart.com\/index.php?route=marketplace\/extension\/info&extension_id=38025\n\/\/\"This extension is based on a similar one with another library by my colleague from stick-design.ru\"\n\/\/\"All credits goes to V. Bulgakov\"\n\/\/WebP Images start\n\tpublic function webpAdd() {\n\t\t$gd = gd_info();\n\t\tif ($gd['WebP Support']) {\n\t\t\t$uri = '';\n\n\t\t\tif (isset($_SERVER['REQUEST_URI'])) {\n\t\t\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\t\t}\n\n\t\t\tif (stripos($uri, 'admin') === false) {\n\t\t\t\tif (isset($_SERVER['HTTP_ACCEPT']) && isset($_SERVER['HTTP_USER_AGENT'])) {\n\t\t\t\t\tif( strpos( $_SERVER['HTTP_ACCEPT'], 'image\/webp' ) !== false ) {\n\t\t\t\t\t\t$re = '\/(\\\/cache)(.*)(\\.jpg|\\.png|.jpeg)(?!-)\/Ui';\n\t\t\t\t\t\t$subst = '$1webp$2.webp';\n\t\t\t\t\t\t$this->output = preg_replace($re, $subst, $this->output);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\/\/WebP Images end\n\t\t\t\n\tpublic function output() {\n\n\t\tif ($this->output && strpos($this->output, '<urlset') !== false && strpos($this-><url>  <loc>https://zm33.ru/</loc>  <changefreq>daily</changefreq>  <priority>1.0</priority></url>output, 'sitemaps.org') !== false) {\n\t\t\tif (is_file(DIR_SYSTEM . 'zm33_seo_jobs.php')) {\n\t\t\t\trequire_once DIR_SYSTEM . 'zm33_seo_jobs.php';\n\t\t\t}\n\t\t\tif (function_exists('zm33_seo_sitemap_finalize')) {\n\t\t\t\t$this->output = zm33_seo_sitemap_finalize($this->output);\n\t\t\t}\n\t\t\t$this->addHeader('Content-Type: application\/xml; charset=utf-8');\n\t\t\t$this->addHeader('X-ZM33-Sitemap: MISS');\n\t\t\t$this->addHeader('Cache-Control: public, max-age=3600');\n\t\t}\n\n\t\tif ($this->output) {\n\n\/\/WebP Images start\n$this->webpAdd();\n\/\/WebP Images end\n\t\t\t$output = $this->level ? $this->compress($this->output, $this->level) : $this->output;\n\t\t\t\n\t\t\t\t\t\t\/\/ ZM33 security headers m208\n\t\t\tif (!isset($GLOBALS['zm33_sec_headers_m208'])) {\n\t\t\t\t$GLOBALS['zm33_sec_headers_m208'] = 1;\n\t\t\t\t$zm33_sec = array(\n\t\t\t\t\t'Strict-Transport-Security: max-age=31536000; includeSubDomains',\n\t\t\t\t\t'X-Frame-Options: SAMEORIGIN',\n\t\t\t\t\t'X-Content-Type-Options: nosniff',\n\t\t\t\t\t'Referrer-Policy: strict-origin-when-cross-origin',\n\t\t\t\t\t\"Content-Security-Policy: default-src 'self' https: data: blob:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https:; style-src 'self' 'unsafe-inline' https:; img-src 'self' data: https: blob:; font-src 'self' data: https:; frame-ancestors 'self'; base-uri 'self'; form-action 'self' https:; object-src 'none'\"\n\t\t\t\t);\n\t\t\t\tforeach ($zm33_sec as $zm33_h) {\n\t\t\t\t\t$zm33_name = strtolower(trim(strtok($zm33_h, ':')));\n\t\t\t\t\t$zm33_have = false;\n\t\t\t\t\tforeach ($this->headers as $zm33_ex) {\n\t\t\t\t\t\tif (stripos($zm33_ex, $zm33_name . ':') === 0) { $zm33_have = true; break; }\n\t\t\t\t\t}\n\t\t\t\t\tif (!$zm33_have) {\n\t\t\t\t\t\t$this->headers[] = $zm33_h;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!headers_sent()) {\n\t\t\t\tforeach ($this->headers as $header) {\n\t\t\t\t\theader($header, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\n\t\t\tif ($this->output && strpos($this->output, '<urlset') !== false && strpos($this->output, 'sitemaps.org') !== false) {\n\t\t\t\tif (is_file(DIR_SYSTEM . 'zm33_seo_jobs.php')) {\n\t\t\t\t\trequire_once DIR_SYSTEM . 'zm33_seo_jobs.php';\n\t\t\t\t}\n\t\t\t\tif (function_exists('zm33_seo_sitemap_finalize')) {\n\t\t\t\t\t$this->output = zm33_seo_sitemap_finalize($this->output);\n\t\t\t\t}\n\t\t\t\t$this->addHeader('Content-Type: application\/xml; charset=utf-8');\n\t\t\t\t$this->addHeader('X-ZM33-Sitemap: MISS');\n\t\t\t\t$this->addHeader('Cache-Control: public, max-age=3600');\n\t\t\t}\n\n\t\t\t\/\/ ZM33: store guest HTML page cache\n\t\t\tif (!empty($GLOBALS['zm33_page_cache_file']) && !empty($this->output) && strpos($this->output, '<html') !== false) {\n\t\t\t\t$zm33_pc_save = (string)$GLOBALS['zm33_page_cache_file'];\n\t\t\t\t$zm33_pc_dir = dirname($zm33_pc_save);\n\t\t\t\tif (!is_dir($zm33_pc_dir)) {\n\t\t\t\t\t@mkdir($zm33_pc_dir, 0755, true);\n\t\t\t\t}\n\t\t\t\t@file_put_contents($zm33_pc_save, $this->output, LOCK_EX);\n\t\t\t\tunset($GLOBALS['zm33_page_cache_file']);\n\t\t\t}\n\n\t\t\techo $output;\n\t\t}\n\t}\n}\n"
    },
    "htaccess": {
        "path": "\/home\/v\/vg2271\/fit\/public_html\/.htaccess",
        "exists": true,
        "writable": true,
        "content": "# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.\n\n# 2. In your opencart directory rename htaccess.txt to .htaccess.\n\n# For any support issues please visit: http:\/\/www.opencart.com\n\nOptions +FollowSymlinks\n\n# Prevent Directoy listing\nOptions -Indexes\n\n# Prevent Direct Access to files\n<FilesMatch \"(?i)((\\.tpl|.twig|\\.ini|\\.log|(?<!robots)\\.txt))\">\n Require all denied\n## For apache 2.2 and older, replace \"Require all denied\" with these two lines :\n# Order deny,allow\n# Deny from all\n<\/FilesMatch>\n\n# SEO URL Settings\nRewriteEngine On\n# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. \/ becomes \/shop\/\n\nRewriteBase \/\nRewriteRule ^sitemap.xml$ index.php?route=extension\/feed\/google_sitemap [L]\nRewriteRule ^googlebase.xml$ index.php?route=extension\/feed\/google_base [L]\nRewriteRule ^system\/storage\/(.*) index.php?route=error\/not_found [L]\nRewriteCond %{REQUEST_FILENAME} !-f\nRewriteCond %{REQUEST_FILENAME} !-d\nRewriteCond %{REQUEST_URI} !.*\\.(ico|gif|jpg|jpeg|png|js|css)\n\n\n\n# ZM33 m218 home-trainer merge 301\nRewriteRule ^vybor-sportivnogo-trenazhera-dlya-doma\/?$ https:\/\/zm33.ru\/kak-vybrat-trenazher-dlya-doma [R=301,L]\n\nRewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]\n\n### Additional Settings that may need to be enabled for some servers\n### Uncomment the commands by removing the # sign in front of it.\n### If you get an \"Internal Server Error 500\" after enabling any of the following settings, restore the # as this means your host doesn't allow that.\n\n# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:\n# php_flag register_globals off\n\n# 2. If your cart has magic quotes enabled, This may work to disable it:\n# php_flag magic_quotes_gpc Off\n\n# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try\n# php_value upload_max_filesize 999M\n\n# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields\n# php_value post_max_size 999M\n\n# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields\n# php_value max_execution_time 200\n\n# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields\n# php_value max_input_time 200\n\n# 7. disable open_basedir limitations\n# php_admin_value open_basedir none\n# php_value max_input_vars 20000"
    },
    "startup_php": {
        "path": "\/home\/v\/vg2271\/fit\/public_html\/catalog\/controller\/startup\/startup.php",
        "exists": true,
        "writable": true,
        "content": "<?php\nclass ControllerStartupStartup extends Controller {\n\n\tpublic function __isset($key) {\n\t\t\/\/ To make sure that calls to isset also support dynamic properties from the registry\n\t\t\/\/ See https:\/\/www.php.net\/manual\/en\/language.oop5.overloading.php#object.isset\n\t\tif ($this->registry) {\n\t\t\tif ($this->registry->get($key)!==null) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic function index() {\n\t\t\/\/ Store\n\t\tif ($this->request->server['HTTPS']) {\n\t\t\t$query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"store WHERE REPLACE(`ssl`, 'www.', '') = '\" . $this->db->escape('https:\/\/' . str_replace('www.', '', $_SERVER['HTTP_HOST']) . rtrim(dirname($_SERVER['PHP_SELF']), '\/.\\\\') . '\/') . \"'\");\n\t\t} else {\n\t\t\t$query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"store WHERE REPLACE(`url`, 'www.', '') = '\" . $this->db->escape('http:\/\/' . str_replace('www.', '', $_SERVER['HTTP_HOST']) . rtrim(dirname($_SERVER['PHP_SELF']), '\/.\\\\') . '\/') . \"'\");\n\t\t}\n\t\t\n\t\tif (isset($this->request->get['store_id'])) {\n\t\t\t$this->config->set('config_store_id', (int)$this->request->get['store_id']);\n\t\t} else if ($query->num_rows) {\n\t\t\t$this->config->set('config_store_id', $query->row['store_id']);\n\t\t} else {\n\t\t\t$this->config->set('config_store_id', 0);\n\t\t}\n\t\t\n\t\tif (!$query->num_rows) {\n\t\t\t$this->config->set('config_url', HTTP_SERVER);\n\t\t\t$this->config->set('config_ssl', HTTPS_SERVER);\n\t\t}\n\t\t\n\t\t\/\/ Settings\n\t\t$query = $this->db->query(\"SELECT * FROM `\" . DB_PREFIX . \"setting` WHERE store_id = '0' OR store_id = '\" . (int)$this->config->get('config_store_id') . \"' ORDER BY store_id ASC\");\n\t\t\n\t\tforeach ($query->rows as $result) {\n\t\t\tif (!$result['serialized']) {\n\t\t\t\t$this->config->set($result['key'], $result['value']);\n\t\t\t} else {\n\t\t\t\t$this->config->set($result['key'], json_decode($result['value'], true));\n\t\t\t}\n\t\t}\n\n\t\t\/\/ Set time zone\n\t\tif ($this->config->get('config_timezone')) {\n\t\t\tdate_default_timezone_set($this->config->get('config_timezone'));\n\n\t\t\t\/\/ Sync PHP and DB time zones.\n\t\t\t$this->db->query(\"SET time_zone = '\" . $this->db->escape(date('P')) . \"'\");\n\t\t}\n\n\t\t\/\/ Theme\n\t\t$this->config->set('template_cache', $this->config->get('developer_theme'));\n\t\t\n\t\t\/\/ Url\n\t\t$this->registry->set('url', new Url($this->config->get('config_url'), $this->config->get('config_ssl')));\n\t\t\n\t\t\/\/ Language\n\t\t$code = '';\n\t\t\n\t\t$this->load->model('localisation\/language');\n\t\t\n\t\t$languages = $this->model_localisation_language->getLanguages();\n\t\t\n\t\tif (isset($this->session->data['language'])) {\n\t\t\t$code = $this->session->data['language'];\n\t\t}\n\t\t\t\t\n\t\tif (isset($this->request->cookie['language']) && !array_key_exists($code, $languages)) {\n\t\t\t$code = $this->request->cookie['language'];\n\t\t}\n\t\t\n\t\t\/\/ Language Detection\n\t\tif (!empty($this->request->server['HTTP_ACCEPT_LANGUAGE']) && !array_key_exists($code, $languages)) {\n\t\t\t$detect = '';\n\t\t\t\n\t\t\t$browser_languages = explode(',', $this->request->server['HTTP_ACCEPT_LANGUAGE']);\n\t\t\t\n\t\t\t\/\/ Try using local to detect the language\n\t\t\tforeach ($browser_languages as $browser_language) {\n\t\t\t\tforeach ($languages as $key => $value) {\n\t\t\t\t\tif ($value['status']) {\n\t\t\t\t\t\t$locale = explode(',', $value['locale']);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (in_array($browser_language, $locale)) {\n\t\t\t\t\t\t\t$detect = $key;\n\t\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tif (!$detect) { \n\t\t\t\t\/\/ Try using language folder to detect the language\n\t\t\t\tforeach ($browser_languages as $browser_language) {\n\t\t\t\t\tif (array_key_exists(strtolower($browser_language), $languages)) {\n\t\t\t\t\t\t$detect = strtolower($browser_language);\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$code = $detect ? $detect : '';\n\t\t}\n\t\t\n\t\tif (!array_key_exists($code, $languages)) {\n\t\t\t$code = $this->config->get('config_language');\n\t\t}\n\t\t\n\t\tif (!isset($this->session->data['language']) || $this->session->data['language'] != $code) {\n\t\t\t$this->session->data['language'] = $code;\n\t\t}\n\t\t\t\t\n\t\tif (!isset($this->request->cookie['language']) || $this->request->cookie['language'] != $code) {\n\t\t\tsetcookie('language', $code, time() + 60 * 60 * 24 * 30, '\/', $this->request->server['HTTP_HOST']);\n\t\t}\n\t\t\t\t\n\t\t\/\/ Overwrite the default language object\n\t\t$language = new Language($code);\n\t\t$language->load($code);\n\t\t\n\t\t$this->registry->set('language', $language);\n\t\t\n\t\t\/\/ Set the config language_id\n\t\t$this->config->set('config_language_id', $languages[$code]['language_id']);\t\n\n\t\t\/\/ Customer\n\t\t$customer = new Cart\\Customer($this->registry);\n\t\t$this->registry->set('customer', $customer);\n\t\t\n\t\t\/\/ Customer Group\n\t\tif (isset($this->session->data['customer']) && isset($this->session->data['customer']['customer_group_id'])) {\n\t\t\t\/\/ For API calls\n\t\t\t$this->config->set('config_customer_group_id', $this->session->data['customer']['customer_group_id']);\n\t\t} elseif ($this->customer->isLogged()) {\n\t\t\t\/\/ Logged in customers\n\t\t\t$this->config->set('config_customer_group_id', $this->customer->getGroupId());\n\t\t} elseif (isset($this->session->data['guest']) && isset($this->session->data['guest']['customer_group_id'])) {\n\t\t\t$this->config->set('config_customer_group_id', $this->session->data['guest']['customer_group_id']);\n\t\t} else {\n\t\t\t$this->config->set('config_customer_group_id', $this->config->get('config_customer_group_id'));\n\t\t}\n\t\t\n\t\t\/\/ Tracking Code\n\t\tif (isset($this->request->get['tracking'])) {\n\t\t\tsetcookie('tracking', $this->request->get['tracking'], time() + 3600 * 24 * 1000, '\/');\n\t\t\n\t\t\t$this->db->query(\"UPDATE `\" . DB_PREFIX . \"marketing` SET clicks = (clicks + 1) WHERE code = '\" . $this->db->escape($this->request->get['tracking']) . \"'\");\n\t\t}\t\t\n\t\t\n\t\t\/\/ Currency\n\t\t$code = '';\n\t\t\n\t\t$this->load->model('localisation\/currency');\n\t\t\n\t\t$currencies = $this->model_localisation_currency->getCurrencies();\n\t\t\n\t\tif (isset($this->session->data['currency'])) {\n\t\t\t$code = $this->session->data['currency'];\n\t\t}\n\t\t\n\t\tif (isset($this->request->cookie['currency']) && !array_key_exists($code, $currencies)) {\n\t\t\t$code = $this->request->cookie['currency'];\n\t\t}\n\t\t\n\t\tif (!array_key_exists($code, $currencies)) {\n\t\t\t$code = $this->config->get('config_currency');\n\t\t}\n\t\t\n\t\tif (!isset($this->session->data['currency']) || $this->session->data['currency'] != $code) {\n\t\t\t$this->session->data['currency'] = $code;\n\t\t}\n\t\t\n\t\tif (!isset($this->request->cookie['currency']) || $this->request->cookie['currency'] != $code) {\n\t\t\tsetcookie('currency', $code, time() + 60 * 60 * 24 * 30, '\/', $this->request->server['HTTP_HOST']);\n\t\t}\t\t\n\t\t\n\t\t$this->registry->set('currency', new Cart\\Currency($this->registry));\n\t\t\n\t\t\/\/ Tax\n\t\t$this->registry->set('tax', new Cart\\Tax($this->registry));\n\t\t\n\t\t\/\/ PHP v7.4+ validation compatibility.\n\t\tif (isset($this->session->data['shipping_address']['country_id']) && isset($this->session->data['shipping_address']['zone_id'])) {\n\t\t\t$this->tax->setShippingAddress($this->session->data['shipping_address']['country_id'], $this->session->data['shipping_address']['zone_id']);\n\t\t} elseif ($this->config->get('config_tax_default') == 'shipping') {\n\t\t\t$this->tax->setShippingAddress($this->config->get('config_country_id'), $this->config->get('config_zone_id'));\n\t\t}\n\n\t\tif (isset($this->session->data['payment_address']['country_id']) && isset($this->session->data['payment_address']['zone_id'])) {\n\t\t\t$this->tax->setPaymentAddress($this->session->data['payment_address']['country_id'], $this->session->data['payment_address']['zone_id']);\n\t\t} elseif ($this->config->get('config_tax_default') == 'payment') {\n\t\t\t$this->tax->setPaymentAddress($this->config->get('config_country_id'), $this->config->get('config_zone_id'));\n\t\t}\n\n\t\t$this->tax->setStoreAddress($this->config->get('config_country_id'), $this->config->get('config_zone_id'));\n\t\t\n\t\t\/\/ Weight\n\t\t$this->registry->set('weight', new Cart\\Weight($this->registry));\n\t\t\n\t\t\/\/ Length\n\t\t$this->registry->set('length', new Cart\\Length($this->registry));\n\t\t\n\t\t\/\/ Cart\n\t\t$this->registry->set('cart', new Cart\\Cart($this->registry));\n\t\t\n\t\t\/\/ Encryption\n\t\t$this->registry->set('encryption', new Encryption($this->config->get('config_encryption')));\n\t}\n}\n"
    },
    "framework": {
        "path": "\/home\/v\/vg2271\/fit\/public_html\/system\/framework.php",
        "exists": true,
        "writable": true,
        "content": "<?php\n\/\/ Registry\n$registry = new Registry();\n\n\/\/ Config\n$config = new Config();\n$config->load('default');\n$config->load($application_config);\n$registry->set('config', $config);\n\n\/\/ Log\n$log = new Log($config->get('error_filename'));\n$registry->set('log', $log);\n\ndate_default_timezone_set($config->get('date_timezone'));\n\nset_error_handler(function($code, $message, $file, $line) use($log, $config) {\n\t\/\/ error suppressed with @\n\tif (!(error_reporting() & $code)) {\n\t\treturn false;\n\t}\n\n\tswitch ($code) {\n\t\tcase E_NOTICE:\n\t\tcase E_USER_NOTICE:\n\t\t\t$error = 'Notice';\n\t\t\tbreak;\n\t\tcase E_WARNING:\n\t\tcase E_USER_WARNING:\n\t\t\t$error = 'Warning';\n\t\t\tbreak;\n\t\tcase E_ERROR:\n\t\tcase E_USER_ERROR:\n\t\t\t$error = 'Fatal Error';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$error = 'Unknown';\n\t\t\tbreak;\n\t}\n\n\tif ($config->get('error_display')) {\n\t\techo '<b>' . $error . '<\/b>: ' . $message . ' in <b>' . $file . '<\/b> on line <b>' . $line . '<\/b>';\n\t}\n\n\tif ($config->get('error_log')) {\n\t\t$log->write('PHP ' . $error . ':  ' . $message . ' in ' . $file . ' on line ' . $line);\n\t}\n\n\treturn true;\n});\n\n\/\/ Event\n$event = new Event($registry);\n$registry->set('event', $event);\n\n\/\/ Event Register\nif ($config->has('action_event')) {\n\tforeach ($config->get('action_event') as $key => $value) {\n\t\tforeach ($value as $priority => $action) {\n\t\t\t$event->register($key, new Action($action), $priority);\n\t\t}\n\t}\n}\n\n\/\/ Loader\n$loader = new Loader($registry);\n$registry->set('load', $loader);\n\n\/\/ Request\n$registry->set('request', new Request());\n\n\/\/ Response\n$response = new Response();\n$response->addHeader('Content-Type: text\/html; charset=utf-8');\n$response->setCompression($config->get('config_compression'));\n$registry->set('response', $response);\n\n\/\/ Database\nif ($config->get('db_autostart')) {\n\t$db = new DB($config->get('db_engine'), $config->get('db_hostname'), $config->get('db_username'), $config->get('db_password'), $config->get('db_database'), $config->get('db_port'));\n\t$registry->set('db', $db);\n\n\t\/\/ Sync PHP and DB time zones\n\t$db->query(\"SET time_zone = '\" . $db->escape(date('P')) . \"'\");\n}\n\n\/\/ Session\n$session = new Session($config->get('session_engine'), $registry);\n$registry->set('session', $session);\n\nif ($config->get('session_autostart')) {\n\t\/*\n\tWe are adding the session cookie outside of the session class as I believe\n\tPHP messed up in a big way handling sessions. Why in the hell is it so hard to\n\thave more than one concurrent session using cookies!\n\n\tIs it not better to have multiple cookies when accessing parts of the system\n\tthat requires different cookie sessions for security reasons.\n\n\tAlso cookies can be accessed via the URL parameters. So why force only one cookie\n\tfor all sessions!\n\t*\/\n\n\tif (isset($_COOKIE[$config->get('session_name')])) {\n\t\t$session_id = $_COOKIE[$config->get('session_name')];\n\t} else {\n\t\t$session_id = '';\n\t}\n\n\t$session->start($session_id);\n\n\tsetcookie($config->get('session_name'), $session->getId(), ini_get('session.cookie_lifetime'), ini_get('session.cookie_path'), ini_get('session.cookie_domain'));\n}\n\n\/\/ Cache\n$registry->set('cache', new Cache($config->get('cache_engine'), $config->get('cache_expire')));\n\n\/\/ Url\nif ($config->get('url_autostart')) {\n\t$registry->set('url', new Url($config->get('site_url'), $config->get('site_ssl')));\n}\n\n\/\/ Language\n$language = new Language($config->get('language_directory'));\n$registry->set('language', $language);\n\n\/\/ Document\n$registry->set('document', new Document());\n\n\/\/ Config Autoload\nif ($config->has('config_autoload')) {\n\tforeach ($config->get('config_autoload') as $value) {\n\t\t$loader->config($value);\n\t}\n}\n\n\/\/ Language Autoload\nif ($config->has('language_autoload')) {\n\tforeach ($config->get('language_autoload') as $value) {\n\t\t$loader->language($value);\n\t}\n}\n\n\/\/ Library Autoload\nif ($config->has('library_autoload')) {\n\tforeach ($config->get('library_autoload') as $value) {\n\t\t$loader->library($value);\n\t}\n}\n\n\/\/ Model Autoload\nif ($config->has('model_autoload')) {\n\tforeach ($config->get('model_autoload') as $value) {\n\t\t$loader->model($value);\n\t}\n}\n\n\/\/ Route\n$route = new Router($registry);\n\n\/\/ Pre Actions\nif ($config->has('action_pre_action')) {\n\tforeach ($config->get('action_pre_action') as $value) {\n\t\t$route->addPreAction(new Action($value));\n\t}\n}\n\n\/\/ Dispatch\n$route->dispatch(new Action($config->get('action_router')), new Action($config->get('action_error')));\n\n\/\/ Output\n$response->output();"
    },
    "catalog_cfg": "<?php\n\/\/ Site\n$_['site_url']           = HTTP_SERVER;\n$_['site_ssl']           = HTTPS_SERVER;\n\n\/\/ Url\n$_['url_autostart']      = false;\n\n\/\/ Database\n$_['db_autostart']       = true;\n$_['db_engine']          = DB_DRIVER; \/\/ mpdo, mysqli or pgsql\n$_['db_hostname']        = DB_HOSTNAME;\n$_['db_username']        = DB_USERNAME;\n$_['db_password']        = DB_PASSWORD;\n$_['db_database']        = DB_DATABASE;\n$_['db_port']            = DB_PORT;\n\n\/\/ Session\n$_['session_autostart']  = false;\n$_['session_engine']     = 'db';\n$_['session_name']       = 'OCSESSID';\n\n\/\/ Template\n$_['template_engine']    = 'twig';\n$_['template_directory'] = '';\n$_['template_cache']     = true;\n\n\/\/ Autoload Libraries\n$_['library_autoload']   = array();\n\n\/\/ Actions\n$_['action_pre_action']  = array(\n\t'startup\/session',\n\t'startup\/startup',\n\t'startup\/error',\n\t'startup\/event',\n\t'startup\/maintenance',\n\t'startup\/seo_url'\n);\n\n\/\/ Action Events\n$_['action_event'] = array(\n\t'controller\/*\/before' => array(\n\t\t'event\/language\/before'\n\t),\n\t'controller\/*\/after' => array(\n\t\t'event\/language\/after'\n\t),\t\n\t'view\/*\/before' => array(\n\t\t500  => 'event\/theme',\n\t\t998  => 'event\/language',\n\t),\n\t'language\/*\/after' => array(\n\t\t'event\/translation'\n\t),\n\t\/\/'view\/*\/before' => array(\n\t\/\/\t1000  => 'event\/debug\/before'\n\t\/\/),\n\t\/\/'controller\/*\/after'  => array(\n\t\/\/\t'event\/debug\/after'\n\/\/\t)\n);"
}