discuzビジネスメカニズムプロセス
1989 ワード
バックグラウンドphp?action=misc&operation=cron
フロントphp
admin.php
class_admincp.php
ビジネス・オペレーション
フロントphp
admin.php
} elseif(in_array($action, $admincp_actions_normal) || ($admincp->isfounder && in_array($action, $admincp_actions_founder))) {
if($admincp->allow($action, $operation, $do) || $action == 'index') {
require $admincp->admincpfile($action);
} else {
cpheader();
cpmsg('action_noaccess', '', 'error');
}
} else {
class_admincp.php
//TRUE or false
function allow($action, $operation, $do) {
if($this->perms === null) {
$this->load_admin_perms();
}
if(isset($this->perms['all'])) {
return $this->perms['all'];
}
if(!empty($_POST) && !array_key_exists('_allowpost', $this->perms)) {
return false;
}
$key = $action;
if(isset($this->perms[$key])) {
return $this->perms[$key];
}
$key = $action.'_'.$operation;
if(isset($this->perms[$key])) {
return $this->perms[$key];
}
$key = $action.'_'.$operation.'_'.$do;
if(isset($this->perms[$key])) {
return $this->perms[$key];
}
return false;
}
//
function admincpfile($action) {
return './source/admincp/admincp_'.$action.'.php';
}
ビジネス・オペレーション
} elseif($operation == 'cron') {
if(empty($_G['gp_edit']) && empty($_G['gp_run'])) {
if(!submitcheck('cronssubmit')) {//
................................
$query = DB::query("SELECT * FROM ".DB::table('common_cron')." ORDER BY type DESC");
................................