/var/www/vhosts/ihelp.ro/httpdocs/config
Edit: /var/www/vhosts/ihelp.ro/httpdocs/config/bootstrap.php (10203B)
parse()
// ->putenv()
// ->toEnv()
// ->toServer();
// }
/*
* Read configuration file and inject configuration into various
* CakePHP classes.
*
* By default there is only one configuration file. It is often a good
* idea to create multiple configuration files, and separate the configuration
* that changes from configuration that does not. This makes deployment simpler.
*/
try {
Configure::config('default', new PhpConfig());
Configure::load('app', 'default', false);
} catch (\Exception $e) {
exit($e->getMessage() . "\n");
}
/*
* Load an environment local configuration file to provide overrides to your configuration.
* Notice: For security reasons app_local.php **should not** be included in your git repo.
*/
if (file_exists(CONFIG . 'app_local.php')) {
Configure::load('app_local', 'default');
}
/*
* When debug = true the metadata cache should only last
* for a short time.
*/
if (Configure::read('debug')) {
Configure::write('Cache._cake_model_.duration', '+2 minutes');
Configure::write('Cache._cake_core_.duration', '+2 minutes');
// disable router cache during development
Configure::write('Cache._cake_routes_.duration', '+2 seconds');
}
if (file_exists(CONFIG . 'adminlte.php')) {
Configure::load('adminlte', 'default');
}
/*
* Set the default server timezone. Using UTC makes time calculations / conversions easier.
* Check http://php.net/manual/en/timezones.php for list of valid timezone strings.
*/
date_default_timezone_set(Configure::read('App.defaultTimezone'));
/*
* Configure the mbstring extension to use the correct encoding.
*/
mb_internal_encoding(Configure::read('App.encoding'));
/*
* Set the default locale. This controls how dates, number and currency is
* formatted and sets the default language to use for translations.
*/
ini_set('intl.default_locale', Configure::read('App.defaultLocale'));
/*
* Register application error and exception handlers.
*/
$isCli = PHP_SAPI === 'cli';
(new ErrorTrap(Configure::read('Error')))->register();
(new ExceptionTrap(Configure::read('Error')))->register();
/*
* Include the CLI bootstrap overrides.
*/
if ($isCli) {
require CONFIG . 'bootstrap_cli.php';
}
/*
* Set the full base URL.
* This URL is used as the base of all absolute links.
*/
$fullBaseUrl = Configure::read('App.fullBaseUrl');
if (!$fullBaseUrl) {
$s = null;
if (env('HTTPS')) {
$s = 's';
}
$httpHost = env('HTTP_HOST');
if (isset($httpHost)) {
$fullBaseUrl = 'http' . $s . '://' . $httpHost;
}
unset($httpHost, $s);
}
if ($fullBaseUrl) {
Router::fullBaseUrl($fullBaseUrl);
}
unset($fullBaseUrl);
Cache::setConfig(Configure::consume('Cache'));
ConnectionManager::setConfig(Configure::consume('Datasources'));
TransportFactory::setConfig(Configure::consume('EmailTransport'));
Mailer::setConfig(Configure::consume('Email'));
Log::setConfig(Configure::consume('Log'));
Security::setSalt(Configure::consume('Security.salt'));
/*
* Setup detectors for mobile and tablet.
*/
ServerRequest::addDetector('mobile', function ($request) {
$detector = new \Detection\MobileDetect();
return $detector->isMobile();
});
ServerRequest::addDetector('tablet', function ($request) {
$detector = new \Detection\MobileDetect();
return $detector->isTablet();
});
/*
* You can set whether the ORM uses immutable or mutable Time types.
* The default changed in 4.0 to immutable types. You can uncomment
* below to switch back to mutable types.
*
* You can enable default locale format parsing by adding calls
* to `useLocaleParser()`. This enables the automatic conversion of
* locale specific date formats. For details see
* @link https://book.cakephp.org/4/en/core-libraries/internationalization-and-localization.html#parsing-localized-datetime-data
*/
// TypeFactory::build('time')
// ->useMutable();
// TypeFactory::build('date')
// ->useMutable();
// TypeFactory::build('datetime')
// ->useMutable();
// TypeFactory::build('timestamp')
// ->useMutable();
// TypeFactory::build('datetimefractional')
// ->useMutable();
// TypeFactory::build('timestampfractional')
// ->useMutable();
// TypeFactory::build('datetimetimezone')
// ->useMutable();
// TypeFactory::build('timestamptimezone')
// ->useMutable();
/*
* Custom Inflector rules, can be set to correctly pluralize or singularize
* table, model, controller names or whatever other string is passed to the
* inflection functions.
*/
//Inflector::rules('plural', ['/^(inflect)or$/i' => '\1ables']);
//Inflector::rules('irregular', ['red' => 'redlings']);
//Inflector::rules('uninflected', ['dontinflectme']);
//Inflector::rules('transliteration', ['/å/' => 'aa']);
defined('FACEBOOK_LOGIN') or define('FACEBOOK_LOGIN', true);
// General Settings
defined('SITE_NAME') or define('SITE_NAME', 'iHelp');
defined('DEFAULT_COUNTRY_ISO_3') or define('DEFAULT_COUNTRY_ISO_3', 'ROU');
// User groups
defined('ADMIN') or define('ADMIN', 1);
defined('VENDOR') or define('VENDOR', 2);
defined('USER') or define('USER', 3);
// Order statuses
defined('STATUS_NEW') or define('STATUS_NEW', 1); // Created
defined('STATUS_AWP') or define('STATUS_AWP', 2); // Awaiting Payment
defined('STATUS_PPAY') or define('STATUS_PPAY', 3); // Processing Payment
defined('STATUS_PAID') or define('STATUS_PAID', 4); // Paid
defined('STATUS_CPAY') or define('STATUS_CPAY', 5); // Canceled Payment
defined('STATUS_AWB') or define('STATUS_AWB', 6); // Pending Shipping
defined('STATUS_SHIP') or define('STATUS_SHIP', 7); // Shipping
defined('STATUS_DONE') or define('STATUS_DONE', 8); // Complete
defined('STATUS_CAN') or define('STATUS_CAN', 9); // Canceled
defined('STATUS_PRFN') or define('STATUS_PRFN', 10); // Processing Refund
defined('STATUS_RFND') or define('STATUS_RFND', 11); // Refunded
defined('STATUS_RJCT') or define('STATUS_RJCT', 12); // Rejected
defined('STATUS_ARH') or define('STATUS_ARH', 13); // Archived
defined('DEFAULT_TOTAL_DONATIONS') or define('DEFAULT_TOTAL_DONATIONS', 12587);
defined('DEFAULT_NR_DONATIONS') or define('DEFAULT_NR_DONATIONS', 180);
defined('DEFAULT_NR_ORGANISATIONS') or define('DEFAULT_NR_ORGANISATIONS', 10);
defined('DEFAULT_NR_DONORS') or define('DEFAULT_NR_DONORS', 37);
// Mobilpay Payment System
defined('PAYMENT_IS_LIVE') or define('PAYMENT_IS_LIVE', FALSE);
defined('MOBILPAY_KEY') or define('MOBILPAY_KEY', '6KGG-WR4V-7W97-R8LD-ALYH');
defined('PAYMENT_METHOD_CARD') or define('PAYMENT_METHOD_CARD', 1);
defined('PAYMENT_METHOD_OP') or define('PAYMENT_METHOD_OP', 2);
defined('PAYMENT_METHOD_RAMBURS') or define('PAYMENT_METHOD_RAMBURS', 3);
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')
defined('SITE_URL') or define('SITE_URL', 'https://' . $_SERVER['HTTP_HOST'] . '/');
else
defined('SITE_URL') or define('SITE_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
DEFINE('HDY', false); // remove HDY
DEFINE('HDY_CSS', false);
DEFINE('HDY_JS', false);
DEFINE('HDY_DOMAIN', 'ihelp');
if (HDY) {
if (HDY_CSS)
Configure::write('App.cssBaseUrl', 'https://' . HDY_DOMAIN . '.hdy.ro/css/');
if (HDY_JS)
Configure::write('App.jsBaseUrl', 'https://' . HDY_DOMAIN . '.hdy.ro/js/');
}
configure::write('type_settings', [
'text' => 'Text',
'textarea' => 'Textarea',
'checkbox' => 'Checkbox'
]);
configure::write('value_add_donations', [
50, 100, 150, 500
]);
configure::write('value_add_donation_ihelp', [
50, 500, 1000, 2000
]);
// mirko pagliai THUMBER begin
Configure::write('Thumber.driver', 'gd');
defined('UPLOAD_IMAGE') or define('UPLOAD_IMAGE', 'uploads/images/');
defined('UPLOAD_IMAGE_DEFAULT') or define('UPLOAD_IMAGE_DEFAULT', 'defaultImg.jpg');
function getShortUUid($string = '')
{
$finalString = '';
if (!empty($string)) {
$finalString = substr($string, 1, 8);
$finalString = substr($finalString, 0, 4) . '-' . substr($finalString, 4, 4);
}
return $finalString;
}
// Bank, account type
configure::write('account_type', [
1 => 'LEI',
2 => 'EURO',
3 => 'USD',
]);