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

/trailer/trailer.php

https://code.google.com/p/hdforall/
PHP | 261 lines | 242 code | 18 blank | 1 comment | 21 complexity | 79605810df81be6dab4775ea81478d48 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  redrawDisplay();
 15</onRefresh>
 16
 17	<mediaDisplay name=photoView
 18	  centerXPC=7
 19		centerYPC=25
 20		centerHeightPC=40
 21columnCount=4
 22	  rowCount=1
 23		menuBorderColor="55:55:55"
 24		sideColorBottom="0:0:0"
 25		sideColorTop="0:0:0"
 26	  backgroundColor="0:0:0"
 27		imageBorderColor="0:0:0"
 28		itemBackgroundColor="0:0:0"
 29		itemGapXPC=0
 30		itemGapYPC=1
 31		sideTopHeightPC=22
 32		bottomYPC=85
 33		sliding=yes
 34		showHeader=no
 35		showDefaultInfo=no
 36		idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
 37
 38  	<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
 39		  <script>getPageInfo("pageTitle");</script>
 40		</text>
 41
 42  	<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
 43		  <script>sprintf("%s / ", focus-(-1))+itemCount;</script>
 44		</text>
 45
 46		<!--  lines="5" fontSize=15 -->
 47		<text align="center" redraw="yes"
 48  lines=3 fontSize=17
 49		      offsetXPC=5 offsetYPC=65 widthPC=90 heightPC=20
 50		      backgroundColor=0:0:0 foregroundColor=120:120:120>
 51			<script>print(annotation); annotation;</script>
 52		</text>
 53
 54		<text align="center" redraw="yes" offsetXPC=10 offsetYPC=85 widthPC=80 heightPC=10 fontSize=15 backgroundColor=0:0:0 foregroundColor=75:75:75>
 55			<script>print(location); location;</script>
 56		</text>
 57        <idleImage>image/POPUP_LOADING_01.png</idleImage>
 58        <idleImage>image/POPUP_LOADING_02.png</idleImage>
 59        <idleImage>image/POPUP_LOADING_03.png</idleImage>
 60        <idleImage>image/POPUP_LOADING_04.png</idleImage>
 61        <idleImage>image/POPUP_LOADING_05.png</idleImage>
 62        <idleImage>image/POPUP_LOADING_06.png</idleImage>
 63        <idleImage>image/POPUP_LOADING_07.png</idleImage>
 64        <idleImage>image/POPUP_LOADING_08.png</idleImage>
 65		<itemDisplay>
 66			<image>
 67				<script>
 68					idx = getQueryItemIndex();
 69					focus = getFocusItemIndex();
 70					if(focus==idx)
 71					{
 72					  location = getItemInfo(idx, "location");
 73					  annotation = getItemInfo(idx, "annotation");
 74					}
 75					getItemInfo(idx, "image");
 76				</script>
 77			 <offsetXPC>
 78			   <script>
 79					idx = getQueryItemIndex();
 80					focus = getFocusItemIndex();
 81			    if(focus==idx) 0; else 12;
 82			   </script>
 83			 </offsetXPC>
 84			 <offsetYPC>
 85			   <script>
 86					idx = getQueryItemIndex();
 87					focus = getFocusItemIndex();
 88			    if(focus==idx) 0; else 6;
 89			   </script>
 90			 </offsetYPC>
 91			 <widthPC>
 92			   <script>
 93					idx = getQueryItemIndex();
 94					focus = getFocusItemIndex();
 95			    if(focus==idx) 100; else 75;
 96			   </script>
 97			 </widthPC>
 98			 <heightPC>
 99			   <script>
