private function _init_cron() { $ext = empty($this->config['remote']['on']) || empty($this->config['remote']['cron']) || APPTYPEID == 200; if ($this->init_cron && $this->init_setting && $ext) { if ($this->var['cache']['cronnextrun'] <= TIMESTAMP) { dzz_cron::run(); } } }
$msg_type = 'text-error'; $redirecturl = dreferer(); include template('cron'); exit; } DB::update('cron', array('weekday' => $_GET['weekdaynew'], 'day' => $daynew, 'hour' => $_GET['hournew'], 'minute' => $minutenew, 'filename' => trim($_GET['filenamenew'])), "cronid='{$cronid}'"); dzz_cron::run($cronid); $msg = lang('template', 'crons_succeed'); $msg_type = 'text-success'; $redirecturl = BASESCRIPT . '?mod=system&op=cron'; } } else { $cron['filename'] = str_replace(array('..', '/', '\\'), '', $cron['filename']); $efile = explode(':', $cron['filename']); if (count($efile) > 1) { $cronfile = DZZ_ROOT . './dzz/' . $efile[0] . '/cron/' . $efile[1]; } else { $cronfile = DZZ_ROOT . './core/cron/' . $cron['filename']; } if (!file_exists($cronfile)) { $msg = lang('template', 'crons_run_invalid', array('cronfile' => $cronfile)); $msg_type = 'text-error'; } else { dzz_cron::run($cron['cronid']); $msg = lang('template', 'crons_run_succeed'); $redirecturl = BASESCRIPT . '?mod=system&op=cron'; $msg_type = 'text-success'; } } } include template('cron');