Example #1
0
File: core.php Project: umaxfun/x4m
 function __construct($className)
 {
     $this->_TMS = xRegistry::get('TMS');
     $this->_PDO = xRegistry::get('PDO');
     $this->_EVM = xEventMachine::getInstance();
     $this->_moduleName = str_replace(array('Front', 'Back'), array('', ''), $className);
     $this->_commonObj = call_user_func($this->_moduleName . 'Common::getInstance', $this->_moduleName . 'Common');
     if ($this->_commonObj->_tree) {
         $this->_tree = $this->_commonObj->_tree;
     }
 }
Example #2
0
File: _run.php Project: umaxfun/x4m
define('DOCUMENT_ROOT', $_SERVER['DOCUMENT_ROOT']);
ini_set('session.gc_maxlifetime', '18000');
preg_match('@^(?:www.)?([^/]+)@i', $_SERVER['HTTP_HOST'], $m);
define('REAL_HTTP_HOST', $m[1]);
require_once DOCUMENT_ROOT . '/inc/core/helpers.php';
ob_start();
$time = Common::getmicrotime();
$_SERVER['REQUEST_URI'] = '/group/mypage';
require_once DOCUMENT_ROOT . '/conf/init.php';
require_once xConfig::get('PATH', 'CORE') . 'core.php';
require_once xConfig::get('PATH', 'CORE') . 'helpers.tpl.php';
require_once xConfig::get('PATH', 'CLASSES') . 'cache.class.php';
session_start();
xConfig::set('GLOBAL', 'currentMode', 'front');
xRegistry::set('EVM', xEventMachine::getInstance());
xCore::pluginEventDetector();
xConfig::set('PATH', 'fullBaseUrl', CHOST . $_SERVER['REQUEST_URI']);
xConfig::set('PATH', 'baseUrl', trim($_SERVER['REQUEST_URI']));
$position = strpos(xConfig::get('PATH', 'baseUrl'), '?');
if ($position !== false) {
    xConfig::set('PATH', 'baseUrl', substr(xConfig::get('PATH', 'baseUrl'), 0, $position, '?'));
}
require_once xConfig::get('PATH', 'XOAD') . 'xoad.php';
xCache::initialize('MemCache');
xRegistry::set('TMS', $TMS = new tMultiSection());
/*
$TMS->AddFileSection(PATH_.'templates/robots.htm');
$TMS->AddReplace('robots','paramse','hello');
$TMS->AddReplace('robots','arr',array('hell'=>'d'));
echo $TMS->ParseSection('robots');*/