13 |
warn dump $tv; |
warn dump $tv; |
14 |
|
|
15 |
print qq| |
print qq| |
16 |
|
<html> |
17 |
|
<head> |
18 |
|
<meta charset=utf-8> |
19 |
|
|
20 |
<style type="text/css"> |
<style type="text/css"> |
21 |
|
|
22 |
,hour { |
td { |
23 |
border-top: 1px dashed #ccc; |
font-family:sans-serif; |
24 |
|
vertical-align: top; |
25 |
|
background: #eee; |
26 |
|
} |
27 |
|
|
28 |
|
th,odd { |
29 |
|
background: #eef; |
30 |
|
} |
31 |
|
|
32 |
|
th.even { |
33 |
|
background: #fcc; |
34 |
|
} |
35 |
|
|
36 |
|
.hhmm { |
37 |
|
font-size: 50%; |
38 |
|
color: #888; |
39 |
|
float: right; |
40 |
} |
} |
41 |
|
|
42 |
</style> |
</style> |
43 |
|
|
44 |
<table border=1 > |
</head> |
45 |
|
<body> |
46 |
|
|
47 |
|
<table> |
48 |
<tr><td></td> |
<tr><td></td> |
49 |
|; |
|; |
50 |
|
|
90 |
foreach my $c ( @channels ) { |
foreach my $c ( @channels ) { |
91 |
if ( $programs->{$c}->[0]->[0] == $hh * 60 + $mm ) { |
if ( $programs->{$c}->[0]->[0] == $hh * 60 + $mm ) { |
92 |
my $p = shift @{ $programs->{$c} }; |
my $p = shift @{ $programs->{$c} }; |
93 |
my $span = $p->[1] - 1; |
my $span = $p->[1]; # - 1; |
94 |
push @td, join('' |
|
95 |
, qq|<td rowspan=$span>| |
my $html = ''; |
96 |
, join("\n" |
$html = join("\n" |
97 |
, qq|<span class="hhmm">$hhmm</span>| |
, qq|<span class="hhmm">$hhmm<br>$span</span>| |
98 |
, $p->[2]->{title}->{content} || '-' |
, $p->[2]->{title}->{content} |
99 |
, "<!-- $c -->" |
, "<!-- $c -->" |
100 |
) |
) if $p->[2]; |
101 |
. qq|</td>| |
|
102 |
); |
push @td, qq|<td rowspan=$span>$html</td>|; |
103 |
} |
} |
104 |
} |
} |
105 |
|
|
106 |
my ($th,$class) = ('',''); |
my $class = $hh % 2 == 0 ? 'even' : 'odd'; |
107 |
($th,$class) = ( "<th rowspan=60>$hh</th>", ' class="hour"' ) if $mm == 0; |
|
108 |
print qq|<tr$class>$th|, join('', @td), qq|</tr>\n|; |
my $th = ''; |
109 |
|
$th = qq|<th rowspan=60 class=$class>$hh</th>| if $mm == 0; |
110 |
|
|
111 |
|
print qq|<tr>$th|, join('', @td), qq|</tr>\n|; |
112 |
} |
} |
113 |
} |
} |
114 |
|
|
115 |
print qq| |
print qq| |
116 |
</table> |
</table> |
117 |
|
|
118 |
|
</body> |
119 |
|
|
120 |
|
</html> |
121 |
|; |
|; |