Exemple #1
0
 public static function refresh_module_action()
 {
     $register = Module_ModuleManager_Register::get_instance()->register_modules();
     if ($register === false) {
         Module_View_Main::view()->output(0);
     } else {
         Module_OperationRecord_Main::add_record(Module_OperationRecord_Main::OPCODE_MODULE_UPDATE);
         Module_View_Main::view()->output($register);
     }
 }
Exemple #2
0
 static function refresh_nav()
 {
     $refresh = Module_Page_Manager::refresh_nav();
     Module_OperationRecord_Main::add_record(Module_OperationRecord_Main::OPCODE_NAV_UPDATE);
     Module_View_Main::view()->output($refresh);
 }
Exemple #3
0
 static function get_task_status_action()
 {
     $task_id = Lib_Request::get_int('task_id');
     $rtn = self::_get_task_status($task_id);
     Module_View_Main::view()->output($rtn);
 }
Exemple #4
0
<?php

session_start();
require_once dirname(dirname(__FILE__)) . '/app/init.php';
Module_HttpRequest_Router::get_instance()->register_pre_router_hook(['Module_Account_Manager', 'check_perm']);
Module_View_Main::view()->set_template_dir(Da\Sys_App::template_path());
$router = [Module_HttpRequest_Router::get_instance(), 'route'];
if (Da\Sys_Router::get_instance()->register_router($router)) {
    MT::lang(MT::LANG_ZH_CN);
    $dispatch = Da\Sys_Router::get_instance()->dispatch();
    if ($dispatch['errno'] != Da\Sys_Router::ERRNO_OK) {
        echo $dispatch['data'];
        exit;
    }
} else {
    Lib_Log::error('Route rules ' . json_encode($rules) . ' is not callable!');
}
Exemple #5
0
 /**
  * @param string $template
  * @param array $var
  */
 static function render($template, $var = [])
 {
     $global_var = ['title' => '数据接入 - Data Access', 'user' => Module_Account_User::current_user_info()];
     if (Da\Sys_Config::config('app/base')['run_mode'] == DA_RUN_MODE_PRE) {
         $global_var['title'] = '预接入系统 - Data Access';
     } else {
         if (Da\Sys_Config::config('app/base')['run_mode'] == DA_RUN_MODE_DEV) {
             $global_var['title'] = '开发接入系统 - Data Access';
         }
     }
     $template_array = ['header' => ['common/header', $global_var], 'nav' => ['common/nav', $global_var], 'message_board' => ['common/message_board'], 'crumb' => ['common/crumb'], 'page' => [$template, $var], 'footer' => ['common/footer', $global_var]];
     Module_View_Main::view()->m_render($template_array, 'common/base_page');
 }
Exemple #6
0
 /**
  * @param array $data
  * @param string $format
  */
 static function output($data, $format = 'json')
 {
     Module_View_Main::view()->output($data, $format);
 }