78 lines
2.2 KiB
PHP
78 lines
2.2 KiB
PHP
<?php
|
|
|
|
use KupShop\KupShopBundle\Util\Compat\ServiceContainer;
|
|
|
|
$cfg['Path']['web_root'] = '';
|
|
|
|
// ################################################################
|
|
// ERROR REPORTING
|
|
// ################################################################
|
|
|
|
set_error_handler('error_handler');
|
|
|
|
// klicovy string tohoto uzivatele
|
|
$session = ServiceContainer::getService('session');
|
|
$session->start();
|
|
Cart::getCartID();
|
|
|
|
// ################################################################
|
|
// VOLBA JAZYKA
|
|
// ################################################################
|
|
|
|
$txt_str = [];
|
|
|
|
// ################################################################
|
|
//
|
|
// ################################################################
|
|
|
|
$ctrl = [];
|
|
$ctrl['admin'] = false;
|
|
$ctrl['logged'] = false;
|
|
$ctrl['ip'] = getIP();
|
|
$ctrl['id'] = 0;
|
|
$ctrl['currUrl'] = [];
|
|
$ctrl['currUrl']['Abs'] = '';
|
|
$ctrl['currUrl']['Rel'] = '';
|
|
|
|
if (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') {
|
|
$ctrl['currUrl']['Abs'] = 'http';
|
|
} else {
|
|
$ctrl['currUrl']['Abs'] = 'https';
|
|
}
|
|
|
|
$ctrl['currUrl']['Abs'] .= '://';
|
|
|
|
$ctrl['currUrl']['Abs'] .= $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
|
|
$ctrl['currUrl']['Rel'] .= $_SERVER['REQUEST_URI'];
|
|
$ctrl['currUrl']['Entity'] = urlencode($ctrl['currUrl']['Abs']);
|
|
|
|
$ctrl['dealer'] = 'N';
|
|
|
|
// ################################################################
|
|
// ZISKANI NASTAVENI Z DATABAZE
|
|
// ################################################################
|
|
|
|
$dbcfg = Settings::getFromCache(ServiceContainer::getService(\KupShop\KupShopBundle\Context\LanguageContext::class)->getDefaultId());
|
|
|
|
// prevedeni aktivnich modulu pro SMARTY
|
|
$cfg['module'] = [];
|
|
foreach ($cfg['Modules'] as $index => $module) {
|
|
if (is_numeric($index)) {
|
|
$cfg['module'][$module] = true;
|
|
} else {
|
|
$cfg['module'][$index] = true;
|
|
}
|
|
}
|
|
|
|
// ################################################################
|
|
//
|
|
// ################################################################
|
|
|
|
$ctrlTmp = ServiceContainer::getService(\KupShop\KupShopBundle\Util\Compat\CtrlLoader::class);
|
|
$ctrlTmp->setContainer($ctrl);
|
|
$ctrl = $ctrlTmp;
|
|
|
|
// ################################################################
|
|
//
|
|
// ################################################################
|