public function programTemplateSetDetail() { $intChannelId = intval($this->input['channelId']); if (!$intChannelId) { $this->errorOutput('NO CHANNELID'); } //如果没有起始时间 和结束时间 则1-1 到12-31 $this->input['startTime'] = $this->input['startTime'] ? $this->input['startTime'] : date('Y') . '-1-1'; $this->input['endTime'] = $this->input['endTime'] ? $this->input['endTime'] : date('Y') + 1 . '-12-31'; $intStartTime = intval(date('Ymd', strtotime($this->input['startTime']))); $intEndTime = intval(date('Ymd', strtotime($this->input['endTime']))); $condition = ' AND channel_id = ' . $intChannelId; $condition .= ' AND intdate >= ' . $intStartTime; $condition .= ' AND intdate <= ' . $intEndTime; if (!class_exists('programTemplate')) { include CUR_CONF_PATH . 'lib/program_template.class.php'; } $objProTemplate = new programTemplate(); $relation = $objProTemplate->getProTemRelation($condition); $condition = ''; $arTemplateList = $objProTemplate->getList($condition, 'id, title'); $ret = array('relation' => $relation, 'templateList' => $arTemplateList); $this->addItem($ret); $this->output(); }