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