1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="refresh" content="600; URL=vdradmin.pl?aktion=prog_timeline">
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
<title>VDRAdmin - Echelle de Temps</title>
<?%-
breite = 600;
seite = 100;
left = 20;
zeitrahmen = config.ZEITRAHMEN || 1; # Zeitrahmen der angezeigt werden soll in Stunden
times = config.TIMES.split(',\s*');
USE date;
jetzt_stunde = date.format(date.now, '%H');
jetzt_minute = date.format(date.now, '%M');
akt_stunde = date.format(now_sec, '%H');
akt_minute = (date.format(now_sec, '%M') < 30 ? '00' : '30');
diff_minute = jetzt_minute - akt_minute;
IF date.format(date.now, '%H:%M') == date.format(now_sec, '%H:%M');
akt_sekunde = now_sec - (diff_minute * 60);
ELSE;
akt_sekunde = now_sec;
END;
bis = 60 * zeitrahmen;
bis_sec = akt_sekunde + (bis * 60);
bis_minute = bis;
bis_stunde = date.format(bis_sec, '%H');
minute = 0;
z = 0;
einheit = ((breite / bis) + 0.5) | format('%i');
-%?>
<link href="style.css" rel="stylesheet" media="screen">
<style type="text/css">
#prgtable { border-left-width:1px; border-left-color:#c4cdd7; border-left-style:solid; border-bottom-width:1px; border-bottom-color:#c4cdd7; border-bottom-style:solid; padding:2px; }
#timertable { background:red; border-left-width:1px; border-left-color:#ffcdd7; border-left-style:solid; border-bottom-width:1px; border-bottom-color:#ffcdd7; border-bottom-style:solid; padding:2px; }
<?% IF jetzt_stunde >= akt_stunde && jetzt_stunde < akt_stunde + zeitrahmen %?>
#zeitleiste { position:absolute; filter:Alpha(opacity=50); top:150px; left:<?% left + seite + (einheit * diff_minute) + 30 %?>px; width:1px; height:<?% shows.keys.size * 21 + 2 %?>px; z-index:10; background:red; z-index:2; }
<?% END %?>
#bigtable { position:absolute; top:100px; left: <?% left %?>px; z-index: 1; }
</style>
<script language="JavaScript" src="library.js"></script>
<script language="JavaScript">
function Go(x) {
if(x =="nothing") {
document.forms[0].reset();
document.forms[0].elements[0].blur();
return;
} else {
parent.frames[1].location.href = x;
document.forms[0].elements[0].blur();
}
}
</script>
</head>
<body bgcolor="#c4cdd7" leftmargin="3" marginheight="20" marginwidth="3" topmargin="20">
<form action="<?% nowurl %?>" method="get" name="FormName">
<table width="<?% breite + seite + 80 %?>" border="0" cellspacing="0" cellpadding="0" height="39" style='position:absolute; left:<?% left %?>; top: 20px'>
<tr>
<td valign="middle" background="bilder/nav_button_back.gif">
<nobr><p class="einzug_ohnetop"><b><?% now %?></b></p></nobr>
</td>
<td align="right" background="bilder/nav_button_back_mitte.gif">
Quand :
<select size=1 name="Auswahl" onChange="Go(this.form.Auswahl.options[this.form.Auswahl.options.selectedIndex].value)" style="width:100px"; width="100">
<option value="<?% nowurl %?>">maintenant</option>
<?% FOREACH timer = times %?>
<?% timer_o_dopp = timer | replace('\:', '') %?>
<option value="<?% nowurl %?>&time=<?% timer_o_dopp %?>" <?% "selected" IF now == timer %?>><?% timer %?></option>
<?% END %?>
</select>
| à :
</td>
<td align="right" width="50" background="bilder/nav_button_back_mitte.gif">
<input type="text" name="time" size="5" value="<?% now %?>">
<input type="hidden" name="aktion" value="prog_timeline">
</td>
<td width="15" background="bilder/nav_button_back_end.gif"> </td>
</tr>
</table>
<br>
<!-- Vertikal ansicht TOP -->
<span id="zeitleiste" class="zeitleiste"><img src="bilder/spacer.gif" width="1" height=1 border=0></span>
<!-- Zeitleiste -->
<table width="<?% breite + seite + 40 %?>" border="0" cellspacing="0" cellpadding="0" name="bigtable" id="bigtable">
<tr>
<td valign="top" width="30">
<p><img src="bilder/uebersicht_oben_links.gif" alt="" height="30" width="30" border="0"></p>
</td>
<td colspan="3" width='<?% breite + seite %?>' background="bilder/uebersicht_oben.gif">
<b>Echelle de Temps : <?% date.format(akt_sekunde, '%H:%M') %?> à <?% date.format(bis_sec, '%H:%M') %?></b>
</td>
<td align="right" background="bilder/uebersicht_oben.gif">
<nobr><?% IF akt_stunde <= jetzt_stunde %?><img src="bilder/pfeile_nachlinks_soft.gif" border="0"><?% ELSE %?><a href="<?% nowurl %?>&time=<?% akt_stunde - zeitrahmen | format('%02d') %?><?% akt_minute | format('%02d') %?>"><img src="bilder/pfeile_nachlinks.gif" border="0"></a><?% END %?><a href="<?% nowurl %?>&time=<?% bis_stunde | format('%02d') %?><?% akt_minute | format('%02d') %?>"><img src="bilder/pfeile_nachrechts.gif" border="0"></a></nobr>
</td>
<td valign="top" width="30"><img src="bilder/uebersicht_oben_rechts.gif" alt="" height="30" width="30" border="0"></td>
</tr>
<tr>
<td valign="top" width="30" background="bilder/uebersicht_links.gif"> </td>
<td background="bilder/uebersicht_mitte.gif"> </td>
<td background="bilder/uebersicht_mitte.gif"> </td>
<td background="bilder/uebersicht_mitte.gif"> </td>
<td background="bilder/uebersicht_mitte.gif"> </td>
<td valign="top" width="30" background="bilder/uebersicht_rechts.gif"> </td>
</tr>
<tr>
<td valign="top" width="30" background="bilder/uebersicht_links.gif"> </td>
<td colspan="4">
<table border=0 cellpadding=0 cellspacing=0 width="1">
<tr>
<td bgcolor="#e6eff9"><img src="bilder/spacer.gif" width="<?% seite %?>" height=1 border=0><br></td>
<?% WHILE minute < bis %?>
<td colspan="6" bgcolor='<?% minute % 60 ? "#e6eff9" : "#d5dee8" %?>'>
<img src="bilder/spacer.gif" width="<?% einheit * 30 %?>" height=1 border=0>
<br>
<?% zeit = akt_sekunde + (minute * 60) %?>
<b><?% date.format(zeit, '%H:%M') %?></b>
</td>
<?% minute = minute + 30 %?>
<?% END %?>
</tr>
<?% minute = 0 %?>
<tr>
<td bgcolor="#e6eff9">
<img src="bilder/spacer.gif" width="<?% seite %?>" height=1 border=0>
<br>
</td>
<?% WHILE minute < bis %?>
<td width='1%' align=left valign=bottom bgcolor='<?% minute % 10 ? "#e6eff9" : "#d5dee8" %?>'>
<?% IF minute % 15 %?>
<img src="bilder/pixel.gif" width="1" height=5 border=0>
<?% ELSE %?>
<img src="bilder/pixel.gif" width="1" height=10 border=0>
<?% END %?>
</td>
<?% minute = minute + 5 %?>
<?% END %?>
</tr>
</table>
<table border=0 cellpadding=0 cellspacing=0 width="1">
<!-- Sendernamen -->
<?% b = 0;
FOREACH name = shows.keys.nsort;
old_stop_minute = -1;
chars = seite / 10 | format('%i');
b = b + 1 %?>
<tr>
<td valign='top' bgcolor='<?% b % 2 ? "#d5dee8" : "#e6eff9" %?>'>
<img src="bilder/spacer.gif" width="<?% seite %?>" height=1 border=0>
<br>
<a href="<?% shows.${name}.first.proglink %?>"><b><?% shows.${name}.first.progname | truncate(chars) %?></b></a>
</td>
<!-- Programm -->
<td colspan="<?% (bis / 5) %?>" bgcolor='<?% b % 2 ? "#d5dee8" : "#e6eff9" %?>'>
<?%
z = 0;
FOREACH show = shows.${name};
start_stunde = date.format(show.start, '%H') - akt_stunde;
# start_stunde = (start_stunde < 0 ? 0 : start_stunde);
start_minute = date.format(show.start, '%M') - akt_minute;
start_minute = (start_stunde * 60 ) + start_minute;
show.stop = show.stop - 60;
stop_stunde = date.format(show.stop, '%H') - akt_stunde;
stop_stunde = (stop_stunde < 0 ? 0 : stop_stunde);
stop_minute = date.format(show.stop, '%M') - akt_minute;
stop_minute = (stop_stunde * 60 )+ stop_minute;
IF start_minute < akt_minute; start_minute = 0; END;
IF stop_minute > bis_minute; stop_minute = bis_minute; END;
laenge = stop_minute - start_minute;
laenge_pix = laenge * einheit;
laenge_chars = ((laenge_pix / 10) + 0.5) | format('%i');
NEXT IF start_minute >= bis_minute;
IF start_minute >= old_stop_minute;
start_minute = start_minute + 1 IF start_minute == old_stop_minute;
%?>
<?% IF start_minute > akt_minute && ! z %?>
<?% diff = (start_minute - akt_minute) * einheit %?>
<table border=0 align=left cellpadding=0 cellspacing=0>
<td width="1">
<img src='bilder/spacer.gif' width='<?% diff %?>' height='8' border=0 align=left hspace=0>
</td>
</table>
<?% END %?>
<?% IF old_stop_minute + 1 < start_minute && z %?>
<?% diff = (start_minute - old_stop_minute - 1) * einheit %?>
<img title="DiffMinute: <?% start_minute - old_stop_minute - 1 %?>" src='bilder/spacer.gif' width='<?% diff %?>' height='8' border=0 align=left hspace=0>
<?% END %?>
<?% bg_color = date.now > show.start && date.now < show.stop ? "#f7fffA" : "#e6eee9"; bg_color = show.timer ? "#ffeee9" : bg_color %?>
<table border=0 align=left cellpadding=0 cellspacing=0 id="<?% show.timer ? "timertable" : "prgtable" %?>">
<tr>
<td width="1" bgcolor="<?% bg_color %?>">
<img src="bilder/spacer.gif" width="<?% laenge_pix %?>" height=1 border=0 hspace=0>
<br>
<nobr>
<?% IF show.summary %?>
<a href="javascript:popup('./vdradmin.pl?aktion=prog_detail&epg_id=<?% show.anchor %?>&vdr_id=<?% show.vdr_id %?>');">
<?% END %?>
<?% IF laenge_chars > 2 %?>
<span title='<?% show.title %?>'><?% show.title | truncate( laenge_chars ) %?></div>
<?% ELSE %?>
<img src='bilder/spacer.gif' width='1' height='8' border=0 hspace=0>
<?% END %?>
<?% IF show.summary %?>
</a>
<?% END %?>
</nobr>
</td>
</tr>
</table>
<?% END;
z = z + 1;
old_start_minute = start_minute;
old_stop_minute = stop_minute;
END %?>
</td>
</tr>
<?% END %?>
</table>
</td>
<!-- Vertikal ansicht END -->
<td valign="top" width="30" background="bilder/uebersicht_rechts.gif"> </td>
</tr>
<tr>
<td valign="top" width="30"><img src="bilder/uebersicht_unten_links.gif" alt="" height="30" width="30" border="0"></td>
<td background="bilder/uebersicht_unten.gif"> </td>
<td background="bilder/uebersicht_unten.gif"> </td>
<td background="bilder/uebersicht_unten.gif"> </td>
<td background="bilder/uebersicht_unten.gif"> </td>
<td valign="top" width="30"><img src="bilder/uebersicht_unten_rechts.gif" alt="" height="30" width="30" border="0"></td>
</tr>
</table>
</form>
</body>
</html>
|