/** * Функция выводит EPG с заданным каналом * * @param string $parsedChannel */ function Get_Channel_EPG($parsed_Channel_ID, $parsed_Announce_ID) { global $content_dir; $path = "{$content_dir}/kulichki.net.{$parsed_Channel_ID}.html"; if (!is_aktuell($path)) { get_html($parsed_Channel_ID, $path); } //get announce html $path_announce = "{$content_dir}/kulichki.net.{$parsed_Announce_ID}.announce.html"; if (!is_aktuell($path_announce)) { get_html($parsed_Announce_ID, $path_announce); } parse_channel($path, $path_announce); }
//print ( "File for channel #$parsedChannel is fresh"); } //get announce html $path_announce = "{$content_dir}/kulichki.net.{$parsedChannel}.announce.html"; $mtime_announce = filemtime($path_announce); if (file_exists($path)) { $mtime_announce = filemtime($path_announce); } else { $mtime_announce = 0; } if (time() - $mtime_announce > $content_expired) { get_html($parsedChannel, 'anons', $path_announce); } else { //print ( "File for announce of channel #$parsedChannel is fresh"); } parse_channel($path, $path_announce); } else { print 'channel is not defined' . PHP_EOL; } function parse_announce($path_announce) { $EpgText = ""; //"C S13.0E-318-9400-8208\r\n"; $prevEpgEvent = ""; $prevTimeStamp = 0; $prevShortDesc = ""; $prevDesc = ""; $day = 0; $month = 0; $date = getdate(); $year = $date['year'];