// Installed? if (filesize('config.php') == 0) { exit; } require_once 'library/application/string_modify.php'; define('VALID_ACCESS', TRUE); define('APP', 'CATALOG'); // Config require 'config.php'; require 'common.php'; // Locator require DIR_LIBRARY . 'locator.php'; $locator = new Locator(); // Config $config =& $locator->get('config'); // Database $database =& $locator->get('database'); // Settings $sql = "SELECT * FROM setting WHERE type = 'catalog' OR type = 'global'"; $settings = $database->getRows($sql); foreach ($settings as $setting) { $config->set($setting['key'], $setting['value']); } $request =& $locator->get('request'); // Request $url =& $locator->get('url'); // URL if ($config->get('config_sitemap_status')) { $base = htmlentities(HTTP_SERVER, ENT_QUOTES, 'UTF-8'); //Output XML
/** * @param int $id * @return bool| */ public static function locator_categories_by_locator($id = 0) { if ($id == 0) { return false; } return Locator::get()->byID($id)->Categories(); }
if (filesize('../config.php') == 0) { header('Location: ../install/index.php'); exit; } define('VALID_ACCESS', TRUE); define('APP', 'ADMIN'); // Include Config and Common require '../config.php'; require '../common.php'; // Page Time $time = time() + microtime(); // Locator require DIR_LIBRARY . 'locator.php'; $locator = new Locator(); // Config $config =& $locator->get('config'); // Database $database =& $locator->get('database'); // Settings $settings = $database->getRows("select * from (setting) where (type = 'admin' or type = 'global')"); foreach ($settings as $setting) { $config->set($setting['key'], $setting['value']); } date_default_timezone_set($config->get('config_time_zone') ? $config->get('config_time_zone') : 'UTC'); if ($config->get('error_handler_status')) { $error_handler =& $locator->get('errorhandler'); set_error_handler(array(&$error_handler, "handler")); } // Upgrade check $version = defined('CODE_VERSION') ? CODE_VERSION : 0; $upgrade = $database->getRows("select * from setting where `type` = 'global' and `group` = 'version' and `key` = 'version' and `value` = '{$version}'");
// Installed? if (filesize('config.php') == 0) { exit; } require_once 'library/application/string_modify.php'; define('VALID_ACCESS', TRUE); define('APP', 'CATALOG'); // Include Config and Common require 'config.php'; require 'common.php'; // Locator require DIR_LIBRARY . 'locator.php'; $locator = new Locator(); // Config $config =& $locator->get('config'); // Database $database =& $locator->get('database'); // Settings $sql = "select * from setting where type = 'catalog' or type = 'global'"; $settings = $database->getRows($sql); foreach ($settings as $setting) { $config->set($setting['key'], $setting['value']); } date_default_timezone_set($config->get('config_time_zone') ? $config->get('config_time_zone') : 'UTC'); $image =& $locator->get('image'); // Image $request =& $locator->get('request'); // Request $url =& $locator->get('url'); // URL
protected function _setScriptSrc($src, $className) { $basePathHelper = $this->locator->get('ViewHelperManager')->get('basepath'); return "<script type=\"text/javascript\" src=\"" . $basePathHelper->__invoke($this->_publicLink . '/' . $src) . "\" id=\"script_" . $className . "\"></script>"; }