PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/filme/peteava_user.php

https://code.google.com/p/hdforall/
PHP | 244 lines | 223 code | 20 blank | 1 comment | 21 complexity | d3c25e9232a6620621dc0f0302736595 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</onRefresh>
 15
 16<mediaDisplay name="threePartsView"
 17	sideLeftWidthPC="0"
 18	sideRightWidthPC="0"
 19	
 20	headerImageWidthPC="0"
 21	selectMenuOnRight="no"
 22	autoSelectMenu="no"
 23	autoSelectItem="no"
 24	itemImageHeightPC="0"
 25	itemImageWidthPC="0"
 26	itemXPC="8"
 27	itemYPC="25"
 28	itemWidthPC="50"
 29	itemHeightPC="8"
 30	capXPC="8"
 31	capYPC="25"
 32	capWidthPC="50"
 33	capHeightPC="64"
 34	itemBackgroundColor="0:0:0"
 35	itemPerPage="8"
 36  itemGap="0"
 37	bottomYPC="90"
 38	backgroundColor="0:0:0"
 39	showHeader="no"
 40	showDefaultInfo="no"
 41	imageFocus=""
 42	sliding="no"
 43	idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10"
 44>
 45		
 46  	<text align="center" offsetXPC="0" offsetYPC="0" widthPC="100" heightPC="20" fontSize="30" backgroundColor="10:105:150" foregroundColor="100:200:255">
 47		  <script>getPageInfo("pageTitle");</script>
 48		</text>
 49
 50  	<text redraw="yes" offsetXPC="85" offsetYPC="12" widthPC="10" heightPC="6" fontSize="20" backgroundColor="10:105:150" foregroundColor="60:160:205">
 51		  <script>sprintf("%s / ", focus-(-1))+itemCount;</script>
 52		</text>
 53  	<text  redraw="yes" align="center" offsetXPC="0" offsetYPC="90" widthPC="100" heightPC="8" fontSize="17" backgroundColor="10:105:150" foregroundColor="100:200:255">
 54		  <script>print(annotation); annotation;</script>
 55		</text>
 56		<image  redraw="yes" offsetXPC=60 offsetYPC=35 widthPC=30 heightPC=30>
 57		image/movies.png
 58		</image>
 59        <idleImage>image/POPUP_LOADING_01.png</idleImage>
 60        <idleImage>image/POPUP_LOADING_02.png</idleImage>
 61        <idleImage>image/POPUP_LOADING_03.png</idleImage>
 62        <idleImage>image/POPUP_LOADING_04.png</idleImage>
 63        <idleImage>image/POPUP_LOADING_05.png</idleImage>
 64        <idleImage>image/POPUP_LOADING_06.png</idleImage>
 65        <idleImage>image/POPUP_LOADING_07.png</idleImage>
 66        <idleImage>image/POPUP_LOADING_08.png</idleImage>
 67
 68		<itemDisplay>
 69			<text align="left" lines="1" offsetXPC=0 offsetYPC=0 widthPC=100 heightPC=100>
 70				<script>
 71					idx = getQueryItemIndex();
 72					focus = getFocusItemIndex();
 73					if(focus==idx) 
 74					{
 75					  location = getItemInfo(idx, "location");
 76					  annotation = getItemInfo(idx, "annotation");
 77					}
 78					getItemInfo(idx, "title");
 79				</script>
 80				<fontSize>
 81  				<script>
 82  					idx = getQueryItemIndex();
 83  					focus = getFocusItemIndex();
 84  			    if(focus==idx) "16"; else "14";
 85  				</script>
 86				</fontSize>
 87			  <backgroundColor>
 88  				<script>
 89  					idx = getQueryItemIndex();
 90  					focus = getFocusItemIndex();
 91  			    if(focus==idx) "10:80:120"; else "-1:-1:-1";
 92  				</script>
 93			  </backgroundColor>
 94			  <foregroundColor>
 95  				<script>
 96  					idx = getQueryItemIndex();
 97  					focus = getFocusItemIndex();
 98  			    if(focus==idx) "255:255:255"; else "140:140:140";
 99  				</script>
