if (!defined('BOOTSTRAP')) { die('Access denied'); } /* * PHP options */ // Log everything, but do not display //error_reporting(E_ALL); //ini_set('display_errors', 0); // Set maximum memory limit //if (PHP_INT_SIZE == 4 && (substr(ini_get('memory_limit'), 0, -1) < "64")) { // 32bit PHP //64M // @ini_set('memory_limit', '2048M'); //} elseif (PHP_INT_SIZE == 8 && (substr(ini_get('memory_limit'), 0, -1) < "256")) { // 64bit PHP //256M @ini_set('memory_limit', '8192M'); //εβαλα σχόλιο σε αυτο 04/12/24 ntheogr //} if (!defined('CONSOLE')) { // Set maximum time limit for script execution. //3600 @set_time_limit(10800); } if (PHP_SAPI === 'cli') { if (function_exists('ini_set')) { @ini_set('xdebug.default_enable', '0'); @ini_set('xdebug.mode', 'off'); @ini_set('xdebug.max_nesting_level', '2048'); } if (function_exists('xdebug_disable')) { @xdebug_disable(); } } // define('DEBUG_DEVELOPER', true); // Resolve real client IP behind proxy/CDN and match it against an allowlist. if (!function_exists('olla_get_client_ip')) { function olla_get_client_ip(array $server, array $trusted_proxies = array()) { $remote_addr = isset($server['REMOTE_ADDR']) ? trim($server['REMOTE_ADDR']) : ''; $trusted_lookup = array(); foreach ($trusted_proxies as $proxy) { $proxy = trim((string) $proxy); if ($proxy !== '') { $trusted_lookup[$proxy] = true; } } $candidates = array(); if ($remote_addr !== '' && isset($trusted_lookup[$remote_addr])) { $candidates[] = 'HTTP_CF_CONNECTING_IP'; $candidates[] = 'HTTP_X_FORWARDED_FOR'; } $candidates[] = 'REMOTE_ADDR'; foreach ($candidates as $key) { if (empty($server[$key])) { continue; } $value = $server[$key]; if ($key === 'HTTP_X_FORWARDED_FOR') { $parts = explode(',', $value); $value = trim(reset($parts)); } else { $value = trim($value); } if (filter_var($value, FILTER_VALIDATE_IP)) { return $value; } } return null; } } if (!function_exists('olla_cidr_match')) { function olla_cidr_match($ip, $range) { if (strpos($range, '/') === false) { return $ip === $range; } list($subnet, $mask) = explode('/', $range, 2); if (!filter_var($ip, FILTER_VALIDATE_IP) || !filter_var($subnet, FILTER_VALIDATE_IP)) { return false; } $ip_bin = inet_pton($ip); $subnet_bin = inet_pton($subnet); if ($ip_bin === false || $subnet_bin === false || strlen($ip_bin) !== strlen($subnet_bin)) { return false; } $mask = (int) $mask; $bytes = (int) floor($mask / 8); $bits = $mask % 8; if ($bytes > 0 && substr($ip_bin, 0, $bytes) !== substr($subnet_bin, 0, $bytes)) { return false; } if ($bits === 0) { return true; } $ip_byte = ord($ip_bin[$bytes]); $subnet_byte = ord($subnet_bin[$bytes]); $mask_byte = ~(255 >> $bits) & 255; return ($ip_byte & $mask_byte) === ($subnet_byte & $mask_byte); } } if (!function_exists('olla_ip_allowed')) { function olla_ip_allowed($ip, array $allowlist) { foreach ($allowlist as $range) { $range = trim((string) $range); if ($range === '') { continue; } if (olla_cidr_match($ip, $range)) { return true; } } return false; } } /* * Database connection options */ $config['db_host'] = 'localhost'; $config['db_name'] = 'robotsto_cs463'; $config['db_user'] = 'robotsto_store63'; $config['db_password'] = 'h@]~o?yKTSh2'; $config['database_backend'] = 'mysqli'; // Database tables prefix $config['table_prefix'] = 'cscart_'; /* * Script location options * * Example: * Your url is http://www.yourcompany.com/store/cart * $config['http_host'] = 'www.yourcompany.com'; * $config['http_path'] = '/store/cart'; * * Your secure url is https://secure.yourcompany.com/secure_dir/cart * $config['https_host'] = 'secure.yourcompany.com'; * $config['https_path'] = '/secure_dir/cart'; * */ // Host and directory where software is installed on no-secure server $config['http_host'] = 'olla.gr'; $config['http_path'] = ''; // Host and directory where software is installed on secure server $config['https_host'] = 'olla.gr'; $config['https_path'] = ''; /* * Misc options */ // Names of index files for the frontend and backend $config['customer_index'] = 'index.php'; $config['admin_index'] = 'ntHe01.php'; // DEMO mode $config['demo_mode'] = false; // Tweaks $config['tweaks'] = array ( // Whether to remove any javascript code from description and name of product, category, etc. // Auto - false for ULT, true for MVE. 'sanitize_user_html' => 'auto', 'anti_csrf' => false, // protect forms from CSRF attacks 'disable_block_cache' => false, // used to disable block cache 'disable_localizations' => true, // Disable Localizations functionality 'disable_dhtml' => false, // Disable Ajax-based pagination and Ajax-based "Add to cart" button 'do_not_apply_promotions_on_order_update' => true, // If true, the promotions that applied to the order won't be changed when editing the order. New promotions won't be applied to the order. 'dev_js' => false, // set to true to disable js files compilation 'redirect_to_cart' => true, // Redirect customer to the cart contents page. Used with the "disable_dhtml" setting. 'api_https_only' => false, // Allows the use the API functionality only by the HTTPS protocol 'api_allow_customer' => true, // Allow open API for unauthorized customers 'lazy_thumbnails' => false, // generate image thumbnails on the fly 'image_resize_lib' => 'auto', // library to resize images - "auto", "gd" or "imagick" 'products_found_rows_no_cache_limit' => 100, // Max count of SQL found rows without saving to cache default 100 'large_category_subcat_products_limit' => 20000, // Disable aggregated product listings when category exceeds this amount 'large_category_skip_category_ids' => array(85257, 123373), // Categories that always load products (e.g. "Σε αποθεμα") 'show_database_changes' => false, // Show database changes in View changes tool 'backup_db_mysqldump' => false, // Backup database using mysqldump when available ); // Enable developer flags for trusted IPs (office/VPN) without killing block cache on the storefront. $trusted_proxies = array( '10.100.0.1', // reverse proxy seen in logs ); $client_ip = olla_get_client_ip($_SERVER, $trusted_proxies); // Direct allowlist (public/VPN IPs that reach the server without being rewritten to 10.100.0.1). $debug_allowed_ips = array( '194.30.202.238', // static office IP //'10.8.0.0/24', // VPN pool example; adjust to your VPN subnet ); // When the proxy masks everyone as 10.100.0.1, require a secret token to avoid exposing debug to all. $debug_token = 'olla-debug-20241208-9b1c6f1f'; // change to your own secret if desired $token_required_ips = array('10.100.0.1'); $token_provided = false; if (isset($_GET['debug_token']) && is_string($_GET['debug_token'])) { $token_provided = hash_equals($debug_token, $_GET['debug_token']); if ($token_provided) { setcookie('debug_token', $debug_token, time() + 3600 * 12, '/', '', true, true); } } elseif (isset($_COOKIE['debug_token']) && is_string($_COOKIE['debug_token'])) { $token_provided = hash_equals($debug_token, $_COOKIE['debug_token']); } $allow_via_ip = ($client_ip && olla_ip_allowed($client_ip, $debug_allowed_ips)); $allow_via_token = ($client_ip && $token_provided && olla_ip_allowed($client_ip, $token_required_ips)); if ($allow_via_ip || $allow_via_token) { if (!defined('DEVELOPMENT')) { define('DEVELOPMENT', true); } if (!defined('DEBUG_MODE')) { define('DEBUG_MODE', true); } error_reporting(E_ALL); ini_set('display_errors', 'on'); ini_set('display_startup_errors', true); $script_basename = isset($_SERVER['SCRIPT_NAME']) ? basename($_SERVER['SCRIPT_NAME']) : ''; if ($script_basename === $config['admin_index']) { // Only disable block cache when working inside the admin panel. $config['tweaks']['disable_block_cache'] = true; } } // Key for sensitive data encryption $config['crypt_key'] = 'SpbRv5Toqi'; // Cache backend // Available backends: file, sqlite, database, redis, xcache, apc, apcu // To use sqlite cache the "sqlite3" PHP module should be installed // To use xcache cache the "xcache" PHP module should be installed // To use apc cache the "apc" PHP module should be installed // To use apcu cache the PHP version should be >= 7.x and the "apcu" PHP module should be installed $config['cache_backend'] = 'file'; $config['cache_redis_server'] = 'localhost'; $config['cache_redis_global_ttl'] = 0; // set this if your cache size reaches Redis server memory size // Storage backend for sessions. Available backends: database, redis $config['session_backend'] = 'database'; $config['session_redis_server'] = 'localhost'; $config['cache_apc_global_ttl'] = 0; $config['cache_xcache_global_ttl'] = 0; // Set to unique store prefix if you use the same Redis/Xcache/Apc storage // for serveral cart installations $config['store_prefix'] = ''; // CDN server backend $config['cdn_backend'] = 'cloudfront'; // Storage options $config['storage'] = array( 'images' => array( 'prefix' => 'images', 'dir' => $config['dir']['root'], 'cdn' => true ), 'downloads' => array( 'prefix' => 'downloads', 'secured' => true, 'dir' => $config['dir']['var'] ), 'assets' => array( 'dir' => & $config['dir']['cache_misc'], 'prefix' => 'assets', 'cdn' => true ), 'custom_files' => array( 'dir' => & $config['dir']['var'], 'prefix' => 'custom_files' ) ); // Default permissions for newly created files and directories define('DEFAULT_FILE_PERMISSIONS', 0666); define('DEFAULT_DIR_PERMISSIONS', 0777); // Maximum number of files, stored in directory. You may change this parameter straight after a store was installed. And you must not change it when the store has been populated with products already. define('MAX_FILES_IN_DIR', 10000); // Developer configuration file if (file_exists(DIR_ROOT . '/local_conf.php')) { include_once(DIR_ROOT . '/local_conf.php'); } // Enable DEV mode if Product status is not empty (like Beta1, dev, etc.) //if (PRODUCT_STATUS != '' && !defined('DEVELOPMENT')) { // ini_set('display_errors', 'on'); // ini_set('display_startup_errors', true); // // define('DEVELOPMENT', true); //} Service unavailable
Sorry, service is temporarily unavailable.