shop.balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

index.php (1807B)


      1 <?php
      2 // Error Reporting
      3 error_reporting(E_ALL);
      4 
      5 // Check if SSL
      6 if ((isset($_SERVER['HTTPS']) && (($_SERVER['HTTPS'] == 'on') || ($_SERVER['HTTPS'] == '1'))) || $_SERVER['SERVER_PORT'] == 443) {
      7 	$protocol = 'https://';
      8 } elseif (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || !empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') {
      9 	$protocol = 'https://';
     10 } else {
     11 	$protocol = 'http://';
     12 }
     13 
     14 define('HTTP_SERVER', $protocol . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/.\\') . '/');
     15 define('HTTP_OPENCART', $protocol . $_SERVER['HTTP_HOST'] . rtrim(rtrim(dirname($_SERVER['SCRIPT_NAME']), 'install'), '/.\\') . '/');
     16 
     17 // DIR
     18 define('DIR_OPENCART', str_replace('\\', '/', realpath(dirname(__FILE__) . '/../') . '/'));
     19 define('DIR_APPLICATION', str_replace('\\', '/', realpath(dirname(__FILE__))) . '/');
     20 define('DIR_SYSTEM', str_replace('\\', '/', realpath(dirname(__FILE__) . '/../')) . '/system/');
     21 define('DIR_STORAGE', DIR_SYSTEM . 'storage/');
     22 define('DIR_IMAGE', str_replace('\\', '/', realpath(dirname(__FILE__) . '/../')) . '/image/');
     23 define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
     24 define('DIR_TEMPLATE', DIR_APPLICATION . 'view/template/');
     25 define('DIR_DATABASE', DIR_SYSTEM . 'database/');
     26 define('DIR_CONFIG', DIR_SYSTEM . 'config/');
     27 define('DIR_CACHE', DIR_SYSTEM . 'storage/cache/');
     28 define('DIR_LOGS', DIR_SYSTEM . 'storage/logs/');
     29 define('DIR_MODIFICATION', DIR_SYSTEM . 'storage/modification/');
     30 define('DIR_DOWNLOAD', DIR_SYSTEM . 'storage/download/');
     31 define('DIR_SESSION', DIR_SYSTEM . 'storage/session/');
     32 define('DIR_UPLOAD', DIR_SYSTEM . 'storage/upload/');
     33 
     34 // Startup
     35 require_once(DIR_SYSTEM . 'startup.php');
     36 
     37 start('install');