100			  </foregroundColor>
101			</text>
102
103		</itemDisplay>
104		
105<onUserInput>
106<script>
107ret = "false";
108userInput = currentUserInput();
109
110if (userInput == "pagedown" || userInput == "pageup")
111{
112  idx = Integer(getFocusItemIndex());
113  if (userInput == "pagedown")
114  {
115    idx -= -8;
116    if(idx &gt;= itemCount)
117      idx = itemCount-1;
118  }
119  else
120  {
121    idx -= 8;
122    if(idx &lt; 0)
123      idx = 0;
124  }
125
126  print("new idx: "+idx);
127  setFocusItemIndex(idx);
128	setItemFocus(0);
129  redrawDisplay();
130  "true";
131}
132ret;
133</script>
134</onUserInput>
135		
136	</mediaDisplay>
137	
138	<item_template>
139		<mediaDisplay  name="threePartsView" idleImageXPC="5" idleImageYPC="5" idleImageWidthPC="8" idleImageHeightPC="10">
140        <idleImage>image/POPUP_LOADING_01.png</idleImage>
141        <idleImage>image/POPUP_LOADING_02.png</idleImage>
142        <idleImage>image/POPUP_LOADING_03.png</idleImage>
143        <idleImage>image/POPUP_LOADING_04.png</idleImage>
144        <idleImage>image/POPUP_LOADING_05.png</idleImage>
145        <idleImage>image/POPUP_LOADING_06.png</idleImage>
146        <idleImage>image/POPUP_LOADING_07.png</idleImage>
147        <idleImage>image/POPUP_LOADING_08.png</idleImage>
148		</mediaDisplay>
149
150	</item_template>
151<destination>
152<link>http://127.0.0.1/cgi-bin/scripts/filme/peteava_user.php</link>
153</destination>
154<channel>
155	<title>pe?eav? - filme utilizator</title>
156	<menu>main menu</menu>
157
158<item>
159<title>Adaug? un utilizator</title>
160<onClick>
161<script>
162keyword = getInput();
163if (keyword != null)
164{
165url="http://127.0.0.1/cgi-bin/scripts/filme/php/peteava_user1.php?mod=add," + keyword;
166dummy=getUrl(url);
167jumptolink("destination");
168}
169</script>
170</onClick>
171</item>
172<item>
173<title>?terge un utilizator (din lista nou?)</title>
174<onClick>
175<script>
176keyword = getInput();
177if (keyword != null)
178{
179url="http://127.0.0.1/cgi-bin/scripts/filme/php/peteava_user1.php?mod=delete," + keyword;
180dummy=getUrl(url);
181jumptolink("destination");
182}
183</script>
184</onClick>
185</item>
186
187    <item>
188    <title>User - moviesample</title>
189	<link><?php echo $host; ?>/scripts/filme/php/peteava_user.php?query=1,moviesample</link>
190	<annotation>User movies</annotation>
191	</item>
192	<item>
193	<title>User - dumitrescu85</title>
194	<link><?php echo $host; ?>/scripts/filme/php/peteava_user.php?query=1,dumitrescu85</link>
195	<annotation>User movies</annotation>
196	</item>
197	
198	<item>
199	<title>User - peteavavip</title>
200	<link><?php echo $host; ?>/scripts/filme/php/peteava_user.php?query=1,peteavavip</link>
201	<annotation>User movies</annotation>
202	</item>
203
204	<item>
205	<title>User - Fhd000</title>
206	<link><?php echo $host; ?>/scripts/filme/php/peteava_user.php?query=1,Fhd000</link>
207	<annotation>User movies</annotation>
208	</item>
209	
210	<item>
211	<title>User - knok_71</title>
212	<link><?php echo $host; ?>/scripts/filme/php/peteava_user.php?query=1,knok_71</link>
213	<annotation>User movies</annotation>
214	</item>
215	
216	<item>
217	<title>User - remat</title>
218	<link><?php echo $host; ?>/scripts/filme/php/peteava_user.php?query=1,remat</link>
219	<annotation>User movies</annotation>
220	</item>
221	
222	<item>
223	<title>User - desene.3xforum.ro</title>
224	<link><?php echo $host; ?>/scripts/filme/php/peteava_user.php?query=1,desene.3xforum.ro</link>
225	<annotation>User movies</annotation>
226	</item>
227<?php
228if (file_exists("/usr/local/etc/dvdplayer/peteava.dat")) {
229$html=file_get_contents("/usr/local/etc/dvdplayer/peteava.dat");
230$u=explode(",",$html);
231for ($i=0;$i<count($u);$i++){
232$link=$host."/scripts/filme/php/peteava_user.php?query=1,".$u[$i];
233echo '
234<item>
235<title>User - '.$u[$i].'</title>
236<link>'.$link.'</link>
237<annotation>User movies</annotation>
238</item>
239';
240}
241}
242?>
243</channel>
244</rss>