PageRenderTime 50ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/config/config.inc.php

https://gitlab.com/sanjitbauli1/fedexcollection
PHP | 138 lines | 73 code | 19 blank | 46 comment | 14 complexity | 53ed3a3b313eaf1980571839aa4cc544 MD5 | raw file
  1. <?php
  2. /*
  3. * 2007-2012 PrestaShop
  4. *
  5. * NOTICE OF LICENSE
  6. *
  7. * This source file is subject to the Open Software License (OSL 3.0)
  8. * that is bundled with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://opensource.org/licenses/osl-3.0.php
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@prestashop.com so we can send you a copy immediately.
  14. *
  15. * DISCLAIMER
  16. *
  17. * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
  18. * versions in the future. If you wish to customize PrestaShop for your
  19. * needs please refer to http://www.prestashop.com for more information.
  20. *
  21. * @author PrestaShop SA <contact@prestashop.com>
  22. * @copyright 2007-2012 PrestaShop SA
  23. * @version Release: $Revision: 14009 $
  24. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  25. * International Registered Trademark & Property of PrestaShop SA
  26. */
  27. /* Debug only */
  28. @ini_set('display_errors', 'off');
  29. define('_PS_DEBUG_SQL_', false);
  30. $start_time = microtime(true);
  31. /* Compatibility warning */
  32. define('_PS_DISPLAY_COMPATIBILITY_WARNING_', false);
  33. /* SSL configuration */
  34. define('_PS_SSL_PORT_', 443);
  35. /* Improve PHP configuration to prevent issues */
  36. ini_set('upload_max_filesize', '100M');
  37. ini_set('default_charset', 'utf-8');
  38. ini_set('magic_quotes_runtime', 0);
  39. // correct Apache charset (except if it's too late
  40. if (!headers_sent())
  41. header('Content-Type: text/html; charset=utf-8');
  42. /* No settings file? goto installer...*/
  43. if (!file_exists(dirname(__FILE__).'/settings.inc.php'))
  44. {
  45. $dir = ((is_dir($_SERVER['REQUEST_URI']) OR substr($_SERVER['REQUEST_URI'], -1) == '/') ? $_SERVER['REQUEST_URI'] : dirname($_SERVER['REQUEST_URI']).'/');
  46. if (!file_exists(dirname(__FILE__).'/../install'))
  47. die('Error: \'install\' directory is missing');
  48. header('Location: install/');
  49. exit;
  50. }
  51. require_once(dirname(__FILE__).'/settings.inc.php');
  52. /* Include all defines */
  53. require_once(dirname(__FILE__).'/defines.inc.php');
  54. if (!defined('_PS_MAGIC_QUOTES_GPC_'))
  55. define('_PS_MAGIC_QUOTES_GPC_', get_magic_quotes_gpc());
  56. if (!defined('_PS_MODULE_DIR_'))
  57. define('_PS_MODULE_DIR_', _PS_ROOT_DIR_.'/modules/');
  58. if (!defined('_PS_MYSQL_REAL_ESCAPE_STRING_'))
  59. define('_PS_MYSQL_REAL_ESCAPE_STRING_', function_exists('mysql_real_escape_string'));
  60. /* Autoload */
  61. require_once(dirname(__FILE__).'/autoload.php');
  62. /* Redefine REQUEST_URI if empty (on some webservers...) */
  63. if (!isset($_SERVER['REQUEST_URI']) OR empty($_SERVER['REQUEST_URI']))
  64. {
  65. if (substr($_SERVER['SCRIPT_NAME'], -9) == 'index.php' && empty($_SERVER['QUERY_STRING']))
  66. $_SERVER['REQUEST_URI'] = dirname($_SERVER['SCRIPT_NAME']).'/';
  67. else
  68. {
  69. $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
  70. if (isset($_SERVER['QUERY_STRING']) AND !empty($_SERVER['QUERY_STRING']))
  71. $_SERVER['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
  72. }
  73. }
  74. /* Trying to redefine HTTP_HOST if empty (on some webservers...) */
  75. if (!isset($_SERVER['HTTP_HOST']) OR empty($_SERVER['HTTP_HOST']))
  76. $_SERVER['HTTP_HOST'] = @getenv('HTTP_HOST');
  77. /* aliases */
  78. function p($var) {
  79. return (Tools::p($var));
  80. }
  81. function d($var) {
  82. Tools::d($var);
  83. }
  84. function ppp($var) {
  85. return (Tools::p($var));
  86. }
  87. function ddd($var) {
  88. Tools::d($var);
  89. }
  90. global $_MODULES;
  91. $_MODULES = array();
  92. /* Load all configuration keys */
  93. Configuration::loadConfiguration();
  94. /* Load all language definitions */
  95. Language::loadLanguages();
  96. /* Define order state */
  97. // DEPRECATED : these defines are going to be deleted on 1.6 version of Prestashop
  98. // USE : Configuration::get() method in order to getting the id of order state
  99. define('_PS_OS_CHEQUE_', Configuration::get('PS_OS_CHEQUE'));
  100. define('_PS_OS_PAYMENT_', Configuration::get('PS_OS_PAYMENT'));
  101. define('_PS_OS_PREPARATION_', Configuration::get('PS_OS_PREPARATION'));
  102. define('_PS_OS_SHIPPING_', Configuration::get('PS_OS_SHIPPING'));
  103. define('_PS_OS_DELIVERED_', Configuration::get('PS_OS_DELIVERED'));
  104. define('_PS_OS_CANCELED_', Configuration::get('PS_OS_CANCELED'));
  105. define('_PS_OS_REFUND_', Configuration::get('PS_OS_REFUND'));
  106. define('_PS_OS_ERROR_', Configuration::get('PS_OS_ERROR'));
  107. define('_PS_OS_OUTOFSTOCK_', Configuration::get('PS_OS_OUTOFSTOCK'));
  108. define('_PS_OS_BANKWIRE_', Configuration::get('PS_OS_BANKWIRE'));
  109. define('_PS_OS_PAYPAL_', Configuration::get('PS_OS_PAYPAL'));
  110. define('_PS_OS_WS_PAYMENT_', Configuration::get('PS_OS_WS_PAYMENT'));
  111. /* It is not safe to rely on the system's timezone settings, and this would generate a PHP Strict Standards notice. */
  112. if (function_exists('date_default_timezone_set'))
  113. @date_default_timezone_set(Configuration::get('PS_TIMEZONE'));
  114. /* Smarty */
  115. require_once(dirname(__FILE__).'/smarty.config.inc.php');
  116. /* Possible value are true, false, 'URL'
  117. (for 'URL' append SMARTY_DEBUG as a parameter to the url)
  118. default is false for production environment */
  119. define('SMARTY_DEBUG_CONSOLE', false);