PageRenderTime 21ms CodeModel.GetById 11ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/scripts/feeds/scripts_vb6/scripts/news/news.php

http://eboda-hd-for-all-500.googlecode.com/
PHP | 390 lines | 370 code | 20 blank | 0 comment | 84 complexity | 544d8e3eb22cca21b71182067d119910 MD5 | raw file
  1<?php echo "<?xml version='1.0' encoding='UTF8' ?>";
  2$host = "http://127.0.0.1:82";
  3?>
  4<rss version="2.0">
  5<onEnter>
  6  startitem = "middle";
  7  setRefreshTime(1);
  8</onEnter>
  9
 10<onRefresh>
 11  setRefreshTime(-1);
 12  itemCount = getPageInfo("itemCount");
 13  redrawDisplay();
 14</onRefresh>
 15
 16	<mediaDisplay name=photoView
 17	  centerXPC=7
 18		centerYPC=25
 19		centerHeightPC=40
 20columnCount=4
 21	  rowCount=1
 22		menuBorderColor="55:55:55"
 23		sideColorBottom="0:0:0"
 24		sideColorTop="0:0:0"
 25	  backgroundColor="0:0:0"
 26		imageBorderColor="0:0:0"
 27		itemBackgroundColor="0:0:0"
 28		itemGapXPC=0
 29		itemGapYPC=1
 30		sideTopHeightPC=22
 31		bottomYPC=85
 32		sliding=yes
 33		showHeader=no
 34		showDefaultInfo=no
 35		idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
 36
 37  	<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
 38		  <script>getPageInfo("pageTitle");</script>
 39		</text>
 40
 41  	<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
 42		  <script>sprintf("%s / ", focus-(-1))+itemCount;</script>
 43		</text>
 44
 45		<!--  lines="5" fontSize=15 -->
 46		<text align="center" redraw="yes"
 47  lines=3 fontSize=17
 48		      offsetXPC=5 offsetYPC=65 widthPC=90 heightPC=20
 49		      backgroundColor=0:0:0 foregroundColor=120:120:120>
 50			<script>print(annotation); annotation;</script>
 51		</text>
 52
 53		<text align="center" redraw="yes" offsetXPC=10 offsetYPC=85 widthPC=80 heightPC=10 fontSize=15 backgroundColor=0:0:0 foregroundColor=75:75:75>
 54			<script>print(location); location;</script>
 55		</text>
 56        <idleImage>image/POPUP_LOADING_01.png</idleImage>
 57        <idleImage>image/POPUP_LOADING_02.png</idleImage>
 58        <idleImage>image/POPUP_LOADING_03.png</idleImage>
 59        <idleImage>image/POPUP_LOADING_04.png</idleImage>
 60        <idleImage>image/POPUP_LOADING_05.png</idleImage>
 61        <idleImage>image/POPUP_LOADING_06.png</idleImage>
 62        <idleImage>image/POPUP_LOADING_07.png</idleImage>
 63        <idleImage>image/POPUP_LOADING_08.png</idleImage>
 64		<itemDisplay>
 65			<image>
 66				<script>
 67					idx = getQueryItemIndex();
 68					focus = getFocusItemIndex();
 69					if(focus==idx)
 70					{
 71					  location = getItemInfo(idx, "location");
 72					  annotation = getItemInfo(idx, "annotation");
 73					}
 74					getItemInfo(idx, "image");
 75				</script>
 76			 <offsetXPC>
 77			   <script>
 78					idx = getQueryItemIndex();
 79					focus = getFocusItemIndex();
 80			    if(focus==idx) 0; else 12;
 81			   </script>
 82			 </offsetXPC>
 83			 <offsetYPC>
 84			   <script>
 85					idx = getQueryItemIndex();
 86					focus = getFocusItemIndex();
 87			    if(focus==idx) 0; else 6;
 88			   </script>
 89			 </offsetYPC>
 90			 <widthPC>
 91			   <script>
 92					idx = getQueryItemIndex();
 93					focus = getFocusItemIndex();
 94			    if(focus==idx) 100; else 75;
 95			   </script>
 96			 </widthPC>
 97			 <heightPC>
 98			   <script>
 99					idx = getQueryItemIndex();
