Esempio n. 1
0
	function Run()
	{
		require_once(LOGIC_PATH.'task.logic.php');
		$TaskLogic=new TaskLogic();
		$TaskLogic->run();
		echo 'ok';
		exit;
	}
Esempio n. 2
0
 function Notice_email($touid = 0)
 {
     $touid = max(0, (int) $touid);
     $timestamp = time();
     $sql = "select `uid`,`email`,`notice_at`,`notice_pm`,`notice_reply`,`user_notice_time`,`last_notice_time` from `" . TABLE_PREFIX . "members` where `uid` = '{$touid}'";
     $query = $this->DatabaseHandler->Query($sql);
     $members = $query->GetRow();
     $sql = "select * from `" . TABLE_PREFIX . "cron` where `touid` = '{$touid}'";
     $query = $this->DatabaseHandler->Query($sql);
     $crons = $query->GetRow();
     if ($members['user_notice_time'] == 0) {
         Load::logic('task');
         $TaskLogic = new TaskLogic();
         $TaskLogic->run($id = 1);
     }
     if ($send_return) {
         jtable('members')->update_count($touid, 'last_notice_time', $timestamp);
         $sql = "delete from `" . TABLE_PREFIX . "cron` where `id`= '{$crons['id']}' ";
         $this->DatabaseHandler->Query($sql);
     }
 }
Esempio n. 3
0
 function run($id = 0, $messager = true)
 {
     $id = (int) ($this->ID ? $this->ID : $id);
     if ($id < 1) {
         $messager && $this->Messager("请先指定一个ID", null);
         return false;
     }
     Load::logic('task');
     $TaskLogic = new TaskLogic();
     $TaskLogic->run($id);
     $messager && $this->Messager("已成功执行", '', 5);
     return true;
 }