MPFire Version 2 begonnen
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / mpfire.cgi
1 #!/usr/bin/perl
2 #
3 # IPFire CGIs
4 #
5 # This code is distributed under the terms of the GPL
6 #
7 # (c) The IPFire Team
8
9 use strict;
10 # enable only the following on debugging purpose
11 use warnings;
12 use CGI::Carp 'fatalsToBrowser';
13
14 require '/var/ipfire/general-functions.pl';
15 require "${General::swroot}/lang.pl";
16 require "${General::swroot}/header.pl";
17
18 my %color = ();
19 my %mainsettings = ();
20 my %mpfiresettings = ();
21 my %checked = ();
22 my $message = '0';
23 my $errormessage = "";
24
25 &General::readhash("${General::swroot}/main/settings", \%mainsettings);
26 &General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
27
28 &Header::showhttpheaders();
29
30 sub refreshpage{&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' content='1;' />" );print "<center><img src='/images/clock.gif' alt='' /><br/><font color='red'>$Lang::tr{'pagerefresh'}</font></center>";&Header::closebox();}
31
32 $mpfiresettings{'PAGE'} = "1";
33
34 open(DATEI, "<${General::swroot}/mpfire/db/mpd.db") || die "No Database found";
35 my @songdb = <DATEI>;
36 close(DATEI);
37
38 my @artist; my @album; my @genre; my @year; my $linecount = 0; my @currentsong = ""; my %songs;
39 foreach (@songdb){
40
41 if ( $_ =~ /mtime: / ){
42 $songs{$currentsong[1]}="$currentsong[2]|$currentsong[3]|$currentsong[4]|$currentsong[5]|$currentsong[6]|$currentsong[7]|$currentsong[8]|$currentsong[9]";
43 push(@artist,$currentsong[4]);
44 push(@album,$currentsong[6]);
45 push(@year,$currentsong[8]);
46 push(@genre,$currentsong[9]);
47 @currentsong = "";
48 }
49 elsif ( $_ =~ /key: / || $_ =~ /file: / || $_ =~ /Time: / || $_ =~ /Artist: / || $_ =~ /Title: / || $_ =~ /Album: / || $_ =~ /Track: / || $_ =~ /Date: / || $_ =~ /Genre: / ){
50 my @temp = split(/: /,$_);
51 push(@currentsong,$temp[1]);
52 }
53 else {
54 next;
55 }
56 }
57
58 my %hash = map{ $_, 1 }@artist;
59 @artist = sort keys %hash;
60 my %hash = map{ $_, 1 }@album;
61 @album = sort keys %hash;
62 my %hash = map{ $_, 1 }@year;
63 @year = sort keys %hash;
64 my %hash = map{ $_, 1 }@genre;
65 @genre = sort keys %hash;
66
67 my $artistcount = $#artist+1;
68 my $albumcount = $#album+1;
69 my $yearcount = $#year+1;
70 my $genrecount = $#genre+1;
71
72 &Header::getcgihash(\%mpfiresettings);
73 &Header::openpage($Lang::tr{'mpfire'}, 1, "<meta http-equiv='refresh' content='120' />");
74 &Header::openbigbox('100%', 'left', '', $errormessage);
75
76 ############################################################################################################################
77 ######################################## Scanne Verzeichnisse nach Mp3 Dateien #############################################
78
79 if ( $mpfiresettings{'ACTION'} eq "scan" )
80 {
81 delete $mpfiresettings{'__CGI__'};delete $mpfiresettings{'x'};delete $mpfiresettings{'y'};delete $mpfiresettings{'PAGE'};
82 &General::writehash("${General::swroot}/mpfire/settings", \%mpfiresettings);
83 open(DATEI, "<${General::swroot}/mpfire/mpd.conf") || die "Datei nicht gefunden";
84 my @Zeilen = <DATEI>;
85 close(DATEI);
86 open(DATEI, ">${General::swroot}/mpfire/mpd.conf") || die "Datei nicht gefunden";
87 foreach (@Zeilen){
88 if ( $_ =~ /music_directory/){print DATEI "music_directory \"".$mpfiresettings{'MUSICDIR'}."\"\n";}
89 else {print DATEI $_;}
90 }
91 close(DATEI);
92
93 $message=system("/usr/local/bin/mpfirectrl scan");
94 refreshpage();
95 }
96 elsif ( $mpfiresettings{'ACTION'} eq ">" ){$message=system("/usr/local/bin/mpfirectrl","play","\"$mpfiresettings{'FILE'}\"");}
97 elsif ( $mpfiresettings{'ACTION'} eq "x" ){$message=system("/usr/local/bin/mpfirectrl stop");}
98 elsif ( $mpfiresettings{'ACTION'} eq "|>" ){$message=system("/usr/local/bin/mpfirectrl toggle");}
99 elsif ( $mpfiresettings{'ACTION'} eq "<<" ){$message=system("/usr/local/bin/mpfirectrl prev");}
100 elsif ( $mpfiresettings{'ACTION'} eq ">>" ){$message=system("/usr/local/bin/mpfirectrl next");}
101 elsif ( $mpfiresettings{'ACTION'} eq "+" ){$message=system("/usr/local/bin/mpfirectrl volup 5");}
102 elsif ( $mpfiresettings{'ACTION'} eq "-" ){$message=system("/usr/local/bin/mpfirectrl voldown 5");}
103 elsif ( $mpfiresettings{'ACTION'} eq "++" ){$message=system("/usr/local/bin/mpfirectrl volup 10");}
104 elsif ( $mpfiresettings{'ACTION'} eq "--" ){$message=system("/usr/local/bin/mpfirectrl voldown 10");}
105 elsif ( $mpfiresettings{'ACTION'} eq "playweb" ){$message=system("/usr/local/bin/mpfirectrl","playweb","\"$mpfiresettings{'FILE'}\"");}
106 elsif ( $mpfiresettings{'ACTION'} eq "playlist" ){$message=system("/usr/local/bin/mpfirectrl playlist");}
107 elsif ( $mpfiresettings{'ACTION'} eq "emptyplaylist" ){$message=system("/usr/local/bin/mpfirectrl clearplaylist");}
108 elsif ( $mpfiresettings{'ACTION'} eq "addtoplaylist" ){$message=system("/usr/local/bin/mpfirectrl","playadd","\"$mpfiresettings{'FILE'}\"");}
109 elsif ( $mpfiresettings{'ACTION'} eq "playall" ){$message=system("/usr/local/bin/mpfirectrl playall");}
110 elsif ( $mpfiresettings{'ACTION'} eq "playalbum" )
111 {
112 my @temp = ""; my @song = ""; my @select = split(/\|/,$mpfiresettings{'album'});
113
114 foreach (keys(%songs)){
115 @song = split(/\|/,$songs{$_});$song[4] =~ s/\W/ /g;
116
117 foreach (@select){
118 $_ =~ s/\W/ /g;
119 if ( $song[4] =~ /$_/ ){push(@temp,$song[0]);}
120 }
121 }
122
123 open(DATEI, ">${General::swroot}/mpfire/playlist.m3u") || die "Could not add playlist";
124 print DATEI @temp;
125 close(DATEI);
126 $message=system("/usr/local/bin/mpfirectrl playlist");
127 }
128 elsif ( $mpfiresettings{'ACTION'} eq "playartist" )
129 {
130 my @temp = ""; my @song = ""; my @select = split(/\|/,$mpfiresettings{'artist'});
131
132 foreach (keys(%songs)){
133 @song = split(/\|/,$songs{$_});$song[2] =~ s/\W/ /g;
134
135 foreach (@select){
136 $_ =~ s/\W/ /g;
137 if ( $song[2] =~ /$_/ ){push(@temp,$song[0]);}
138 }
139 }
140
141 open(DATEI, ">${General::swroot}/mpfire/playlist.m3u") || die "Could not add playlist";
142 print DATEI @temp;
143 close(DATEI);
144 $message=system("/usr/local/bin/mpfirectrl playlist");
145 }
146 elsif ( $mpfiresettings{'ACTION'} eq "playyear" )
147 {
148 my @temp = ""; my @song = ""; my @select = split(/\|/,$mpfiresettings{'year'});
149
150 foreach (keys(%songs)){
151 @song = split(/\|/,$songs{$_});$song[6] =~ s/\W/ /g;
152
153 foreach (@select){
154 $_ =~ s/\W/ /g;
155 if ( $song[6] =~ /$_/ ){push(@temp,$song[0]);}
156 }
157 }
158
159 open(DATEI, ">${General::swroot}/mpfire/playlist.m3u") || die "Could not add playlist";
160 print DATEI @temp;
161 close(DATEI);
162 $message=system("/usr/local/bin/mpfirectrl playlist");
163 }
164 elsif ( $mpfiresettings{'ACTION'} eq "playgenre" )
165 {
166 my @temp = ""; my @song = ""; my @select = split(/\|/,$mpfiresettings{'genre'});
167
168 foreach (keys(%songs)){
169 @song = split(/\|/,$songs{$_});$song[7] =~ s/\W/ /g;
170
171 foreach (@select){
172 $_ =~ s/\W/ /g;
173 if ( $song[7] =~ /$_/ ){push(@temp,$song[0]);}
174 }
175 }
176
177 open(DATEI, ">${General::swroot}/mpfire/playlist.m3u") || die "Could not add playlist";
178 print DATEI @temp;
179 close(DATEI);
180 $message=system("/usr/local/bin/mpfirectrl playlist");
181 }
182 elsif ( $mpfiresettings{'SHOWLIST'} ){delete $mpfiresettings{'__CGI__'};delete $mpfiresettings{'x'};delete $mpfiresettings{'y'};delete $mpfiresettings{'PAGE'};&General::writehash("${General::swroot}/mpfire/settings", \%mpfiresettings);refreshpage();}
183
184 ############################################################################################################################
185 ################################### Aufbau der HTML Seite fr globale Sambaeinstellungen ####################################
186
187 $mpfiresettings{'MUSICDIR'} = "/";
188
189 &General::readhash("${General::swroot}/mpfire/settings", \%mpfiresettings);
190
191 ############################################################################################################################
192 ########################################### rekursiv nach neuen Mp3s Scannen ##############################################รค
193
194 if ( $message ne '0' ) { print "<font color='red'>An Error occured while launching the command</font>"; }
195 elsif ( $message ne "" && $message ne '0' ) { print "<font color='red'>$message</font>"; }
196
197 &Header::openbox('100%', 'center', $Lang::tr{'mpfire scanning'});
198
199 print <<END
200 <form method='post' action='$ENV{'SCRIPT_NAME'}'>
201 <table width='95%' cellspacing='0'>
202 <tr bgcolor='$color{'color20'}'><td colspan='2' align='left'><b>$Lang::tr{'Scan for Files'}</b></td></tr>
203 <tr><td align='left' width='40%'>$Lang::tr{'Scan from Directory'}</td><td align='left'><input type='text' name='MUSICDIR' value='$mpfiresettings{'MUSICDIR'}' size="30" /></td></tr>
204 <tr><td align='center' colspan='2'><input type='hidden' name='ACTION' value='scan' />
205 <input type='image' alt='$Lang::tr{'Scan for Files'}' title='$Lang::tr{'Scan for Files'}' src='/images/edit-find.png' /></td></tr>
206 </table>
207 </form>
208 END
209 ;
210 &Header::closebox();
211
212 my $song = qx(/usr/local/bin/mpfirectrl song);
213 if ( $song eq "" ){$song = "None";}
214
215 my $Volume = `/usr/local/bin/mpfirectrl volume`;
216 $Volume=~s/<break>/<br \/>/g;
217 my $stats = `mpc stats | tail -4`;
218 $stats=~s/\\/<br \/>/g
219
220 &Header::openbox('100%', 'center', $Lang::tr{'mpfire controls'});
221 print <<END
222
223 <table width='95%' cellspacing='0'>
224 <tr bgcolor='$color{'color20'}'> <td colspan='5' align='center'><marquee behavior='alternate' scrollamount='1' scrolldelay='5'><font color=red>-= $song =-</font></marquee></td></tr>
225 END
226 ;
227 my $countsongs=`/usr/local/bin/mpfirectrl stats`;
228 print "<tr><td colspan='5' align='center'><br/><b>".$countsongs."</b><br/><br/></td></tr>";
229 print <<END
230 <tr>
231 <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='x' /><input type='image' alt='$Lang::tr{'stop'}' title='$Lang::tr{'stop'}' src='/images/media-playback-stop.png' /></form></td>
232 <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='<<' /><input type='image' alt='$Lang::tr{'prev'}' title='$Lang::tr{'prev'}' src='/images/media-skip-backward.png' /></form></td>
233 <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='|>' /><input type='image' alt='$Lang::tr{'toggle'}' title='$Lang::tr{'toggle'}' src='/images/media-resume.png' /></form></td>
234 <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='playall' /><input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' /></form></td>
235 <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='>>' /><input type='image' alt='$Lang::tr{'next'}' title='$Lang::tr{'next'}' src='/images/media-skip-forward.png' /></form></td>
236 </tr>
237 END
238 ;
239 if ( $mpfiresettings{'SHOWLIST'} eq "on" ){print"<tr><td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='SHOWLIST' value='off' /><input type='image' alt='$Lang::tr{'off'}' title='$Lang::tr{'off'}' src='/images/audio-x-generic.png' /></form></td>";}
240 else { print"<tr><td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='SHOWLIST' value='on' /><input type='image' alt='$Lang::tr{'on'}' title='$Lang::tr{'on'}' src='/images/audio-x-generic-red.png' /></form></td>";}
241 print <<END
242 <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='--' /><input type='image' alt='$Lang::tr{'voldown10'}' title='$Lang::tr{'voldown10'}' src='/images/audio-volume-low-red.png' /></form></td>
243 <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='-' /><input type='image' alt='$Lang::tr{'voldown5'}' title='$Lang::tr{'voldown5'}' src='/images/audio-volume-low.png' /></form></td>
244 <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='+' /><input type='image' alt='$Lang::tr{'volup5'}' title='$Lang::tr{'volup5'}' src='/images/audio-volume-high.png' /></form></td>
245 <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='++' /><input type='image' alt='$Lang::tr{'volup10'}' title='$Lang::tr{'volup10'}' src='/images/audio-volume-high-red.png' /></form></td>
246 </tr>
247 <tr><td colspan='5' align='center'>$Volume</td></tr>
248 <tr><td colspan='5' align='center'><br />$stats</td></tr>
249 </table>
250 END
251 ;
252 &Header::closebox();
253
254 &Header::openbox('100%', 'center', $Lang::tr{'quick playlist'});
255
256 print "<table width='95%' cellspacing='0'>";
257 if ( $#songdb eq '-1' ) {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'artist'}</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'album'}</b></td></tr>";}
258 else {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'artist'} - ".$artistcount."</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'album'} - ".$albumcount."</b></td></tr>";}
259 print <<END
260 <tr><td align='center'>
261 <form method='post' action='$ENV{'SCRIPT_NAME'}'>
262 <select name='artist' size='8' multiple='multiple' style='width:300px;'>
263 END
264 ;
265 foreach (@artist){if ( $_ ne '' ){print "<option>$_</option>";}}
266 print <<END
267 </select><br/>
268 <input type='hidden' name='ACTION' value='playartist' />
269 <input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' />
270 </form></td>
271 <td align='center'>
272 <form method='post' action='$ENV{'SCRIPT_NAME'}'>
273 <select name='album' size='8' multiple='multiple' style='width:300px;'>
274 END
275 ;
276 foreach (@album){if ( $_ ne '' ){print "<option>$_</option>";}}
277 print <<END
278 </select><br/>
279 <input type='hidden' name='ACTION' value='playalbum' />
280 <input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' />
281 </form></td>
282 </tr>
283 END
284 ;
285 if ( $#songdb eq '-1' ) {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'year'}</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'genre'}</b></td></tr>";}
286 else {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'year'} - ".$yearcount."</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'genre'} - ".$genrecount."</b></td></tr>";}
287 print <<END
288 <tr><td align='center'>
289 <form method='post' action='$ENV{'SCRIPT_NAME'}'>
290 <select name='year' size='8' multiple='multiple' style='width:300px;'>
291 END
292 ;
293 foreach (@year){if ( $_ ne '' ){print "<option>$_</option>";}}
294 print <<END
295 </select><br/>
296 <input type='hidden' name='ACTION' value='playyear' />
297 <input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' />
298 </form></td>
299 <td align='center'>
300 <form method='post' action='$ENV{'SCRIPT_NAME'}'>
301 <select name='genre' size='8' multiple='multiple' style='width:300px;'>
302 END
303 ;
304 foreach (@genre){if ( $_ ne '' ){print "<option>$_</option>";}}
305 print <<END
306 </select><br/>
307 <input type='hidden' name='ACTION' value='playgenre' />
308 <input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' />
309 </form></td>
310 </tr></table>
311 END
312 ;
313 &Header::closebox();
314
315 if ( $mpfiresettings{'SHOWLIST'} eq "on" ){
316
317 &Header::openbox('100%', 'center', $Lang::tr{'mpfire songs'});
318 print <<END
319
320 <table width='95%' cellspacing='5'>
321 <tr bgcolor='$color{'color20'}'><td colspan='9' align='left'><b>$Lang::tr{'Existing Files'}</b></td></tr>
322 <tr><td align='center' colspan='9'><br/>$Lang::tr{'Pages'}<br/><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='submit' name='PAGE' value='all' /><br/>
323 END
324 ;
325 my $pages =(int(keys(%songs)/100)+1);
326 for(my $i = 1; $i <= $pages; $i++) {
327 print "<input type='submit' name='PAGE' value='$i' />";
328 if (!($i % 205)){print"<br/>";}
329 }
330 print <<END
331 </form></td></tr>
332 <tr><td align='center'></td>
333 <td align='center'><b>$Lang::tr{'artist'}<br/>$Lang::tr{'title'}</b></td>
334 <td align='center'><b>$Lang::tr{'number'}</b></td>
335 <td align='center'><b>$Lang::tr{'album'}</b></td>
336 <td align='center'><b>$Lang::tr{'year'}</b></td>
337 <td align='center'><b>$Lang::tr{'genre'}</b></td>
338 <td align='center'><b>$Lang::tr{'length'}</b></td></tr>
339 END
340 ;
341 my $lines=0;my $i=0;my $begin;my $end;
342 if ( $mpfiresettings{'PAGE'} eq 'all' ){
343 $begin=0;
344 $end=keys(%songs);
345 }
346 else{
347 $begin=(($mpfiresettings{'PAGE'}-1) * 100);
348 $end=(($mpfiresettings{'PAGE'} * 100)-1);
349 }
350 foreach (keys(%songs)){
351 if (!($i >= $begin && $i <= $end)){
352 # print $begin."->".$i."<-".$end."\n";
353 $i++;next;}
354 my @song = split(/\|/,$songs{$_});
355 my $minutes = sprintf ("%.0f", $song[1] / 60 );
356 my $seconds = $song[1] % 60;
357
358 if ($lines % 2) {print "<tr bgcolor='$color{'color20'}'>";} else {print "<tr bgcolor='$color{'color22'}'>";}
359 print <<END
360 <td align='center' style="white-space:nowrap;"><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='addtoplaylist' /><input type='hidden' name='FILE' value="$song[0]" /><input type='image' alt='$Lang::tr{'add'}' title='$Lang::tr{'add'}' src='/images/list-add.png' /></form><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='>' /><input type='hidden' name='FILE' value="$song[0]" /><input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' /></form></td>
361 <td align='center'>$song[2]<br/>$song[3]</td>
362 <td align='center'>$song[5]</td>
363 <td align='center'>$song[4]</td>
364 <td align='center'>$song[6]</td>
365 <td align='center'>$song[7]</td>
366 <td align='center'>$minutes:$seconds</td></tr>
367 END
368 ;
369 $lines++;
370 $i++;
371 }
372 print "</table>";
373 &Header::closebox();
374 }
375
376 &Header::openbox('100%', 'center', $Lang::tr{'mpfire playlist'});
377
378 my @playlist = `mpc playlist`;
379
380 print <<END
381 <table width='95%' cellspacing='0'>
382 <tr bgcolor='$color{'color20'}'><td colspan='2' align='left'><b>$Lang::tr{'current playlist'}</b></td></tr>
383 <tr><td align='center' colspan='2' ><textarea cols='100' rows='10' name='playlist' style='font-size:11px;width:650px;' readonly='readonly'>
384 END
385 ;
386 foreach (@playlist){print $_;}
387 print <<END
388 </textarea></td></tr><tr>
389 <td align='right'>
390 <form method='post' action='$ENV{'SCRIPT_NAME'}'>
391 <input type='hidden' name='ACTION' value='emptyplaylist' />
392 <input type='image' alt='$Lang::tr{'clear playlist'}' title='$Lang::tr{'clear playlist'}' src='/images/user-trash.png' />
393 </form>
394 </td>
395 <td align='left'>
396 <form method='post' action='$ENV{'SCRIPT_NAME'}'>
397 <input type='hidden' name='ACTION' value='playlist' />
398 <input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' />
399 </form>
400 </td></tr>
401 </table>
402 END
403 ;
404 &Header::closebox();
405
406 &Header::openbox('100%', 'center', $Lang::tr{'mpfire webradio'});
407
408 open(DATEI, "<${General::swroot}/mpfire/webradio") || die "Could not open playlist";
409 my @webradio = <DATEI>;
410 close(DATEI);
411
412 print <<END
413 <table width='95%' cellspacing='0'>
414 <tr bgcolor='$color{'color20'}'><td colspan='9' align='left'><b>$Lang::tr{'webradio playlist'}</b></td></tr>
415 <tr><td>Stream</td><td colspan='2'></td></tr>
416 END
417 ;
418 foreach (@webradio){
419 my @stream = split(/\|/,$_);
420 print <<END
421 <tr><td><a href="$stream[2]">$stream[1]</a></td>
422 <td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='FILE' value='$stream[0]' /><input type='hidden' name='ACTION' value='playweb' /><input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' /></form></td>
423 </tr>
424 END
425 ;
426 }
427 print "</table>";
428 &Header::closebox();
429
430 &Header::closebigbox();
431 &Header::closepage();