public function get_shield_zone() { $channel_id = $this->input['channel_code']; $dates = $this->input['dates']; if (!$dates) { $dates = date('Y-m-d'); } if (!@(include CACHE_DIR . 'channel/' . $channel_id . '.php')) { $this->db = hg_ConnectDB(); include_once CUR_CONF_PATH . 'lib/channel.class.php'; $mChannel = new channel(); $mChannel->cache_channel($channel_id); @(include CACHE_DIR . 'channel/' . $channel_id . '.php'); } if (!$channel_info['channel']) { $this->errorOutput('NO_CHANNEL_NAME'); } if (!$channel_info['channel']['status']) { $this->errorOutput('CHANNEL_STOP'); } $program_shield_dir = $this->settings['program_shield_dir'] ? $this->settings['program_shield_dir'] : 'program_shield'; $dir = $dates; $cache_file = CACHE_DIR . $program_shield_dir . '/' . $dir . '/' . $channel_info['channel']['code'] . '.php'; if (!@(include $cache_file)) { $this->db = hg_ConnectDB(); include_once CUR_CONF_PATH . 'lib/program_shield.class.php'; $mProgramShield = new programShield(); $mProgramShield->cache_program_shield($channel_info['channel']['id'], $dates, $channel_info['channel']['code']); include $cache_file; } if (!$program_shield_zone) { $program_shield_zone = array(); } foreach ($program_shield_zone as $v) { $this->addItem($v); } $this->output(); }
private function get_shield($dates) { if ($this->settings['bantype'] == 'player') { return array(); //采用播放器屏蔽 } $program_shield_dir = $this->settings['program_shield_dir'] ? $this->settings['program_shield_dir'] : 'program_shield'; $dir = $dates; $cache_file = CACHE_DIR . $program_shield_dir . '/' . $dir . '/' . $this->mChannelinfo['channel']['code'] . '.php'; if (!@(include $cache_file)) { include_once CUR_CONF_PATH . 'lib/program_shield.class.php'; $mProgramShield = new programShield(); $mProgramShield->cache_program_shield($this->mChannelinfo['channel']['id'], $dates, $this->mChannelinfo['channel']['code']); include $cache_file; } if (!$program_shield_zone) { $program_shield_zone = array(); } return $program_shield_zone; }