100					focus = getFocusItemIndex();
101			    if(focus==idx) 50; else 37;
102			   </script>
103			 </heightPC>
104			</image>
105
106			<text align="center" lines="4" offsetXPC=0 offsetYPC=55 widthPC=100 heightPC=45 backgroundColor=-1:-1:-1>
107				<script>
108					idx = getQueryItemIndex();
109					getItemInfo(idx, "title");
110				</script>
111				<fontSize>
112  				<script>
113  					idx = getQueryItemIndex();
114  					focus = getFocusItemIndex();
115  			    if(focus==idx) "18"; else "14";
116  				</script>
117				</fontSize>
118			  <foregroundColor>
119  				<script>
120  					idx = getQueryItemIndex();
121  					focus = getFocusItemIndex();
122  			    if(focus==idx) "255:255:255"; else "75:75:75";
123  				</script>
124			  </foregroundColor>
125			</text>
126
127		</itemDisplay>
128
129  <onUserInput>
130    <script>
131      ret = "false";
132      userInput = currentUserInput();
133      majorContext = getPageInfo("majorContext");
134
135      print("*** majorContext=",majorContext);
136      print("*** userInput=",userInput);
137
138      if(userInput == "one" || userInput == "1")
139      {
140        if(itemCount &gt;= 1)
141        {
142          setFocusItemIndex(0);
143          redrawDisplay();
144        }
145      }
146      else if(userInput == "two" || userInput == "2")
147      {
148        if(itemCount &gt;= 2)
149        {
150          setFocusItemIndex(1);
151          redrawDisplay();
152        }
153      }
154      else if(userInput == "three" || userInput == "3")
155      {
156        if(itemCount &gt;= 3)
157        {
158          setFocusItemIndex(2);
159          redrawDisplay();
160        }
161      }
162      else if(userInput == "four" || userInput == "4")
163      {
164        if(itemCount &gt;= 4)
165        {
166          setFocusItemIndex(3);
167          redrawDisplay();
168        }
169      }
170      else if(userInput == "five" || userInput == "5")
171      {
172        if(itemCount &gt;= 5)
173        {
174          setFocusItemIndex(4);
175          redrawDisplay();
176        }
177      }
178      else if(userInput == "six" || userInput == "6")
179      {
180        if(itemCount &gt;= 6)
181        {
182          setFocusItemIndex(5);
183          redrawDisplay();
184        }
185      }
186      else if(userInput == "seven" || userInput == "7")
187      {
188        if(itemCount &gt;= 7)
189        {
190          setFocusItemIndex(6);
191          redrawDisplay();
192        }
193      }
194      else if(userInput == "eight" || userInput == "8")
195      {
196        if(itemCount &gt;= 8)
197        {
198          setFocusItemIndex(7);
199          redrawDisplay();
200        }
201      }
202      else if(userInput == "nine" || userInput == "9")
203      {
204        if(itemCount &gt;= 9)
205        {
206          setFocusItemIndex(8);
207          redrawDisplay();
208        }
209      }
210      if(userInput == "zero" || userInput == "0")
211      {
212        if(itemCount &gt;= 10)
213        {
214          setFocusItemIndex(9);
215          redrawDisplay();
216        }
217      }
218      else if (userInput == "pagedown" || userInput == "pageup" || userInput == "PD" || userInput == "PG")
219      {
220        itemSize = getPageInfo("itemCount");
221        idx = Integer(getFocusItemIndex());
222        if (userInput == "pagedown")
223        {
224          idx -= -10;
225          if(idx &gt;= itemSize)
226            idx = itemSize-1;
227        }
228        else
229        {
230          idx -= 10;
231          if(idx &lt; 0)
232            idx = 0;
233        }
234        setFocusItemIndex(idx);
235        setItemFocus(idx);
236        redrawDisplay();
237        ret = "true";
238      }
239
240      ret;
241    </script>
242  </onUserInput>
243
244	</mediaDisplay>
245
246	<item_template>
247		<mediaDisplay  name="threePartsView" idleImageWidthPC="8" idleImageHeightPC="10">
248        <idleImage>image/POPUP_LOADING_01.png</idleImage>
249        <idleImage>image/POPUP_LOADING_02.png</idleImage>
250        <idleImage>image/POPUP_LOADING_03.png</idleImage>
251        <idleImage>image/POPUP_LOADING_04.png</idleImage>
252        <idleImage>image/POPUP_LOADING_05.png</idleImage>
253        <idleImage>image/POPUP_LOADING_06.png</idleImage>
254        <idleImage>image/POPUP_LOADING_07.png</idleImage>
255        <idleImage>image/POPUP_LOADING_08.png</idleImage>
256		</mediaDisplay>
257	</item_template>
258  <channel>
259
260    <title>Ştiri şi alte informaţii</title>
261
262<item>
263<title>TvBlog - Orarul serialelor</title>
264<link><?php echo $host; ?>/scripts/news/php/tvblog.php</link>
265<media:thumbnail url="/scripts/news/image/tvblog.jpg" />
266<image>/scripts/news/image/tvblog.jpg</image>
267<location>http://www.tvblog.ro</location>
268<annotation>TvBlog, blogul iubitorilor de seriale TV....</annotation>
269<mediaDisplay name="threePartsView"/>
270</item>
271
272<item>
273<title>Vremea in Romania</title>
274<link><?php echo $host; ?>/scripts/news/php/weather.php</link>
275<media:thumbnail url="image/mele/weather.png" />
276<image>image/mele/weather.png</image>
277<location>http://vremea.meteoromania.ro/</location>
278<annotation>Vezi care e starea vremii in localitatea ta.</annotation>
279</item>
280
281<item>
282<title>Curs Valutar</title>
283<link><?php echo $host; ?>/scripts/news/php/curs.php</link>
284<media:thumbnail url="/scripts/news/image/curs.png" />
285<image>/scripts/news/image/curs.png</image>
286<location>http://bnr.ro</location>
287<annotation>Cursul oficial pentru principalele valute.</annotation>
288<mediaDisplay name="threePartsView"/>
289</item>
290
291<item>
292<title>Program TV - port.ro</title>
293<link><?php echo $host; ?>/scripts/news/php/port.php</link>
294<media:thumbnail url="/scripts/news/image/program_tv.png" />
295<image>/scripts/news/image/program_tv.png</image>
296<location>http://port.ro</location>
297<annotation>Programul tv curent pentru mai mult de 100 de statii.</annotation>
298<mediaDisplay name="threePartsView"/>
299</item>
300<!--
301<item>
302<title>Program-Tv.ro :: Acum la televizor</title>
303<link>http://www.program-tv.ro/acum-la-tv.rss</link>
304<media:thumbnail url="image/tv_radio.png" />
305<image>/scripts/image/tv_radio.png</image>
306<location>http://www.program-tv.ro</location>
307<annotation>Program TV, Ghid Pentru Posturile Tv, Cinematografe Si Teatre. Ofera Detalii Pentru Fiecare Film, Teatru Sau Emisiune.</annotation>
308<mediaDisplay name="threePartsView" 
309	itemBackgroundColor="0:0:0" 
310	backgroundColor="0:0:0" 
311	sideLeftWidthPC="0" 
312	itemImageXPC="5" 
313	itemXPC="20" 
314	itemYPC="20" 
315	itemWidthPC="65" 
316	capWidthPC="70" 
317	unFocusFontColor="101:101:101" 
318	focusFontColor="255:255:255" 
319	idleImageXPC="45" 
320	idleImageYPC="42" 
321	idleImageWidthPC="20" 
322	idleImageHeightPC="26">
323	<idleImage>image/POPUP_LOADING_01.png</idleImage>
324	<idleImage>image/POPUP_LOADING_02.png</idleImage>
325	<idleImage>image/POPUP_LOADING_03.png</idleImage>
326	<idleImage>image/POPUP_LOADING_04.png</idleImage>
327	<idleImage>image/POPUP_LOADING_05.png</idleImage>
328	<idleImage>image/POPUP_LOADING_06.png</idleImage>
329	<idleImage>image/POPUP_LOADING_07.png</idleImage>
330	<idleImage>image/POPUP_LOADING_08.png</idleImage>
331		<backgroundDisplay>
332			<image  offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
333			image/mele/backgd.jpg
334			</image>  
335		</backgroundDisplay>
336		<image  offsetXPC=0 offsetYPC=2.8 widthPC=100 heightPC=15.6>
337		image/mele/rss_title.jpg
338		</image>
339		<text  offsetXPC=20 offsetYPC=8 widthPC=70 heightPC=10 fontSize=20 backgroundColor=-1:-1:-1 foregroundColor=255:255:255>
340		Program-Tv.ro :: Acum la televizor
341		</text>			
342</mediaDisplay>
343</item>
344
345<item>
346<title>Program-Tv.ro :: Urmeaza la televizor</title>
347<link>http://www.program-tv.ro/urmeaza-la-tv.rss</link>
348<media:thumbnail url="image/tv_radio.png" />
349<image>/scripts/image/tv_radio.png</image>
350<location>http://www.program-tv.ro</location>
351<annotation>Program TV, Ghid Pentru Posturile Tv, Cinematografe Si Teatre. Ofera Detalii Pentru Fiecare Film, Teatru Sau Emisiune.</annotation>
352<mediaDisplay name="threePartsView" 
353	itemBackgroundColor="0:0:0" 
354	backgroundColor="0:0:0" 
355	sideLeftWidthPC="0" 
356	itemImageXPC="5" 
357	itemXPC="20" 
358	itemYPC="20" 
359	itemWidthPC="65" 
360	capWidthPC="70" 
361	unFocusFontColor="101:101:101" 
362	focusFontColor="255:255:255" 
363	idleImageXPC="45" 
364	idleImageYPC="42" 
365	idleImageWidthPC="20" 
366	idleImageHeightPC="26">
367	<idleImage>image/POPUP_LOADING_01.png</idleImage>
368	<idleImage>image/POPUP_LOADING_02.png</idleImage>
369	<idleImage>image/POPUP_LOADING_03.png</idleImage>
370	<idleImage>image/POPUP_LOADING_04.png</idleImage>
371	<idleImage>image/POPUP_LOADING_05.png</idleImage>
372	<idleImage>image/POPUP_LOADING_06.png</idleImage>
373	<idleImage>image/POPUP_LOADING_07.png</idleImage>
374	<idleImage>image/POPUP_LOADING_08.png</idleImage>
375		<backgroundDisplay>
376			<image  offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
377			image/mele/backgd.jpg
378			</image>  
379		</backgroundDisplay>
380		<image  offsetXPC=0 offsetYPC=2.8 widthPC=100 heightPC=15.6>
381		image/mele/rss_title.jpg
382		</image>
383		<text  offsetXPC=20 offsetYPC=8 widthPC=70 heightPC=10 fontSize=20 backgroundColor=-1:-1:-1 foregroundColor=255:255:255>
384		Program-Tv.ro :: Urmeaza la televizor
385		</text>			
386</mediaDisplay>
387</item>
388-->
389</channel>
390</rss>