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

/tv/php/antena1_main.php

https://code.google.com/p/hdforall/
PHP | 366 lines | 338 code | 27 blank | 1 comment | 84 complexity | 69d5b6826d06824d13082c608a51da5c 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		idleImageWidthPC="8" idleImageHeightPC="10" idleImageXPC="5" idleImageYPC="5">
 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>Antena1 - Emisiuni</title>
264
265<item>
266<title>In gura presei cu Mircea Badea</title>
267<link><?php echo $host; ?>/scripts/tv/php/antena1_igp_emisiuni.php</link>
268<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1_igp.jpg" />
269<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1_igp.jpg</image>
270<location>http://ingurapresei.a1.ro/</location>
271<annotation>Despre politica, justitie, politia, pitipoance, Romania, viata de zi cu zi, ziare, autostrazi si multe multe altele. Cu comentariile lui amuzante sau amare, pornite de la subiectele abordate de presa in ziua respectiva, Mircea Badea spune ceea ce gandesc multi dintre romani, deranjand deseori mai-marii zilei si devenind una din vocile influente ale vietii publice.</annotation>
272</item>
273<!--
274<item>
275<title>X Factor</title>
276<link><?php echo $host; ?>/scripts/tv/php/antena1_xfactor.php</link>
277<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1_xfactor.jpg" />
278<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1_xfactor.jpg</image>
279<location>http://xfactor.a1.ro/</location>
280<annotation>X Factor, cel mai mare show care transforma oameni obisnuiti in superstaruri este la Antena 1. Stiri X Factor, video, galerie foto, cele mai tari faze din show.</annotation>
281</item>
282-->
283<item>
284<title>In puii mei cu Mihai Bendeac</title>
285<link><?php echo $host; ?>/scripts/tv/php/antena1_ipm_emisiuni.php</link>
286<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1_ipm.jpg" />
287<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1_ipm.jpg</image>
288<location>http://inpuiimei.a1.ro/</location>
289<annotation>In pui mei, monden,florin piersic,inmormantare,reporteri,declaratii,afirmatii...</annotation>
290</item>
291
292<item>
293<title>Neatza cu Razvan si Dani</title>
294<link><?php echo $host; ?>/scripts/tv/php/antena1_neatza_emisiuni.php</link>
295<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1_neatza.jpg" />
296<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1_neatza.jpg</image>
297<location>http://neatza.a1.ro/</location>
298<annotation>Neatza cu Razvan si Dani, Matinal Antena1</annotation>
299</item>
300
301<item>
302<title>Un show pacatos cu Dan Capatos</title>
303<link><?php echo $host; ?>/scripts/tv/php/antena1_pacatos_emisiuni.php</link>
304<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1_pacatos.jpg" />
305<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1_pacatos.jpg</image>
306<location>http://unshowpacatos.a1.ro/</location>
307<annotation>Campionul noptilor albe face din nou Un Show Pacatos. De luni pana joi, cu un sfert de ora inainte de miezul noptii.</annotation>
308</item>
309
310<item>
311<title>Acces direct cu Simona Gherghe</title>
312<link><?php echo $host; ?>/scripts/tv/php/antena1_acces_emisiuni.php</link>
313<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1_acces.jpg" />
314<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1_acces.jpg</image>
315<location>http://accesdirect.a1.ro/</location>
316<annotation>Acces direct cu Simona Gherghe, cel mai tare show de dupa-amiaza, Primii care au ajuns la adevaruri bine zavorate, Primii care ti-au oferit cu adevarat acces la toate chipurile vietii, Antena1</annotation>
317</item>
318
319<item>
320<title>Plasa de stele</title>
321<link><?php echo $host; ?>/scripts/tv/php/antena1_plasadestele.php</link>
322<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1.jpg" />
323<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1.jpg</image>
324<location>http://plasadestele.a1.ro/</location>
325<annotation>Astazi la emisiunea lui Dan Negru, Plasa de stele de pe Antena 1, prima victima a fost Daniela Crudu. Aceasta s-a manifestat ca la ea in Ferentari... Oare de ce fac oamenii astia farse politicienilor  ca sa ii vedem in starea lor naturala.</annotation>
326</item>
327
328<item>
329<title>Narcisa: Iubiri nelegiuite</title>
330<link><?php echo $host; ?>/scripts/tv/php/antena1_narcisa.php</link>
331<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1.jpg" />
332<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1.jpg</image>
333<location>http://iubirinelegiuite.a1.ro/</location>
334<annotation>Iubiri nelegiuite &#x2013; urmareste noul serial.  Este o poveste de iubire, lux, seductie, senzualitate, suspans si emotie intensa.</annotation>
335</item>
336
337
338<item>
339<title>Next top model</title>
340<link><?php echo $host; ?>/scripts/tv/php/antena1_nexttopmodel.php</link>
341<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1.jpg" />
342<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1.jpg</image>
343<location>http://nexttopmodel.a1.ro/</location>
344<annotation>Mii de fete au luptat pentru sansa vietii lor: un contract pe 4 ani, in valoare de 50.000 euro, cu cea mai mare agentie de modeling din Romania!</annotation>
345</item>
346
347<item>
348<title>Sa te prezint parintilor</title>
349<link><?php echo $host; ?>/scripts/tv/php/antena1_sa-te-prezint-parintilor.php</link>
350<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1.jpg" />
351<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1.jpg</image>
352<location>http://www.a1.ro/emisiuni-tv/sa-te-prezint-parintilor-100276.html</location>
353<annotation>"Sa te prezint parintilor" a intrat, odata cu luna decembrie in cel de-al treilea sezon. Asa cum v-a obisnuit pana acum, veti avea parte de povesti tumultoase, situatii de viata dintre cele mai surprinzatoare si personaje inedite.</annotation>
354</item>
355
356<item>
357<title>Te pui cu blondele</title>
358<link><?php echo $host; ?>/scripts/tv/php/antena1_tepuicublondele.php</link>
359<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1.jpg" />
360<image>/usr/local/etc/www/cgi-bin/scripts/tv/image/antena1.jpg</image>
361<location>http://tepuicublondele.a1.ro/</location>
362<annotation>Blondele au reusit sa-l invinga pe Prigoana si totodata au castigat si suma de bani pusa in joc.</annotation>
363</item>
364
365</channel>
366</rss>