示例#1
0
 protected function beforeAction($event)
 {
     if (XOAD_Server::runServer()) {
         exit;
     }
     return true;
 }
示例#2
0
 public function runServer()
 {
     if (XOAD_Server::runServer()) {
         foreach (Yii::app()->log->routes as $route) {
             if ($route instanceof CWebLogRoute || $route instanceof YiiDebugToolbarRoute) {
                 $route->enabled = false;
             }
         }
         return true;
     }
     return false;
 }
示例#3
0
文件: admin.php 项目: umaxfun/x4m
require_once 'inc/core/helpers.php';
require_once 'conf/init.php';
require_once xConfig::get('PATH', 'CORE') . 'core.php';
require_once xConfig::get('PATH', 'CORE') . 'helpers.tpl.php';
xRegistry::set('TMS', $TMS = new tMultiSection());
xPDO::setSource(DB_HOST, DB_NAME, DB_USER, DB_PASS);
xRegistry::set('xPDO', xPDO::getInstance());
xNameSpaceHolder::addObjectToNS('E', new ENHANCE());
require_once xConfig::get('PATH', 'XOAD') . 'xoad.php';
require_once xConfig::get('PATH', 'ADM') . 'logger.class.php';
require_once xConfig::get('PATH', 'ADM') . 'adm.class.php';
if ($_REQUEST['xoadCall']) {
    ob_start();
    $adm = new adminPanel();
    $adm->startMapping();
    if (XOAD_Server::runServer()) {
        $all = ob_get_contents();
        ob_end_clean();
        if ($_COMMON_SITE_CONF['output_html_compress']) {
            Common::compress_output($all);
        }
        echo $all;
        exit;
    }
} elseif ($_REQUEST['action']) {
    $adm = new adminPanel();
    echo $adm->dispatchAction($_GET['action']);
} else {
    $tpl = xCore::moduleFactory('templates.back');
    $adm = new adminPanel();
    //$data['xObject']=XOAD_Client::register(new adminPanel());
示例#4
0
文件: xoad.php 项目: ivko/yii-xoad
/**
 * Loads the class that is used as base class for all
 * XOAD Events storage providers.
 */
require_once XOAD_BASE . '/classes/events/Storage.class.php';
/**
 * Loads the class that is used to handle client callbacks.
 */
require_once XOAD_BASE . '/classes/Server.class.php';
if (!empty($xoadExtensions)) {
    foreach ($xoadExtensions as $extension) {
        /**
         * XOAD extension base folder that contains all extension files.
         */
        define('XOAD_' . strtoupper($extension) . '_BASE', XOAD_BASE . '/extensions/' . $extension);
        /**
         * Loads the main extension file.
         */
        require_once XOAD_BASE . '/extensions/' . $extension . '/' . $extension . '.ext.php';
    }
}
if (defined('XOAD_AUTOHANDLE')) {
    if (XOAD_AUTOHANDLE) {
        XOAD_Server::runServer();
        if (defined('XOAD_CALLBACK')) {
            if (XOAD_CALLBACK) {
                exit;
            }
        }
    }
}