コード例 #1
0
ファイル: loader.php プロジェクト: sss201413/ecstore
 function __construct()
 {
     set_time_limit(0);
     cachemgr::init(false);
     cacheobject::init(false);
     kernel::$console_output = true;
     set_error_handler(array(&$this, 'error_handle'));
     if (file_exists(ROOT_DIR . '/config/config.php')) {
         require ROOT_DIR . '/config/config.php';
         $this->status['config'] = ROOT_DIR . '/config/config.php';
     } else {
         $this->status['config'] = 'false';
     }
     include APP_DIR . '/base/defined.php';
     //为shell设置BASE_URL
     if (!defined('BASE_URL')) {
         if ($shell_base_url = app::get('base')->getConf('shell_base_url')) {
             define('BASE_URL', $shell_base_url);
         } else {
             trigger_error('please login backend first!', E_USER_NOTICE);
         }
     }
     date_default_timezone_set(defined('DEFAULT_TIMEZONE') ? 'Etc/GMT' . (DEFAULT_TIMEZONE >= 0 ? DEFAULT_TIMEZONE * -1 : '+' . DEFAULT_TIMEZONE * -1) : 'UTC');
     $this->buildin_commander = new base_shell_buildin($this);
 }
コード例 #2
0
ファイル: loader.php プロジェクト: dalinhuang/shopexts
 function __construct()
 {
     set_time_limit(0);
     cachemgr::init(false);
     kernel::$console_output = true;
     if (file_exists(ROOT_DIR . '/config/config.php')) {
         require ROOT_DIR . '/config/config.php';
         $this->status['config'] = ROOT_DIR . '/config/config.php';
     } else {
         $this->status['config'] = 'false';
     }
     include APP_DIR . '/base/defined.php';
     date_default_timezone_set(defined('DEFAULT_TIMEZONE') ? 'Etc/GMT' . (DEFAULT_TIMEZONE >= 0 ? DEFAULT_TIMEZONE * -1 : '+' . DEFAULT_TIMEZONE * -1) : 'UTC');
     $this->buildin_commander = new base_shell_buildin($this);
 }
コード例 #3
0
ファイル: webproxy.php プロジェクト: dalinhuang/shopexts
 function __construct()
 {
     header('Content-type: text/plain;charset=utf-8');
     ignore_user_abort(false);
     ob_implicit_flush(1);
     ini_set('implicit_flush', true);
     set_error_handler(array(&$this, 'error_handle'));
     chdir('data');
     kernel::$console_output = true;
     while (ob_get_level()) {
         ob_end_flush();
     }
     echo str_repeat("", 1024);
     //$this->buildin_commander = new base_shell_buildin($this);
     parent::__construct();
 }
コード例 #4
0
ファイル: base.php プロジェクト: sss201413/ecstore
 public function maintenance_theme_files($theme_dir = '')
 {
     if (!$theme_dir) {
         return;
     }
     set_time_limit(0);
     cachemgr::init(false);
     header('Content-type: text/html;charset=utf-8');
     ignore_user_abort(false);
     ob_implicit_flush(1);
     ini_set('implicit_flush', true);
     kernel::$console_output = true;
     while (ob_get_level()) {
         ob_end_flush();
     }
     echo str_repeat("", 1024);
     echo '<pre>';
     echo '>update themes' . "\n";
     if ($theme_dir == WAP_THEME_DIR) {
         $dir = new DirectoryIterator($theme_dir);
         foreach ($dir as $file) {
             $filename = $file->getFilename();
             if ($filename[0] == '.') {
                 continue;
             } else {
                 $this->update_theme_widgets($filename);
             }
         }
     } else {
         $this->update_theme_widgets($theme_dir);
     }
     echo 'ok.</pre>';
 }
