* Finish task #63581.

This commit is contained in:
zhouxudong
2022-08-08 14:37:33 +00:00
parent abc59ed7aa
commit ef847f1169
15 changed files with 110 additions and 54 deletions
+21
View File
@@ -704,6 +704,27 @@ class program extends control
echo $html;
}
/**
* ajax get childish information.
*
* @param int $programID
* @access public
* @return void
*/
public function ajaxGetChildInfo($programID)
{
$children = $this->program->getChildren($programID);
if($children > 0)
{
$minChildBegin = $this->dao->select('begin as minBegin')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->orderBy('begin_asc')->fetch();
$maxChildEnd = $this->dao->select('end as maxEnd')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->andWhere('end')->ne('0000-00-00')->orderBy('end_desc')->fetch();
}
$data = array('minChildBegin' => $minChildBegin->minBegin, 'maxChildEnd' => $maxChildEnd->maxEnd);
echo json_encode($data);
}
/**
* Update program order.
*