source: trunk/tv/playlist.php@ 438

Last change on this file since 438 was 438, checked in by chronos, 13 years ago
  • Přesunuto: Soubory s třídamy přesunuty do podsložky Common. Aktualizovány odkazy mezi soubory.
File size: 716 bytes
Line 
1<?php
2
3include_once('../Common/Global.php');
4
5Header("Content-Type: audio/mpegurl");
6Header("Content-Disposition: attachment; filename=playlist.m3u");
7
8
9echo('#EXTM3U'."\n");
10if(array_key_exists('id', $_GET))
11{
12 $DbResult = $Database->select('TV', '*', ' (`Stream` <> "") AND (`ShortName`="'.addslashes($_GET['id']).'") ');
13 if($DbResult->num_rows > 0)
14 {
15 $Channel = $DbResult->fetch_array();
16 echo('#EXTINF:0,'.$Channel['Name']."\n");
17 echo($Channel['Stream']."\n");
18 }
19} else
20{
21 $DbResult = $Database->select('TV', '*', ' (`Stream` <> "") ORDER BY `Name` ');
22 while($Channel = $DbResult->fetch_array())
23 {
24 echo('#EXTINF:0,'.$Channel['Name']."\n");
25 echo($Channel['Stream']."\n");
26 }
27}
28
29
30?>
Note: See TracBrowser for help on using the repository browser.