コード例 #5
0
ファイル: default.php プロジェクト: syjzwjj/quyeba
 function index()
 {
     $this->_init_keyboard_setting();
     $desktop_user = kernel::single('desktop_user');
     $menus = $desktop_user->get_work_menu();
     $user_id = $this->user->get_id();
     $set_config = $desktop_user->get_conf('fav_menus', $fav_menus);
     //默认显示5个workground
     $workground_count = app::get('desktop')->getConf('workground.count') ? app::get('desktop')->getConf('workground.count') - 1 : 5;
     if (!$set_config) {
         $i = 0;
         foreach ((array) $menus['workground'] as $key => $value) {
             //if($i++>$workground_count) break;
             $fav_menus[] = $key;
         }
     }
     $obj = kernel::service('desktop_index_seo');
     if (is_object($obj) && method_exists($obj, 'title')) {
         $title = $obj->title();
     } else {
         $title = app::get('desktop')->_('管理后台');
     }
     if (is_object($obj) && method_exists($obj, 'title_desc')) {
         $title_desc = $obj->title_desc();
     } else {
         $title_desc = 'Powered By ShopEx';
     }
     /*
      检查本地是否有更新,并触发更新
      应用场景:在打补丁包或升级包的时候
      TODO:之后考虑在线安装的情况
     */
     $deploy = kernel::single('base_xml')->xml2array(file_get_contents(ROOT_DIR . '/config/deploy.xml'), 'base_deploy');
     $local_has_update = false;
     if (!($product_version = app::get('base')->getConf('product_version'))) {
         $local_has_update = true;
         app::get('base')->setConf('product_version', $deploy['product_version']);
     } elseif (version_compare($product_version, $deploy['product_version'], '!=')) {
         $local_has_update = true;
         app::get('base')->setConf('product_version', $deploy['product_version']);
     }
     if ($local_has_update) {
         $shell_handle = kernel::single('base_shell_loader');
         kernel::$console_output = false;
         $shell_handle->exec_command('update');
     }
     $this->pagedata['title'] = $title;
     $this->pagedata['title_desc'] = $title_desc;
     $this->pagedata['session_id'] = kernel::single('base_session')->sess_id();
     $this->pagedata['uname'] = $this->user->get_login_name();
     $this->pagedata['param_id'] = $user_id;
     $this->pagedata['menus'] = $menus;
     $this->pagedata['fav_menus'] = (array) $fav_menus;
     $this->pagedata['shop_base'] = kernel::base_url(1);
     $this->pagedata['shopadmin_dir'] = $_SERVER['REQUEST_URI'];
     $desktop_user->get_conf('shortcuts_menus', $shortcuts_menus);
     $this->pagedata['shortcuts_menus'] = (array) $shortcuts_menus;
     $desktop_menu = array();
     foreach (kernel::servicelist('desktop_menu') as $service) {
         $array = $service->function_menu();
         $desktop_menu = is_array($array) ? array_merge($desktop_menu, $array) : array_merge($desktop_menu, array($array));
     }
     // 桌面内容替换埋点
     foreach (kernel::servicelist('desktop_content') as $services) {
         if (is_object($services)) {
             if (method_exists($services, 'changeContent')) {
                 $services->changeContent(app::get('desktop'));
                 $services->changeContent($desktop_menu);
             }
         }
     }
     $this->pagedata['desktop_menu'] = count($desktop_menu) ? '<span>' . join('</span>|<span>', $desktop_menu) . '</span>' : '';
     list($this->pagedata['theme_scripts'], $this->pagedata['theme_css']) = desktop_application_theme::get_files($this->user->get_theme());
     $this->Certi = base_certificate::get('certificate_id');
     $confirmkey = $this->setEncode($this->pagedata['session_id'], $this->Certi);
     $this->pagedata['certificate_url'] = "http://key-service.shopex.cn/index.php?sess_id=" . urlencode($this->pagedata['session_id']) . "&certi_id=" . urlencode($this->Certi) . "&version=ecstore&confirmkey=" . urlencode($confirmkey) . "&_key_=do";
     $this->display('index.html');
 }
コード例 #6
0
ファイル: runtime.php プロジェクト: 453111208/bbc
<?php

ob_implicit_flush(1);
require __DIR__ . '/../../bootstrap/start.php';
kernel::$console_output = true;
cacheobject::init(false);
// 时区设置
//$timezone = config::get('app.timezone', 8);
//date_default_timezone_set('Etc/GMT'.($timezone>=0?($timezone*-1):'+'.($timezone*-1)));
if (!defined('BASE_URL')) {
    if ($shell_base_url = app::get('base')->getConf('shell_base_url')) {
        define('BASE_URL', $shell_base_url);
    } else {
        echo 'Please install ecstore first, and login to the backend ';
    }
}