webmain/task/runt/runtAction.php
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* 计划任务用的程序
*/
class runtAction extends ActionNot
{
public $runid = 0;
public $queuelogid = 0;
public $runrs = array();
public $splitlast = 0; //距离上次提醒秒数0上次没有运行
public $todoarr = array();
public function initAction()
{
$this->display = false;
ob_start(); //打开缓冲区
$this->runid = (int)$this->getparams('runid','0');
$this->queuelogid = (int)$this->getparams('queuelogid','0');
$this->initTask($this->runid);
}
public function initTask($runid)
{
if($runid==0)return;
$this->runid = $runid;
$this->runrs = m('task')->getone($this->runid);
if($this->runrs && !isempt($this->runrs['lastdt'])){
$this->splitlast = time() - strtotime($this->runrs['lastdt']);
}
}
public function taskAfter()
{
//提醒的
$todoid = arrvalue($this->runrs,'todoid');
if(!isempt($todoid) && $this->todoarr){
$modenum = arrvalue($this->todoarr, 'modenum');
$agentname = arrvalue($this->todoarr, 'agentname');
$title = arrvalue($this->todoarr, 'title');
$cont = arrvalue($this->todoarr, 'cont');
if(!isempt($modenum)){
$flow = m('flow')->initflow($modenum);
$flow->push($todoid, $agentname, $cont, $title);
}else{
m('todo')->add($todoid, $title, $cont);
}
}
}
//判断模块是否存在开启
public function moderock($num)
{
$to = m('flow_set')->rows("`num`='$num' and `status`=1");
return ($to>0);
}
/**
* 运行完成后判断运行状态
*/
后面还有 132 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
