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