PageRenderTime 2ms CodeModel.GetById 47ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tv/tv_sport.php

https://code.google.com/p/hdforall/
PHP | 395 lines | 370 code | 24 blank | 1 comment | 84 complexity | 023e915a32d3f35d7d92743ce366de1e MD5 | raw file
  1#!/usr/local/bin/Resource/www/cgi-bin/php
  2<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
  3$host = "http://127.0.0.1/cgi-bin";
  4?>
  5<rss version="2.0">
  6<onEnter>
  7  startitem = "middle";
  8  setRefreshTime(1);
  9</onEnter>
 10
 11<onRefresh>
 12  setRefreshTime(-1);
 13  itemCount = getPageInfo("itemCount");
 14  middleItem = Integer(itemCount / 2);
 15  redrawDisplay();
 16</onRefresh>
 17
 18	<mediaDisplay name=photoView
 19	  centerXPC=7
 20		centerYPC=25
 21		centerHeightPC=40
 22columnCount=5
 23	  rowCount=1
 24		menuBorderColor="55:55:55"
 25		sideColorBottom="0:0:0"
 26		sideColorTop="0:0:0"
 27	  backgroundColor="0:0:0"
 28		imageBorderColor="0:0:0"
 29		itemBackgroundColor="0:0:0"
 30		itemGapXPC=0
 31		itemGapYPC=1
 32		sideTopHeightPC=22
 33		bottomYPC=85
 34		sliding=yes
 35		showHeader=no
 36		showDefaultInfo=no
 37		idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
 38
 39  	<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
 40		  <script>getPageInfo("pageTitle");</script>
 41		</text>
 42
 43  	<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
 44		  <script>sprintf("%s / ", focus-(-1))+itemCount;</script>
 45		</text>
 46
 47		<!--  lines="5" fontSize=15 -->
 48		<text align="center" redraw="yes"
 49  lines=3 fontSize=17
 50		      offsetXPC=5 offsetYPC=65 widthPC=90 heightPC=20
 51		      backgroundColor=0:0:0 foregroundColor=120:120:120>
 52			<script>print(annotation); annotation;</script>
 53		</text>
 54
 55		<text align="center" redraw="yes" offsetXPC=10 offsetYPC=85 widthPC=80 heightPC=10 fontSize=15 backgroundColor=0:0:0 foregroundColor=75:75:75>
 56			<script>print(location); location;</script>
 57		</text>
 58        <idleImage>image/POPUP_LOADING_01.png</idleImage>
 59        <idleImage>image/POPUP_LOADING_02.png</idleImage>
 60        <idleImage>image/POPUP_LOADING_03.png</idleImage>
 61        <idleImage>image/POPUP_LOADING_04.png</idleImage>
 62        <idleImage>image/POPUP_LOADING_05.png</idleImage>
 63        <idleImage>image/POPUP_LOADING_06.png</idleImage>
 64        <idleImage>image/POPUP_LOADING_07.png</idleImage>
 65        <idleImage>image/POPUP_LOADING_08.png</idleImage>
 66		<itemDisplay>
 67			<image>
 68				<script>
 69					idx = getQueryItemIndex();
 70					focus = getFocusItemIndex();
 71					if(focus==idx)
 72					{
 73					  location = getItemInfo(idx, "location");
 74					  annotation = getItemInfo(idx, "annotation");
 75					}
 76					getItemInfo(idx, "image");
 77				</script>
 78			 <offsetXPC>
 79			   <script>
 80					idx = getQueryItemIndex();
 81					focus = getFocusItemIndex();
 82			    if(focus==idx) 0; else 12;
 83			   </script>
 84			 </offsetXPC>
 85			 <offsetYPC>
 86			   <script>
 87					idx = getQueryItemIndex();
 88					focus = getFocusItemIndex();
 89			    if(focus==idx) 0; else 6;
 90			   </script>
 91			 </offsetYPC>
 92			 <widthPC>
 93			   <script>
 94					idx = getQueryItemIndex();
 95					focus = getFocusItemIndex();
 96			    if(focus==idx) 100; else 75;
 97			   </script>
 98			 </widthPC>
 99			 <heightPC>
100			   <script>
101					idx = getQueryItemIndex();
102					focus = getFocusItemIndex();
103			    if(focus==idx) 50; else 37;
104			   </script>
105			 </heightPC>
106			</image>
107
108			<text align="center" lines="4" offsetXPC=0 offsetYPC=55 widthPC=100 heightPC=45 backgroundColor=-1:-1:-1>
109				<script>
110					idx = getQueryItemIndex();
111					getItemInfo(idx, "title");
112				</script>
113				<fontSize>
114  				<script>
115  					idx = getQueryItemIndex();
116  					focus = getFocusItemIndex();
117  			    if(focus==idx) "18"; else "14";
118  				</script>
119				</fontSize>
120			  <foregroundColor>
121  				<script>
122  					idx = getQueryItemIndex();
123  					focus = getFocusItemIndex();
124  			    if(focus==idx) "255:255:255"; else "75:75:75";
125  				</script>
126			  </foregroundColor>
127			</text>
128
129		</itemDisplay>
130
131  <onUserInput>
132    <script>
133      ret = "false";
134      userInput = currentUserInput();
135      majorContext = getPageInfo("majorContext");
136
137      print("*** majorContext=",majorContext);
138      print("*** userInput=",userInput);
139
140      if(userInput == "one" || userInput == "1")
141      {
142        if(itemCount &gt;= 1)
143        {
144          setFocusItemIndex(0);
145          redrawDisplay();
146        }
147      }
148      else if(userInput == "two" || userInput == "2")
149      {
150        if(itemCount &gt;= 2)
151        {
152          setFocusItemIndex(1);
153          redrawDisplay();
154        }
155      }
156      else if(userInput == "three" || userInput == "3")
157      {
158        if(itemCount &gt;= 3)
159        {
160          setFocusItemIndex(2);
161          redrawDisplay();
162        }
163      }
164      else if(userInput == "four" || userInput == "4")
165      {
166        if(itemCount &gt;= 4)
167        {
168          setFocusItemIndex(3);
169          redrawDisplay();
170        }
171      }
172      else if(userInput == "five" || userInput == "5")
173      {
174        if(itemCount &gt;= 5)
175        {
176          setFocusItemIndex(4);
177          redrawDisplay();
178        }
179      }
180      else if(userInput == "six" || userInput == "6")
181      {
182        if(itemCount &gt;= 6)
183        {
184          setFocusItemIndex(5);
185          redrawDisplay();
186        }
187      }
188      else if(userInput == "seven" || userInput == "7")
189      {
190        if(itemCount &gt;= 7)
191        {
192          setFocusItemIndex(6);
193          redrawDisplay();
194        }
195      }
196      else if(userInput == "eight" || userInput == "8")
197      {
198        if(itemCount &gt;= 8)
199        {
200          setFocusItemIndex(7);
201          redrawDisplay();
202        }
203      }
204      else if(userInput == "nine" || userInput == "9")
205      {
206        if(itemCount &gt;= 9)
207        {
208          setFocusItemIndex(8);
209          redrawDisplay();
210        }
211      }
212      if(userInput == "zero" || userInput == "0")
213      {
214        if(itemCount &gt;= 10)
215        {
216          setFocusItemIndex(9);
217          redrawDisplay();
218        }
219      }
220      else if (userInput == "pagedown" || userInput == "pageup" || userInput == "PD" || userInput == "PG")
221      {
222        itemSize = getPageInfo("itemCount");
223        idx = Integer(getFocusItemIndex());
224        if (userInput == "pagedown")
225        {
226          idx -= -5;
227          if(idx &gt;= itemSize)
228            idx = itemSize-1;
229        }
230        else
231        {
232          idx -= 5;
233          if(idx &lt; 0)
234            idx = 0;
235        }
236        setFocusItemIndex(idx);
237        setItemFocus(idx);
238        redrawDisplay();
239        ret = "true";
240      }
241
242      ret;
243    </script>
244  </onUserInput>
245
246	</mediaDisplay>
247
248	<item_template>
249		<mediaDisplay  name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
250        <idleImage>image/POPUP_LOADING_01.png</idleImage>
251        <idleImage>image/POPUP_LOADING_02.png</idleImage>
252        <idleImage>image/POPUP_LOADING_03.png</idleImage>
253        <idleImage>image/POPUP_LOADING_04.png</idleImage>
254        <idleImage>image/POPUP_LOADING_05.png</idleImage>
255        <idleImage>image/POPUP_LOADING_06.png</idleImage>
256        <idleImage>image/POPUP_LOADING_07.png</idleImage>
257        <idleImage>image/POPUP_LOADING_08.png</idleImage>
258		</mediaDisplay>
259
260	</item_template>
261  <channel>
262
263    <title>Emisiuni Sportive</title>
264<!--
265<item>
266<title>Sport.ro - Inregistrari</title>
267<link><?php echo $host; ?>/scripts/tv/sport_ro.php</link>
268<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/sport_ro.gif" />
269<image></image>
270<location></location>
271<annotation></annotation>
272</item>
273-->
274<item>
275<title>Liga2.ro</title>
276<link><?php echo $host; ?>/scripts/tv/sport/liga2.php</link>
277<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/liga2.gif" />
278<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/liga2.gif</image>
279<location>http://www.liga2.ro/</location>
280<annotation>Stiri din sport, informatii de ultima ora, comentarii si opinii din sport, bloguri de sport, clasamente actualizate, livescore, liga a doua, liga3</annotation>
281</item>
282<!--
283<item>
284<title>sportgioco.it</title>
285<link><?php echo $host; ?>/scripts/tv/sport/sportgioco.php</link>
286<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/sportgioco.jpg" />
287<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/sportgioco.jpg</image>
288<location>http://www.sportgioco.it/calcio/highlights.php</location>
289<annotation>Notizie sportive, informazioni, highlights video e tabelle comparative delle squadre di calcio. Tutti i calendari dei campionati di calcio con le quote dei bookmakers ed aggiornamenti sugli incontri di calcio</annotation>
290</item>
291-->
292<item>
293<title>www.footytube.com</title>
294<link><?php echo $host; ?>/scripts/tv/sport/footytube.php?query=0</link>
295<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/sportgioco.jpg" />
296<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/footytube.png</image>
297<location>http://www.footytube.com</location>
298<annotation>footytube.com. Latest football highlights, clips and videos.</annotation>
299</item>
300
301<item>
302<title>soccerclips.net</title>
303<link><?php echo $host; ?>/scripts/tv/sport/soccerclips_main.php</link>
304<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/soccerclips.jpg" />
305<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/soccerclips.jpg</image>
306<location>http://www.soccerclips.net</location>
307<annotation>Football videos, football news, forum and more. SoccerClips is a community of football fans.</annotation>
308</item>
309
310<item>
311<title>DiGiSport</title>
312<link><?php echo $host; ?>/scripts/tv/sport/digi_main.php</link>
313<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/digi.png" />
314<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/digi.png</image>
315<location>http://www.digisport.ro/video</location>
316<annotation>Digi Sport</annotation>
317</item>
318
319<item>
320<title>GSPTV</title>
321<link><?php echo $host; ?>/scripts/tv/sport/gsp_main.php</link>
322<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/gsp.png" />
323<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/gsp.png</image>
324<location>http://tv.gsp.ro/</location>
325<annotation>GSPTV - Golurile si fazele video din Liga I:</annotation>
326</item>
327
328<!--
329<item>
330<title>DigiSport - youtube</title>
331<link><?php echo $host; ?>/scripts/php1/youtube_user.php?query=1,DigiSportTV</link>
332<image>image/youtube.gif</image>
333<location>http://www.youtube.com/user/DigiSportTV</location>
334<annotation>DigiSport TV pe youtube</annotation>
335<media:thumbnail url="image/youtube.gif" />
336</item>
337-->
338<!--
339<item>
340<title>Steaua Bucure?&#x;ti</title>
341<link><?php echo $host; ?>/scripts/tv/sport/steaua.php</link>
342<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/steaua.png" />
343<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/steaua.png</image>
344<location>http://www.steauafc.com/ro/arhiva_video/</location>
345<annotation>FCSB - site-ul oficial al FC Steaua Bucuresti.</annotation>
346</item>
347
348<item>
349<title>Dinamo Bucure?&#x;ti</title>
350<link><?php echo $host; ?>/scripts/tv/sport/dinamo.php</link>
351<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/dinamo.png" />
352<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/dinamo.png</image>
353<location>http://www.fcdinamo.ro/web/guest/galerii-video</location>
354<annotation>Site-ul oficial al echipei Dinamo Bucuresti. Include stiri, informatii, magazin virtual, fotografii, imnul Cainilor Rosii.</annotation>
355</item>
356-->
357<item>
358<title>CFR Cluj</title>
359<link><?php echo $host; ?>/scripts/tv/sport/cfr_cluj.php</link>
360<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/cfr_cluj.png" />
361<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/cfr_cluj.png</image>
362<location>http://www.cfr1907.ro/ro/multimedia/video/</location>
363<annotation>CFR Cluj este un club de fotbal din Romᭊa, í­?iintat í? anul 1907 í? orasul Cluj</annotation>
364</item>
365<!--
366<item>
367<title>sportitalia</title>
368<link><?php echo $host; ?>/scripts/tv/sport/sportitalia.php</link>
369<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/sportitalia.jpg" />
370<image></image>
371<location></location>
372<annotation></annotation>
373</item>
374-->
375<item>
376<title>Bing</title>
377<link><?php echo $host; ?>/scripts/tv/bing_sport.php</link>
378<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/bing.jpg" />
379<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/bing.jpg</image>
380<location>http://www.bing.com/</location>
381<annotation>FOX Soccer Channel, NBA, NHL, NFL, MLB, College Football, College Basketball</annotation>
382</item>
383
384<item>
385<title>NBA</title>
386<link><?php echo $host; ?>/scripts/php1/youtube_user.php?query=1,nba</link>
387<media:thumbnail url="image/youtube.gif" />
388<image>image/youtube.gif</image>
389<location>http://www.youtube.com/user/NBA</location>
390<annotation>Official channel of the NBA.</annotation>
391</item>
392
393
394</channel>
395</rss>