PageRenderTime 20ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/tv/locale.php

https://code.google.com/p/hdforall/
PHP | 356 lines | 332 code | 23 blank | 1 comment | 84 complexity | b4b1cc0c160892f4ef968398ac4f3417 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=30
 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 posturi locale</title>
264
265<item>
266<title>tvt89</title>
267<link><?php echo $host; ?>/scripts/tv/locale/tvt89.php</link>
268<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/tvt89.jpg" />
269<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/tvt89.jpg</image>
270<location>http://tvt89.bridgeman.ro/index.php</location>
271<annotation>tvt89 a fost prima sta?ie de televiziune privat? din România ?i a r?mas în con?tiin?a publicului din vestul ??rii, drept primul canal tv prin care s-au manifestat liber zilele revolu?iei române.</annotation>
272
273</item>
274
275<item>
276<title>1 TV Bacau</title>
277<link><?php echo $host; ?>/scripts/tv/locale/1tvbacau.php</link>
278<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/1tvbacau.jpg" />
279<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/1tvbacau.jpg</image>
280<location>http://www.1tvbacau.ro/</location>
281<annotation>1 TV Bacau, post local de televiziune, prezint? evenimentele locale din ziua respectiv?</annotation>
282</item>
283<!--
284<item>
285<title>CTV media</title>
286<link><?php echo $host; ?>/scripts/tv/locale/ctvmedia.php</link>
287<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/ctvmedia.jpg" />
288<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/ctvmedia.jpg</image>
289<location>http://www.ctvmedia.ro/</location>
290<annotation>CTV media, cel mai nou post de televiziune constantean</annotation>
291</item>
292-->
293<item>
294<title>TVSat</title>
295<link><?php echo $host; ?>/scripts/tv/locale/tvsatrm.php</link>
296<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/tvsat.gif" />
297<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/tvsat.gif</image>
298<location>http://www.jurnal.tvsatrm.ro/</location>
299<annotation>Cele mai importante stiri din judetul Buzau. Jurnalul TVSat video, inregistrarile emisiunilor. TVSat Live!</annotation>
300</item>
301<!--
302<item>
303<title>Info TV</title>
304<link><?php echo $host; ?>/scripts/tv/locale/infotv.php</link>
305<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/infotv.gif" />
306<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/infotv.gif</image>
307<location>http://www.infotv.ro/</location>
308<annotation>Info TV va ofera zilnic cele mai noi informatii din actualitatea locala Aradeana, incadrul jurnalului infotv. Emisiuni de actualitate, politica, social, cultura, sport, divertisment. Va oferim si micile informatii: meteo, curs valutar, tranzactii bursiere, anunturi.</annotation>
309</item>
310-->
311<item>
312<title>RTS</title>
313<link><?php echo $host; ?>/scripts/php1/youtube_user.php?query=1,rtseverin</link>
314<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/televiziuneaseverin.png" />
315<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/televiziuneaseverin.png</image>
316<location>http://www.televiziuneaseverin.ro/rts4/</location>
317<annotation>RTS - Radioteleviziunea Severin</annotation>
318</item>
319
320<item>
321<title>Tele'M</title>
322<link><?php echo $host; ?>/scripts/tv/locale/telem_main.php</link>
323<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/telem.png" />
324<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/telem.png</image>
325<location>http://www.telem.ro/telem/</location>
326<annotation>Televiziunea Tele'M Ia?i - informa?ia de?teapt?</annotation>
327</item>
328
329<item>
330<title>BaricadaTV</title>
331<link><?php echo $host; ?>/scripts/clip/php/vimeo2.php?query=,4936621,BaricadaTV</link>
332<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/baricadatv.jpg" />
333<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/baricadatv.jpg</image>
334<location>http://vimeo.com/user4936621/videos</location>
335<annotation>BaricadaTV. ? revolutie in televiziune!</annotation>
336</item>
337
338<item>
339<title>eMaramures</title>
340<link><?php echo $host; ?>/scripts/tv/locale/emaramures.php</link>
341<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/emaramures.jpg" />
342<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/emaramures.jpg</image>
343<location>http://www.emaramures.ro</location>
344<annotation>STIRI MARAMURES ? ziar electronic actualizat non-stop cu stiri din Baia Mare, Sighet, Borsa, Targu Lapus...</annotation>
345</item>
346
347<item>
348<title>CNS Roman</title>
349<link><?php echo $host; ?>/scripts/php1/youtube_user.php?query=1,tvcns</link>
350<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/cns.jpg" />
351<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/cns.jpg</image>
352<location>http://www.cnstv.ro/</location>
353<annotation>Televiziunea Roman CNS</annotation>
354</item>
355</channel>
356</rss>