first commit

This commit is contained in:
2025-08-02 16:30:27 +02:00
commit 23646bfcee
14851 changed files with 1750626 additions and 0 deletions

77
web/common.php Normal file
View File

@@ -0,0 +1,77 @@
<?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;
// ################################################################
//
// ################################################################