Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 3.5.0.0
- * @ Author : DeZender
- * @ Release on : 22.06.2018
- * @ Official site : http://DeZender.Net
- *
- */
- namespace App;
- class Bootstrap extends \Cube\Application\Bootstrap
- {
- protected $_settings = array();
- protected $_sitePath = null;
- protected $_acl = null;
- protected $_role = 'Guest';
- protected $_storage = null;
- protected $_connected = false;
- protected function _initConnected()
- {
- $this->bootstrap('db');
- $db = $this->getResource('db');
- if ($db instanceof \Cube\Db\Adapter\AbstractAdapter) {
- try {
- $this->_connected = $db->canConnect();
- } catch (\Exception $e) {
- $config = $db->getConfig();
- if (array_key_exists('host', $config) && strcmp($config['host'], '%DB_HOST%') !== 0) {
- exit('Error establishing a database connection.');
- }
- $this->_redirect('no-config');
- }
- }
- return $this->_connected;
- }
- protected function _initSettings()
- {
- $this->bootstrap('connected');
- $_obfuscated_0D1632153D190E260B3104152917192802221502350211_ = new \Ppb\Service\Settings();
- try {
- $this->_settings = $_obfuscated_0D1632153D190E260B3104152917192802221502350211_->get();
- date_default_timezone_set($this->_settings['timezone']);
- $timeZone = $this->_getTimeOffset(new \DateTimeZone($this->_settings['timezone']));
- if (!empty($this->_settings['site_path'])) {
- $this->_sitePath = $this->_settings['site_path'];
- }
- $_obfuscated_0D1632153D190E260B3104152917192802221502350211_->getTable()->getAdapter()->query("SET time_zone='" . $timeZone . "'");
- } catch (\Exception $e) {
- }
- return $this->_settings;
- }
- protected function _initSitePath()
- {
- if (isset($_SERVER['PHP_SELF']) && isset($_SERVER['HTTP_HOST']) && strcmp($this->_sitePath, '%SITE_PATH%') !== 0) {
- $httpHost = rtrim(sprintf('%s://%s%s', (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http'), $_SERVER['HTTP_HOST'], $_SERVER['PHP_SELF']));
- $request = $this->getResource('FrontController')->getRequest();
- if (!stristr($httpHost, $this->_sitePath)) {
- ......................................................................
- .......................................
- ............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement