Changeset 738 for trunk/Modules/TV
- Timestamp:
- Apr 14, 2015, 10:20:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/TV/TV.php
r712 r738 8 8 var $ShortTitle = 'IPTV'; 9 9 var $ParentClass = 'PagePortal'; 10 10 11 11 function Show() 12 { 12 { 13 13 if(count($this->System->PathItems) > 1) 14 { 14 { 15 15 if($this->System->PathItems[1] == 'playlist.m3u') return($this->ShowPlayList()); 16 16 else return(PAGE_NOT_FOUND); 17 17 } else return($this->ShowChannelList()); 18 18 } 19 19 20 20 function ShowChannelList() 21 21 { 22 22 global $Channels; 23 23 24 24 $Output = 'Stažení přehrávače: <a href="http://www.videolan.org/vlc/">VLC Media Player</a><br/>'. 25 25 'Seznam všech kanálů do přehrávače: <a href="playlist.m3u">Playlist</a><br/>'. … … 28 28 '<div align="center"><strong>Výpis kanálů:</strong><br>'; 29 29 30 $Where = 30 $Where = 31 31 $DbResult = $this->Database->query('SELECT COUNT(*) FROM `TV` LEFT JOIN `TVGroup` ON `TVGroup`.`Id` = `TV`.`Category` '. 32 32 ' LEFT JOIN `Language` ON `Language`.`Id` = `TV`.`Language` WHERE (`TV`.`Stream` <> "") OR (`TV`.`StreamWeb` <> "")'); 33 33 $DbRow = $DbResult->fetch_row(); 34 $PageList = GetPageList($DbRow[0]); 34 $PageList = GetPageList($DbRow[0]); 35 35 36 36 $Output .= $PageList['Output']; 37 37 $Output .= '<table class="WideTable">'; 38 38 39 39 $TableColumns = array( 40 array('Name' => 'Name', 'Title' => 'Jméno stanice'), 41 array('Name' => 'Language', 'Title' => 'Jazyk'), 42 array('Name' => 'Category', 'Title' => 'Zaměření'), 43 array('Name' => 'SourceType', 'Title' => 'Zdroj'), 44 array('Name' => '', 'Title' => 'Ladění'), 40 array('Name' => 'Name', 'Title' => 'Jméno stanice'), 41 array('Name' => 'Language', 'Title' => 'Jazyk'), 42 array('Name' => 'Category', 'Title' => 'Zaměření'), 43 array('Name' => 'SourceType', 'Title' => 'Zdroj'), 44 array('Name' => '', 'Title' => 'Ladění'), 45 45 ); 46 46 $Order = GetOrderTableHeader($TableColumns, 'Name', 0); … … 51 51 52 52 $DbResult = $this->Database->query($Query); 53 while($Line = $DbResult->fetch_assoc()) 54 { 53 while($Line = $DbResult->fetch_assoc()) 54 { 55 55 if($Line['Stream'] <> '') $Line['Show'] = '<a href="playlist.m3u?id='.$Line['ShortName'].'">Naladit</a>'; 56 56 else 57 57 if($Line['StreamWeb'] <> '') $Line['Show'] = '<a href="'.$Line['StreamWeb'].'">Naladit</a>'; 58 58 else $Line['Show'] = ' '; 59 59 60 60 $Output .= '<tr><td><a href="'.$Line['Homepage'].'">'.$Line['Name'].'</a></td>'. 61 61 '<td>'.$Line['Language'].'</td>'. … … 66 66 $Output .= '</table>'; 67 67 $Output .= $PageList['Output']; 68 68 69 69 $Output .= '</div><br/>'; 70 70 71 71 $Output .= 'Další online TV na webu: <a href="http://spustit.cz">Spustit.cz</a><br/>'; 72 72 $Output .= 'Další online TV na webu: <a href="http://www.tvinfo.cz/live/televize/evropa/cz">TV info</a><br/>'; 73 73 74 74 return($Output); 75 75 } … … 78 78 { 79 79 $this->ClearPage = true; 80 80 81 81 Header("Content-Type: audio/mpegurl"); 82 82 Header("Content-Disposition: attachment; filename=playlist.m3u"); … … 101 101 } 102 102 } 103 } 103 } 104 104 } 105 105 … … 115 115 $this->Description = 'Television channels management'; 116 116 $this->Dependencies = array(); 117 } 117 } 118 118 119 119 function DoInstall() 120 120 { 121 121 } 122 122 123 123 function DoUninstall() 124 { 124 { 125 125 } 126 126 127 127 function DoStart() 128 128 { … … 155 155 )); 156 156 $this->System->FormManager->RegisterFormType('TTVGroup', array( 157 158 159 160 161 157 'Type' => 'Reference', 158 'Table' => 'TVGroup', 159 'Id' => 'Id', 160 'Name' => 'Name', 161 'Filter' => '1', 162 162 )); 163 163 $this->System->FormManager->RegisterFormType('TTVListCategory', array( 164 165 166 167 168 169 )); 170 } 171 164 'Type' => 'ManyToOne', 165 'Table' => 'TV', 166 'Id' => 'Id', 167 'Ref' => 'Category', 168 'Filter' => '1', 169 )); 170 } 171 172 172 function DoStop() 173 { 174 } 173 { 174 } 175 175 }
Note:
See TracChangeset
for help on using the changeset viewer.