| (.*?)<\/b>#is', $handle, $nazwa)) { define('TV_STACJA', $nazwa[1][0]); if(preg_match_all('# | #is', $handle, $result)) { $res = $result[1]; $i=0; $a=0; $b=0; while($b'); $tmp = '<'.$res[$i+1]; $title = strip_tags($tmp, ' '); $desc = ''; if(eregi(' ', $title)) { $list = explode(' ', $title); $title = $list[0]; for($j=1; $j'; } $desc = substr($desc, 0, -4); if(strlen($desc) < 25) $desc = ' '; } if(count($titles) > 0) { foreach($titles as $t) { if(eregi($t, $title)) $title = $t; } } $time = strtotime(TV_DATA.' '.$date); if(date('H', $time) <= 04 && date('i', $time) <= 40) $time+= 3600*24; $from = 0; $to = 0; if(ereg('..', FROM_TO)) { list($from, $to) = explode('..', FROM_TO); $from = strtotime(TV_DATA.' '.$from); $to = strtotime(TV_DATA.' '.$to); } if(($from <> 0 AND $from <= $time AND $to <> 0 AND $to >= $time) OR FROM_TO == false) { $Tab[$a]['time'] = $time; $Tab[$a]['title'] = $title; $Tab[$a]['desc'] = $desc; if($hit == true) $Tab[$a]['hit'] = true; else $Tab[$a]['hit'] = false; $a++; } $i+=2; $b++; } } } return $Tab;}?> |