PageRenderTime 56ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/tv/tv_radio.php

https://code.google.com/p/hdforall/
PHP | 326 lines | 304 code | 21 blank | 1 comment | 84 complexity | 43bd379ba424eb2119efa607aba661c7 MD5 | raw file
  1. #!/usr/local/bin/Resource/www/cgi-bin/php
  2. <?php echo "<?xml version='1.0' encoding='UTF-8' ?>";
  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=5
  17. centerYPC=5
  18. centerHeightPC=70
  19. columnCount=3
  20. rowCount=2
  21. menuBorderColor="55:55:55"
  22. sideColorBottom="0:0:0"
  23. sideColorTop="0:0:0"
  24. backgroundColor="0:0:0"
  25. imageBorderColor="10:105:150"
  26. imageBorderPC="0"
  27. itemBackgroundColor="0:0:0"
  28. itemGapXPC=5
  29. itemGapYPC=0
  30. sideTopHeightPC=0
  31. bottomYPC=100
  32. sliding=yes
  33. showHeader=no
  34. showDefaultInfo=no
  35. idleImageWidthPC="8" idleImageHeightPC="10" idleImageXPC="5" idleImageYPC="5">
  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. <text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
  41. <script>sprintf("%s / ", focus-(-1))+itemCount;</script>
  42. </text>
  43. -->
  44. <!-- lines="5" fontSize=15 -->
  45. <text align="center" redraw="yes"
  46. lines=3 fontSize=17
  47. offsetXPC=5 offsetYPC=80 widthPC=90 heightPC=15
  48. backgroundColor=0:0:0 foregroundColor=120:120:120>
  49. <script>print(annotation); annotation;</script>
  50. </text>
  51. <!--
  52. <text align="center" redraw="yes" offsetXPC=10 offsetYPC=85 widthPC=80 heightPC=10 fontSize=15 backgroundColor=0:0:0 foregroundColor=75:75:75>
  53. <script>print(location); location;</script>
  54. </text>
  55. -->
  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) 5; else 12;
  81. </script>
  82. </offsetXPC>
  83. <offsetYPC>
  84. <script>
  85. idx = getQueryItemIndex();
  86. focus = getFocusItemIndex();
  87. if(focus==idx) 4; else 6;
  88. </script>
  89. </offsetYPC>
  90. <widthPC>
  91. <script>
  92. idx = getQueryItemIndex();
  93. focus = getFocusItemIndex();
  94. if(focus==idx) 90; else 75;
  95. </script>
  96. </widthPC>
  97. <heightPC>
  98. <script>
  99. idx = getQueryItemIndex();
  100. focus = getFocusItemIndex();
  101. if(focus==idx) 70; else 60;
  102. </script>
  103. </heightPC>
  104. </image>
  105. <text align="center" lines="1" offsetXPC=0 offsetYPC=82 widthPC=100 heightPC=12 useBackgroundSurface=yes>
  106. <script>
  107. idx = getQueryItemIndex();
  108. getItemInfo(idx, "title");
  109. </script>
  110. <fontSize>
  111. <script>
  112. idx = getQueryItemIndex();
  113. focus = getFocusItemIndex();
  114. if(focus==idx) "18"; else "14";
  115. </script>
  116. </fontSize>
  117. <foregroundColor>
  118. <script>
  119. idx = getQueryItemIndex();
  120. focus = getFocusItemIndex();
  121. if(focus==idx) "255:255:255"; else "75:75:75";
  122. </script>
  123. </foregroundColor>
  124. </text>
  125. </itemDisplay>
  126. <onUserInput>
  127. <script>
  128. ret = "false";
  129. userInput = currentUserInput();
  130. majorContext = getPageInfo("majorContext");
  131. print("*** majorContext=",majorContext);
  132. print("*** userInput=",userInput);
  133. if(userInput == "one" || userInput == "1")
  134. {
  135. if(itemCount &gt;= 1)
  136. {
  137. setFocusItemIndex(0);
  138. redrawDisplay();
  139. }
  140. }
  141. else if(userInput == "two" || userInput == "2")
  142. {
  143. if(itemCount &gt;= 2)
  144. {
  145. setFocusItemIndex(1);
  146. redrawDisplay();
  147. }
  148. }
  149. else if(userInput == "three" || userInput == "3")
  150. {
  151. if(itemCount &gt;= 3)
  152. {
  153. setFocusItemIndex(2);
  154. redrawDisplay();
  155. }
  156. }
  157. else if(userInput == "four" || userInput == "4")
  158. {
  159. if(itemCount &gt;= 4)
  160. {
  161. setFocusItemIndex(3);
  162. redrawDisplay();
  163. }
  164. }
  165. else if(userInput == "five" || userInput == "5")
  166. {
  167. if(itemCount &gt;= 5)
  168. {
  169. setFocusItemIndex(4);
  170. redrawDisplay();
  171. }
  172. }
  173. else if(userInput == "six" || userInput == "6")
  174. {
  175. if(itemCount &gt;= 6)
  176. {
  177. setFocusItemIndex(5);
  178. redrawDisplay();
  179. }
  180. }
  181. else if(userInput == "seven" || userInput == "7")
  182. {
  183. if(itemCount &gt;= 7)
  184. {
  185. setFocusItemIndex(6);
  186. redrawDisplay();
  187. }
  188. }
  189. else if(userInput == "eight" || userInput == "8")
  190. {
  191. if(itemCount &gt;= 8)
  192. {
  193. setFocusItemIndex(7);
  194. redrawDisplay();
  195. }
  196. }
  197. else if(userInput == "nine" || userInput == "9")
  198. {
  199. if(itemCount &gt;= 9)
  200. {
  201. setFocusItemIndex(8);
  202. redrawDisplay();
  203. }
  204. }
  205. if(userInput == "zero" || userInput == "0")
  206. {
  207. if(itemCount &gt;= 10)
  208. {
  209. setFocusItemIndex(9);
  210. redrawDisplay();
  211. }
  212. }
  213. else if (userInput == "pagedown" || userInput == "pageup" || userInput == "PD" || userInput == "PG")
  214. {
  215. itemSize = getPageInfo("itemCount");
  216. idx = Integer(getFocusItemIndex());
  217. if (userInput == "pagedown")
  218. {
  219. idx -= -5;
  220. if(idx &gt;= itemSize)
  221. idx = itemSize-1;
  222. }
  223. else
  224. {
  225. idx -= 5;
  226. if(idx &lt; 0)
  227. idx = 0;
  228. }
  229. setFocusItemIndex(idx);
  230. setItemFocus(idx);
  231. redrawDisplay();
  232. ret = "true";
  233. }
  234. ret;
  235. </script>
  236. </onUserInput>
  237. </mediaDisplay>
  238. <item_template>
  239. <mediaDisplay name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
  240. <idleImage>image/POPUP_LOADING_01.png</idleImage>
  241. <idleImage>image/POPUP_LOADING_02.png</idleImage>
  242. <idleImage>image/POPUP_LOADING_03.png</idleImage>
  243. <idleImage>image/POPUP_LOADING_04.png</idleImage>
  244. <idleImage>image/POPUP_LOADING_05.png</idleImage>
  245. <idleImage>image/POPUP_LOADING_06.png</idleImage>
  246. <idleImage>image/POPUP_LOADING_07.png</idleImage>
  247. <idleImage>image/POPUP_LOADING_08.png</idleImage>
  248. </mediaDisplay>
  249. </item_template>
  250. <channel>
  251. <title>TV, Radio ?i emisiuni înregistrate</title>
  252. <item>
  253. <title>TV Live</title>
  254. <link><?php echo $host; ?>/scripts/tv/tv_live.php</link>
  255. <media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/tvlive.png" />
  256. <image>/usr/local/etc/www/cgi-bin/scripts/tv/image/tvlive.png</image>
  257. <location></location>
  258. <annotation>Posturi TV române?ti ?i interna?ionale. Canale de ?tiri, muzic?, sport, HD</annotation>
  259. </item>
  260. <item>
  261. <title>Radio Online </title>
  262. <link>/usr/local/etc/www/cgi-bin/scripts/tv/radio.rss</link>
  263. <media:thumbnail url="../etc/translate/rss/image/radio_online.jpg" />
  264. <image>../etc/translate/rss/image/radio_online.jpg</image>
  265. <location></location>
  266. <annotation>Posturi de radio</annotation>
  267. <mediaDisplay name="photoView" />
  268. </item>
  269. <item>
  270. <title>OneHD</title>
  271. <link><?php echo $host; ?>/scripts/tv/prahovahd.php</link>
  272. <media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/onehd.png" />
  273. <image>/usr/local/etc/www/cgi-bin/scripts/tv/image/onehd.png</image>
  274. <location>http://live.1hd.ro/</location>
  275. <annotation>One HD: concerte, divertisment, business, turism, experimente, disponibile în High Definition atât live cât ?i on-demand (VOD)</annotation>
  276. </item>
  277. <item>
  278. <title>Posturi na?ionale</title>
  279. <link><?php echo $host; ?>/scripts/tv/nationale.php</link>
  280. <media:thumbnail url="image/tv_radio.png" />
  281. <image>image/tv_radio.png</image>
  282. <location></location>
  283. <annotation>Înregistr?ri ale unor emisiuni TV emise de posturile na?ionale</annotation>
  284. <mediaDisplay name="photoView"/>
  285. </item>
  286. <item>
  287. <title>Posturi locale</title>
  288. <link><?php echo $host; ?>/scripts/tv/locale.php</link>
  289. <media:thumbnail url="image/tv_radio.png" />
  290. <image>image/tv_radio.png</image>
  291. <location></location>
  292. <annotation>?tiri ?i emisiuni înregistrate, difuzate de posturile TV locale</annotation>
  293. <mediaDisplay name="photoView"/>
  294. </item>
  295. <item>
  296. <title>Emisiuni Sportive</title>
  297. <link><?php echo $host; ?>/scripts/tv/tv_sport.php</link>
  298. <media:thumbnail url="/usr/local/etc/www/cgi-bin/scripts/tv/image/sport.jpg" />
  299. <image>/usr/local/etc/www/cgi-bin/scripts/tv/image/sport.jpg</image>
  300. <location></location>
  301. <annotation>Înregistr?ri evenimente sportive: fotbal ?i nu numai</annotation>
  302. <mediaDisplay name="photoView"/>
  303. </item>
  304. </channel>
  305. </rss>