100					idx = getQueryItemIndex();
101					focus = getFocusItemIndex();
102			    if(focus==idx) 50; else 37;
103			   </script>
104			 </heightPC>
105			</image>
106
107			<text align="center" lines="4" offsetXPC=0 offsetYPC=55 widthPC=100 heightPC=45 backgroundColor=-1:-1:-1>
108				<script>
109					idx = getQueryItemIndex();
110					getItemInfo(idx, "title");
111				</script>
112				<fontSize>
113  				<script>
114  					idx = getQueryItemIndex();
115  					focus = getFocusItemIndex();
116  			    if(focus==idx) "18"; else "14";
117  				</script>
118				</fontSize>
119			  <foregroundColor>
120  				<script>
121  					idx = getQueryItemIndex();
122  					focus = getFocusItemIndex();
123  			    if(focus==idx) "255:255:255"; else "75:75:75";
124  				</script>
125			  </foregroundColor>
126			</text>
127
128		</itemDisplay>
129
130<onUserInput>
131<script>
132ret = "false";
133userInput = currentUserInput();
134
135if (userInput == "pagedown" || userInput == "pageup")
136{
137  idx = Integer(getFocusItemIndex());
138  if (userInput == "pagedown")
139  {
140    idx -= -4;
141    if(idx &gt;= itemCount)
142      idx = itemCount-1;
143  }
144  else
145  {
146    idx -= 4;
147    if(idx &lt; 0)
148      idx = 0;
149  }
150
151  print("new idx: "+idx);
152  setFocusItemIndex(idx);
153	setItemFocus(0);
154  redrawDisplay();
155  "true";
156}
157ret;
158</script>
159</onUserInput>
160
161	</mediaDisplay>
162
163	<item_template>
164		<mediaDisplay  name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
165        <idleImage>image/POPUP_LOADING_01.png</idleImage>
166        <idleImage>image/POPUP_LOADING_02.png</idleImage>
167        <idleImage>image/POPUP_LOADING_03.png</idleImage>
168        <idleImage>image/POPUP_LOADING_04.png</idleImage>
169        <idleImage>image/POPUP_LOADING_05.png</idleImage>
170        <idleImage>image/POPUP_LOADING_06.png</idleImage>
171        <idleImage>image/POPUP_LOADING_07.png</idleImage>
172        <idleImage>image/POPUP_LOADING_08.png</idleImage>
173		</mediaDisplay>
174	</item_template>
175  <channel>
176
177    <title>Trailere filme ?&#x;i jocuri</title>
178
179<item>
180<title>www.cinemarx.ro</title>
181<link><?php echo $host; ?>/scripts/trailer/php/cinemarx.php</link>
182<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/trailer/image/cinemax.jpg"/>
183<image>/usr/local/etc/www/cgi-bin/scripts/trailer/image/cinemax.jpg</image>
184<location>http://www.cinemarx.ro/</location>
185<annotation>Filme noi, program cinema, trailere, filme 2011, filme 2010, box office, premiere cinema, filme, seriale tv - Radiografia cinematografiei - CinemaRx</annotation>
186<mediaDisplay name="threePartsView"/>
187</item>
188
189<item>
190<title>www.cinemagia.ro</title>
191<link><?php echo $host; ?>/scripts/trailer/php/cinemagia.php</link>
192<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/trailer/image/cinemagia.jpg"/>
193<image>/usr/local/etc/www/cgi-bin/scripts/trailer/image/cinemagia.jpg</image>
194<location>http://www.cinemagia.ro/</location>
195<annotation>Filme 2012, filme 2011, filme noi, programe TV, program cinema, premiere cinema, trailere filme</annotation>
196<mediaDisplay name="threePartsView"/>
197</item>
198<!--
199<item>
200<title>filme2012.ro</title>
201<link><?php echo $host; ?>/scripts/trailer/php/filme2012.php?query=1,</link>
202<media:thumbnail url="image/trailerb.png"/>
203<image>image/trailerb.png</image>
204<location>http://www.filme2012.ro/</location>
205<annotation>Filme 2012: Va punem la dispozitie interaga colectie de filme lansate in anul 2012.</annotation>
206<mediaDisplay name="threePartsView"/>
207</item>
208-->
209<item>
210<title>movienews.ro - trailers</title>
211<link>http://movienews.ro/trailers/feed/</link>
212<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/trailer/image/movienews.png" />
213<image>/usr/local/etc/www/cgi-bin/scripts/trailer/image/movienews.png</image>
214<location>http://movienews.ro</location>
215<annotation>Trailers MovieNews.ro | Sursa ta zilnica de stiri din lumea filmului!</annotation>
216<mediaDisplay name="threePartsView" 
217	itemBackgroundColor="0:0:0" 
218	backgroundColor="0:0:0" 
219	sideLeftWidthPC="0" 
220	itemImageXPC="5" 
221	itemXPC="20" 
222	itemYPC="20" 
223	itemWidthPC="65" 
224	capWidthPC="70" 
225	unFocusFontColor="101:101:101" 
226	focusFontColor="255:255:255" 
227	idleImageWidthPC="8"
228	idleImageHeightPC="10">
229        <idleImage>image/POPUP_LOADING_01.png</idleImage>
230        <idleImage>image/POPUP_LOADING_02.png</idleImage>
231        <idleImage>image/POPUP_LOADING_03.png</idleImage>
232        <idleImage>image/POPUP_LOADING_04.png</idleImage>
233        <idleImage>image/POPUP_LOADING_05.png</idleImage>
234        <idleImage>image/POPUP_LOADING_06.png</idleImage>
235        <idleImage>image/POPUP_LOADING_07.png</idleImage>
236        <idleImage>image/POPUP_LOADING_08.png</idleImage>
237		<backgroundDisplay>
238			<image  offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
239			image/mele/backgd.jpg
240			</image>  
241		</backgroundDisplay>
242		<image  offsetXPC=0 offsetYPC=2.8 widthPC=100 heightPC=15.6>
243		image/mele/rss_title.jpg
244		</image>
245		<text  offsetXPC=40 offsetYPC=8 widthPC=35 heightPC=10 fontSize=20 backgroundColor=-1:-1:-1 foregroundColor=255:255:255>
246		movienews.ro - trailers
247		</text>			
248</mediaDisplay>
249</item>
250
251<item>
252<title>Gametrailers</title>
253<link><?php echo $host; ?>/scripts/trailer/gt.php</link>
254<media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/trailer/image/gt.jpg" />
255<image>/usr/local/etc/www/cgi-bin/scripts/trailer/image/gt.jpg</image>
256<location>http://www.gametrailers.com/</location>
257<annotation>Watch new video game trailers, read reviews and previews of upcoming video games at GameTrailers.com. Video game demos, online gameplay, game cheats or view movies and media on the GameTrailers website.</annotation>
258</item>
259
260</channel>
261</rss>