Changeset 123 for trunk/Modules/ZdechovNET/UIPTVPage.pas
- Timestamp:
- Jul 24, 2020, 11:06:31 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/ZdechovNET/UIPTVPage.pas
r122 r123 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UModuleUser ;8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UModuleUser, Contnrs; 9 9 10 10 type 11 TChannelGroup = (cpBasic, cpStandard, cpMax); 12 TChannelGroups = set of TChannelGroup; 13 14 TChannel = class 15 Name: string; 16 Groups: TChannelGroups; 17 end; 18 19 { TChannels } 20 21 TChannels = class(TObjectList) 22 function AddNew(Name: string; Groups: TChannelGroups): TChannel; 23 function GetNamesByGroup(Group: TChannelGroup): string; 24 function GetCountByGroup(Group: TChannelGroup): Integer; 25 end; 11 26 12 27 { TIPTVPage } … … 18 33 public 19 34 ModuleUser: TModuleUser; 20 end; 35 end; 21 36 22 37 var … … 30 45 UCore, UHtmlClasses, UWebSession; 31 46 47 { TChannels } 48 49 function TChannels.AddNew(Name: string; Groups: TChannelGroups): TChannel; 50 begin 51 Result := TChannel.Create; 52 Result.Name := Name; 53 Result.Groups := Groups; 54 Add(Result); 55 end; 56 57 function TChannels.GetNamesByGroup(Group: TChannelGroup): string; 58 var 59 I: Integer; 60 begin 61 Result := ''; 62 for I := 0 to Count - 1 do begin 63 if Group in TChannel(Items[I]).Groups then begin 64 if Result <> '' then Result := Result + ', '; 65 Result := Result + TChannel(Items[I]).Name; 66 end; 67 end; 68 end; 69 70 function TChannels.GetCountByGroup(Group: TChannelGroup): Integer; 71 var 72 I: Integer; 73 begin 74 Result := 0; 75 for I := 0 to Count - 1 do begin 76 if Group in TChannel(Items[I]).Groups then begin 77 Inc(Result); 78 end; 79 end; 80 end; 81 32 82 { TIPTVPage } 33 83 34 84 procedure TIPTVPage.DataModuleProduce(HandlerData: THTTPHandlerData); 85 var 86 Channels: TChannels; 35 87 begin 36 88 with TWebSession(HandlerData) do begin 37 89 ModuleUser.LoadUserInfo; 38 90 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 91 Channels := TChannels.Create; 92 with Channels do begin 93 AddNew('1TV RUS', [cpBasic, cpStandard, cpMax]); 94 AddNew('360TuneBox', [cpMax]); 95 AddNew('AMC (American Movie Classics)', [cpStandard, cpMax]); 96 AddNew('AMC (American Movie Classics)(HD)', [cpStandard, cpMax]); 97 AddNew('Animal Planet', [cpStandard, cpMax]); 98 AddNew('Arena SPORT 1 HD', [cpStandard, cpMax]); 99 AddNew('Arena SPORT 2', [cpStandard, cpMax]); 100 AddNew('ATM Rozrywka', [cpBasic, cpStandard, cpMax]); 101 AddNew('ATV', [cpBasic, cpStandard, cpMax]); 102 AddNew('AXN', [cpStandard, cpMax]); 103 AddNew('AXN Black', [cpStandard, cpMax]); 104 AddNew('AXN White', [cpStandard, cpMax]); 105 AddNew('Baby TV', [cpStandard, cpMax]); 106 AddNew('Barrandov Krimi HD', [cpBasic, cpStandard, cpMax]); 107 AddNew('BBC World News', [cpMax]); 108 AddNew('Brazzers TV Europe', [cpStandard, cpMax]); 109 AddNew('CNN', [cpStandard, cpMax]); 110 AddNew('CNN Prima News', [cpBasic, cpStandard, cpMax]); 111 AddNew('CNN Prima News HD', [cpBasic, cpStandard, cpMax]); 112 AddNew('CS film/ CS Horor', [cpStandard, cpMax]); 113 AddNew('CS History', [cpBasic, cpStandard, cpMax]); 114 AddNew('CS Mystery', [cpStandard, cpMax]); 115 AddNew('CT :D / Art', [cpBasic, cpStandard, cpMax]); 116 AddNew('CT :D HD/ Art HD', [cpBasic, cpStandard, cpMax]); 117 AddNew('CT 1', [cpBasic, cpStandard, cpMax]); 118 AddNew('CT 1 HD', [cpBasic, cpStandard, cpMax]); 119 AddNew('CT 1 JM', [cpBasic, cpStandard, cpMax]); 120 AddNew('CT 1 JM HD', [cpBasic, cpStandard, cpMax]); 121 AddNew('CT 1 SM', [cpBasic, cpStandard, cpMax]); 122 AddNew('CT 1 SM HD', [cpBasic, cpStandard, cpMax]); 123 AddNew('CT 2', [cpBasic, cpStandard, cpMax]); 124 AddNew('CT 2 HD', [cpBasic, cpStandard, cpMax]); 125 AddNew('CT 3', [cpBasic, cpStandard, cpMax]); 126 AddNew('CT 3 HD', [cpBasic, cpStandard, cpMax]); 127 AddNew('CT 24', [cpBasic, cpStandard, cpMax]); 128 AddNew('CT 24 HD', [cpBasic, cpStandard, cpMax]); 129 AddNew('CT sport', [cpBasic, cpStandard, cpMax]); 130 AddNew('CT sport HD', [cpBasic, cpStandard, cpMax]); 131 AddNew('Deutsche Welle', [cpStandard, cpMax]); 132 AddNew('Discovery Channel', [cpStandard, cpMax]); 133 AddNew('Discovery Science', [cpMax]); 134 AddNew('Discovery Showcase HD', [cpMax]); 135 AddNew('Disney Channel', [cpStandard, cpMax]); 136 AddNew('Disney junior', [cpStandard, cpMax]); 137 AddNew('DocuBox HD', [cpMax]); 138 AddNew('DTX HD', [cpMax]); 139 AddNew('Dvojka', [cpBasic, cpStandard, cpMax]); 140 AddNew('Dvojka HD', [cpBasic, cpStandard, cpMax]); 141 AddNew('Erox HD', [cpMax]); 142 AddNew('Eroxxx HD', [cpMax]); 143 AddNew('Euronews', [cpMax]); 144 AddNew('Eurosport 2 HD', [cpStandard, cpMax]); 145 AddNew('Eurosport 1 HD', [cpStandard, cpMax]); 146 AddNew('Fashion TV', [cpStandard, cpMax]); 147 AddNew('FashionBox HD', [cpMax]); 148 AddNew('Fast&FunBOX HD', [cpMax]); 149 AddNew('FightBox HD', [cpMax]); 150 AddNew('Film Europe', [cpStandard, cpMax]); 151 AddNew('Film Europe HD', [cpStandard, cpMax]); 152 AddNew('Film Europe + HD', [cpMax]); 153 AddNew('Filmbox', [cpStandard, cpMax]); 154 AddNew('Filmbox Extra HD', [cpMax]); 155 AddNew('Filmbox Family', [cpMax]); 156 AddNew('Filmbox Plus', [cpMax]); 157 AddNew('Filmbox Premium', [cpMax]); 158 AddNew('Filmbox Premium HD', [cpMax]); 159 AddNew('Fishing & Hunting', [cpStandard, cpMax]); 160 AddNew('France 24', [cpMax]); 161 AddNew('Golf Channel HD', [cpMax]); 162 AddNew('Investigation discovery', [cpBasic, cpMax]); 163 AddNew('Jednotka', [cpBasic, cpStandard, cpMax]); 164 AddNew('Jednotka HD', [cpBasic, cpStandard, cpMax]); 165 AddNew('Jihočeská televize', [cpBasic, cpStandard, cpMax]); 166 AddNew('JOJ Family HD', [cpBasic, cpStandard, cpMax]); 167 AddNew('JOJ Cinema HD', [cpStandard, cpMax]); 168 AddNew('Kino Barrandov HD', [cpBasic, cpStandard, cpMax]); 169 AddNew('Markíza International HD', [cpStandard, cpMax]); 170 AddNew('Minimax', [cpStandard, cpMax]); 171 AddNew('Mňam TV', [cpBasic, cpStandard, cpMax]); 172 AddNew('MTV CZ', [cpStandard, cpMax]); 173 AddNew('NASA Tv HD', [cpBasic, cpStandard, cpMax]); 174 AddNew('National Geographic', [cpStandard, cpMax]); 175 AddNew('National Geographic HD', [cpMax]); 176 AddNew('National Geographic Wild', [cpStandard, cpMax]); 177 AddNew('Nickelodeon', [cpStandard, cpMax]); 178 AddNew('Nickelodeon Jr.', [cpStandard, cpMax]); 179 AddNew('Nova', [cpBasic, cpStandard, cpMax]); 180 AddNew('Nova 2', [cpBasic, cpStandard, cpMax]); 181 AddNew('Nova 2 HD', [cpBasic, cpStandard, cpMax]); 182 AddNew('Nova Action', [cpBasic, cpStandard, cpMax]); 183 AddNew('Nova Action HD', [cpBasic, cpStandard, cpMax]); 184 AddNew('Nova Cinema', [cpBasic, cpStandard, cpMax]); 185 AddNew('Nova Cinema HD', [cpBasic, cpStandard, cpMax]); 186 AddNew('Nova Gold', [cpBasic, cpStandard, cpMax]); 187 AddNew('Nova Gold HD', [cpBasic, cpStandard, cpMax]); 188 AddNew('Nova HD', [cpBasic, cpStandard, cpMax]); 189 AddNew('Nova Sport 1', [cpStandard, cpMax]); 190 AddNew('Nova Sport 1 HD', [cpMax]); 191 AddNew('Nova Sport 2 HD', [cpStandard, cpMax]); 192 AddNew('Óčko', [cpBasic, cpStandard, cpMax]); 193 AddNew('Óčko Star', [cpBasic, cpStandard, cpMax]); 194 AddNew('ORF1', [cpBasic, cpStandard, cpMax]); 195 AddNew('ORF2', [cpBasic, cpStandard, cpMax]); 196 AddNew('Polar', [cpBasic, cpStandard, cpMax]); 197 AddNew('Polsat', [cpBasic, cpStandard, cpMax]); 198 AddNew('Praha TV', [cpBasic, cpStandard, cpMax]); 199 AddNew('Prima', [cpBasic, cpStandard, cpMax]); 200 AddNew('Prima COOL', [cpBasic, cpStandard, cpMax]); 201 AddNew('Prima COOL HD', [cpBasic, cpStandard, cpMax]); 202 AddNew('Prima Comedy Central', [cpBasic, cpStandard, cpMax]); 203 AddNew('Prima HD', [cpBasic, cpStandard, cpMax]); 204 AddNew('Prima Krimi', [cpBasic, cpStandard, cpMax]); 205 AddNew('Prima Krimi HD', [cpBasic, cpStandard, cpMax]); 206 AddNew('Prima LOVE', [cpBasic, cpStandard, cpMax]); 207 AddNew('Prima LOVE HD', [cpBasic, cpStandard, cpMax]); 208 AddNew('Prima MAX', [cpBasic, cpStandard, cpMax]); 209 AddNew('Prima MAX HD', [cpBasic, cpStandard, cpMax]); 210 AddNew('Prima ZOOM', [cpBasic, cpStandard, cpMax]); 211 AddNew('Prima ZOOM HD', [cpBasic, cpStandard, cpMax]); 212 AddNew('Pro 7', [cpBasic, cpStandard, cpMax]); 213 AddNew('Reality Kings TV', [cpMax]); 214 AddNew('Regionální.tv', [cpBasic, cpStandard, cpMax]); 215 AddNew('Relax', [cpBasic, cpStandard, cpMax]); 216 AddNew('Retro Music Television', [cpBasic, cpStandard, cpMax]); 217 AddNew('Seznam.cz TV', [cpBasic, cpStandard, cpMax]); 218 AddNew('Seznam.cz TV HD', [cpBasic, cpStandard, cpMax]); 219 AddNew('Spektrum HD', [cpStandard, cpMax]); 220 AddNew('Sport 5', [cpMax]); 221 AddNew('Sport 1', [cpStandard, cpMax]); 222 AddNew('Sport 2 HD', [cpStandard, cpMax]); 223 AddNew('Super Polsat', [cpBasic, cpStandard, cpMax]); 224 AddNew('Šlágr TV', [cpBasic, cpStandard, cpMax]); 225 AddNew('TA3', [cpBasic, cpStandard, cpMax]); 226 AddNew('TLC', [cpStandard, cpMax]); 227 AddNew('Travel Channel HD', [cpStandard, cpMax]); 228 AddNew('Trojka', [cpBasic, cpStandard, cpMax]); 229 AddNew('Trojka HD', [cpBasic, cpStandard, cpMax]); 230 AddNew('TV Barrandov', [cpBasic, cpStandard, cpMax]); 231 AddNew('TV Barrandov HD', [cpBasic, cpStandard, cpMax]); 232 AddNew('TV Brno 1', [cpBasic, cpStandard, cpMax]); 233 AddNew('TV Noe', [cpBasic, cpStandard, cpMax]); 234 AddNew('TV Puls', [cpBasic, cpStandard, cpMax]); 235 AddNew('TV Puls 2', [cpBasic, cpStandard, cpMax]); 236 AddNew('TV Rebel', [cpBasic, cpStandard, cpMax]); 237 AddNew('TV Slovácko', [cpBasic, cpStandard, cpMax]); 238 AddNew('TV5Monde', [cpMax]); 239 AddNew('TVN', [cpBasic, cpStandard, cpMax]); 240 AddNew('TVN 7', [cpBasic, cpStandard, cpMax]); 241 AddNew('TVP Historia', [cpBasic, cpStandard, cpMax]); 242 AddNew('TVP Info', [cpBasic, cpStandard, cpMax]); 243 AddNew('TVP 3 Katowice', [cpBasic, cpStandard, cpMax]); 244 AddNew('TVP Sport', [cpBasic, cpStandard, cpMax]); 245 AddNew('TVP1 HD', [cpBasic, cpStandard, cpMax]); 246 AddNew('TVP2 HD', [cpBasic, cpStandard, cpMax]); 247 AddNew('V1', [cpBasic, cpStandard, cpMax]); 248 AddNew('ZDF', [cpBasic, cpStandard, cpMax]); 249 end; 250 39 251 Text := Text + '<h3>Výhody</h3>' + 40 252 '<ul><li>velké množství televizních kanálů za nízkou cenu</li>' + … … 43 255 '<li>možnost pozastavení přehrávání vysílání</li>' + 44 256 '<li>možnost záznamu pořadů</li>' + 45 '<li>televizi lze sledovat přes set-top box, tablet, smartphone nebo internetový prohlížeč</li>' +257 '<li>televizi lze sledovat přes set-top box, Smart TV Samsung a Android, tablet, smartphone nebo internetový prohlížeč</li>' + 46 258 '<li>lze spárovat až 4 zařízení na jeden účet</li>' + 47 259 '<li>vyzkoušení na měsíc zdarma</li>' + 48 '<li>převzaté vysílání zajišťuje společnost 4NET.TV services s.r.o.</li>' +260 '<li>převzaté vysílání zajišťuje společnost <a href="www.4net.tv">4NET.TV services s.r.o.</a></li>' + 49 261 '<li>pro provoz služby stačí i nejnižší internetový tarif Internet 200k/140M za 190 Kč/měsíc</li>' + 50 262 '</ul><br/>' + 51 263 52 264 '<h3>Základní balíčky</h3>' + 53 '<table class="WideTable"><tr><th>Balíček</th><th>Počet kanálů</th><th>Cena [Kč/měsíc]</th></tr>' + 54 '<tr><td>Basic</td><td>83</td><td>82</td></tr>' + 55 '<tr><td>Basic + tématika</td><td>104</td><td>91</td></tr>' + 56 '<tr><td>Standard</td><td>118</td><td>355</td></tr>' + 57 '<tr><td>Max</td><td>136</td><td>694</td></tr>' + 58 '</table>Balíček Basic obsahuje stejné kanály jako Basic + tématika. Pro možnost volby tématických balíčků je ale nutné mít balíček Basic + tématika.<br/>' + 265 '<table class="WideTable"><tr><th>Balíček</th><th>Cena [Kč/měsíc]</th><th>Počet kanálů</th><th>Kanály</th></tr>' + 266 '<tr><td>Basic</td><td>95</td><td>' + IntToStr(Channels.GetCountByGroup(cpBasic)) + '</td><td>' + Channels.GetNamesByGroup(cpBasic) + '</td></tr>' + 267 '<tr><td>Basic + tématika</td><td>103</td><td>' + IntToStr(Channels.GetCountByGroup(cpBasic)) + '</td><td>' + Channels.GetNamesByGroup(cpBasic) + '</td></tr>' + 268 '<tr><td>Standard</td><td>367</td><td>' + IntToStr(Channels.GetCountByGroup(cpStandard)) + '</td><td>' + Channels.GetNamesByGroup(cpStandard) + '</td></tr>' + 269 '<tr><td>Max</td><td>530</td><td>' + IntToStr(Channels.GetCountByGroup(cpMax)) + '</td><td>' + Channels.GetNamesByGroup(cpMax) + '</td></tr>' + 270 '</table>' + 271 'Balíček Basic obsahuje stejné kanály jako Basic + tématika. Pro možnost volby tématických balíčků je ale nutné mít balíček Basic + tématika.<br/>' + 59 272 60 273 '<h3>Tématické balíčky</h3>' + 61 '<table class="WideTable"><tr><th>Balíček</th><th>Kanály</th><th>Cena [Kč/měsíc]</th></tr>' + 62 '<tr><td>HBO 1</td><td>HBO HD, HBO Comedy HD, HBO2 HD</td><td>182</td></tr>' + 63 '<tr><td>HBO 2</td><td>Cinemax HD, Cinamex2 HD, HBO HD, HBO 2 HD, HBO Comedy HD</td><td>241</td></tr>' + 64 '<tr><td>Film</td><td>Film Europe, Film Europe HD, Film+, AXN, AXN White, AXN Black, Filmbox, JOJ Cinema HD</td><td>49</td></tr>' + 65 '<tr><td>Superbox</td><td>Erox HD, Eroxxx HD, FashionBox HD, FigthtBox HD, Filmbox Premium, Filmbox Family, Filmbox Extra HD, Filmbox Plus</td><td>146</td></tr>' + 66 '<tr><td>Sport</td><td>Eurosport HD, Eurosport 2 HD, Nova Sport 1, Sport 5, Nova Sport 1 HD, Nova Sport 2 HD, ArenaSPORT 1, ArenaSPORT 2 HD, Golf Channel</td><td>67</td></tr>' + 67 '<tr><td>Dětské</td><td>Disney Channel, Disney Channel junior, Nickelodeon, Nickelodeon Junior, Baby TV</td><td>37</td></tr>' + 68 '<tr><td>Česky</td><td>CS Film/CS mini, Horor film, DokuCS, Kino CS, Muzika CS</td><td>43</td></tr>' + 69 '<tr><td>Láska</td><td>Brazzers TV Europe. Erox HD, Eroxxx HD, Playboy TV</td><td>49</td></tr>' + 70 '<tr><td>Zpravodaj</td><td>BBC World, Deutsche Welle, EuroNews, Fashion TV, France 24, TV5Monde</td><td>15</td></tr>' + 71 '<tr><td>Dokument</td><td>Discovery, National Geographic, National Geographic Wild, Animal Planet, TLC, Fishing & Hunting, Discovery HD, IDX, Discovery Science, DTX, National Geograpic HD, Travel Channel</td><td>73</td></tr>' + 72 '</table>Celková cena vznikne jako součet zvolených tématických balíčků a zákaldního balíčku Basic + tématika.<br/>' + 274 '<table class="WideTable"><tr><th>Balíček</th><th>Cena [Kč/měsíc]</th><th>Počet kanálů</th><th>Kanály</th></tr>' + 275 '<tr><td>Film</td><td>49</td><td>7</td><td>AXN, AXN Black, AXN White, Film Europe, Film Europe HD, Filmbox, JOJ Cinema HD</td></tr>' + 276 '<tr><td>Superbox</td><td>146</td><td>9</td><td>Erox HD, Eroxxx HD, FashionBox HD, FigthtBox HD, Filbox, Filmbox Premium, Filmbox Family, Filmbox Extra HD, Filmbox Plus</td></tr>' + 277 '<tr><td>Sport</td><td>67</td><td>9</td><td>ArenaSPORT 1 HD, ArenaSPORT 2, Eurosport 1 HD, Eurosport 2 HD, Golf Channel HD, Nova Sport 1, Nova Sport 1 HD, Nova Sport 2 HD, Sport 5</td></tr>' + 278 '<tr><td>Dětské</td><td>37</td><td>5</td><td>Baby TV, Disney Channel, Disney junior, Nickelodeon, Nickelodeon Jr.</td></tr>' + 279 '<tr><td>Česky</td><td>43</td><<td>4</td><td>CS Film/CS Horor, CS History, CS Mystery, Film Europe + HD</td></tr>' + 280 '<tr><td>Láska</td><td>49</td><td>4</td><td>Brazzers TV Europe. Erox HD, Eroxxx HD, Playboy TV</td></tr>' + 281 '<tr><td>Zpravodaj</td><td>15</td><td>6</td><td>BBC World New, Deutsche Welle, EuroNews, Fashion TV, France 24, TV5Monde</td></tr>' + 282 '<tr><td>Dokument</td><td>103</td><td>12</td><td>Animal Planet, Discovery channel, Discovery Science, Discovery Showcase HD, DTX HD, Fishing & Hunting, Investigation discovery, National Geographic, National Geographic HD, National Geographic Wild, TLC, Travel Channel HD</td></tr>' + 283 '</table>' + 284 'Celková cena vznikne jako součet zvolených tématických balíčků a základního balíčku Basic + tématika.<br/>' + 73 285 74 286 //'<h3>Programová nabídka</h3>' + … … 83 295 'Návod ke služby 4network.tv: <a href="/docs/navod_4network.tv.pdf">navod_4network.tv.pdf</a><br/>' + 84 296 '<br/>' + 85 'Ceny uvedeny včetně DPH platné od 1.6.2018.'; 297 'Ceny uvedeny včetně DPH platné od 24.7.2020.'; 298 Channels.Free; 86 299 end; 87 300 GeneratePage(Self);
Note:
See TracChangeset
for help on using the changeset viewer.