PageRenderTime 70ms CodeModel.GetById 41ms RepoModel.GetById 0ms app.codeStats 1ms

/patches/Servicios/sbin/www/rc2/screenShot.php

https://github.com/frisco82/HMR600.com-Firmware
PHP | 373 lines | 342 code | 23 blank | 8 comment | 11 complexity | 3bfbb21d1e4b82c9783549d34630b4d7 MD5 | raw file
  1. <?
  2. header('Content-Type: text/html; charset=utf-8');
  3. session_start();
  4. $_SESSION['redirect'] = $_SERVER['REQUEST_URI'];
  5. error_reporting(0);
  6. include "../chooselang.php";
  7. include '/tmp/lang.php';
  8. $file = "/usr/local/etc/setup.php";
  9. $fp = fopen($file, 'r');
  10. $fileData = fread($fp, filesize($file));
  11. fclose($fp);
  12. $line = explode("\n", $fileData);
  13. $i = 1;
  14. while ($i <= 5) {
  15. $dataPair = explode('=', $line[$i]);
  16. if ($dataPair[0] == "Login" && $dataPair[1] == "true") {
  17. if ($_SESSION['loggedIn'] != 1) {
  18. header("Location:../login_form.php");
  19. exit;
  20. }
  21. }
  22. $i++;
  23. }
  24. exec("echo -n ',' >> /tmp/ir");
  25. exec("echo -n '*' >> /tmp/ir");
  26. usleep(300000);
  27. $file1 = "/tmp/nowstatus";
  28. $fp1 = fopen($file1, 'r');
  29. $fileData1 = fread($fp1, filesize($file1));
  30. fclose($fp1);
  31. $line1 = explode("\n", $fileData1);
  32. $type = $line1[1];
  33. $playing = substr(strrchr($line1[2], '/'), 1);
  34. if (substr($line1[2], 0, 12) == "/tmp/myshare"){ //for NetShare
  35. $cur_dir = substr($line1[2], 12, strrpos($line1[2], '/')-12);
  36. $playing_file = '../media3'.rawurlencode($cur_dir).'/'.rawurlencode($playing);
  37. //$path = '../media3'.$cur_dir;
  38. }else{ //for HDD files
  39. $cur_dir = substr($line1[2], 18, strrpos($line1[2], '/')-18);
  40. $playing_file = '../media2'.rawurlencode($cur_dir).'/'.rawurlencode($playing);
  41. //$path = '../media2'.$cur_dir;
  42. }
  43. //echo "<script>alert('$cur_dir');</script>";
  44. //$file_without_ext = substr($playing, 0, strrpos($playing, '.'));
  45. //echo "<script>alert('$file_without_ext');</script>";
  46. //$shufl_seq = $line1[3];
  47. //$repeat = $line1[4];
  48. $time = $line1[5];
  49. ?>
  50. <html>
  51. <head>
  52. <title>Remocon</title>
  53. <!--link rel="stylesheet" type="text/css" href="dlf/styles.css" /-->
  54. <link href="general.css" rel="stylesheet" type="text/css" />
  55. <script language="JavaScript">
  56. function newwindow(w,h,webaddress,name){
  57. var viewimageWin = window.open(webaddress,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width="+w+",height="+h);
  58. viewimageWin.moveTo(screen.availWidth/2-(w/2),screen.availHeight/2-(h/2));
  59. window.resizeTo(w, h+80);
  60. }
  61. function Playit(value){
  62. //alert(value);
  63. document.playlist.target = 'gframe';
  64. document.playlist.action = '../play.php?dir='+ value;
  65. document.playlist.submit();
  66. }
  67. </script>
  68. </head>
  69. <body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0 oncontextmenu='return false' ondragstart='return false' bgcolor="black">
  70. <center>
  71. <table cellspacing="0" cellpadding="0" border="0" bgcolor="black">
  72. <tr>
  73. <td colspan=2 width='520px' height='240px'>
  74. <?
  75. if($type == "Photo"){
  76. echo "<div id='screenshot'>";
  77. echo "<a href='$playing_file'><img src='$playing_file' width='515' height='240px' title='$playing' border='0' /></a>";
  78. echo "</div>";
  79. }else{
  80. ?>
  81. <div id="screenshot">
  82. <a href='../screenshot.bmp'><img src='../screenshot.bmp' width='520px' height='240px' title='ScreenShot' border='0' /></a>
  83. </div>
  84. <?}?>
  85. <!--div id="screenshotinfo">
  86. <div id="npName"><marquee scrolldelay=200 onmouseover="this.stop();" onmouseout="this.start();" behavior="alternate"><a href="nowplaying.php"><?echo $playing;?></a></marquee></div>
  87. <!--div id="nptime1"><?echo $time;?></div-->
  88. </div-->
  89. </td></tr>
  90. <tr height=18><td>
  91. <div>
  92. <div id="time"><?echo $time;?></div>
  93. <div id="name"><?echo $playing;?></div>
  94. </div>
  95. </td>
  96. </tr>
  97. <tr>
  98. <td valign=top>
  99. <table cellspacing="0" cellpadding="0" border="0" valign=top>
  100. <tr height=23><td></td></tr>
  101. <tr>
  102. <td><input type="button" name="vertical" value=" " style="background: url('vertical.png');background-color:Transparent; height:35px; width:35px; border:none; cursor:hand" title="<?echo $STR_Vertical;?>" onclick="newwindow(250, 680, 'index.php', 'rc_2');"></td>
  103. </tr>
  104. <tr>
  105. <td><input type="button" name="horizontal" value=" " style="background: url('horizontal.png');background-color:Transparent; height:35px; width:35px; border:none; cursor:hand" title="<?echo $STR_Horizontal;?>" onclick="newwindow(550, 270, 'index1.php', 'rc_2');"></td>
  106. </tr>
  107. <form name="playlist" method='post'>
  108. <tr>
  109. <td><input type="button" class='btn_2' value=" " style="background: url('movies_btn.png');background-color:Transparent; height:35px; width:35px; border:none; cursor:hand" title="<?echo $STR_Play_Video_list;?>" onclick="javascript:Playit('Video playlist');"></td>
  110. </tr>
  111. <tr>
  112. <td><input type="button" class='btn_2' value=" " style="background: url('music_btn.png');background-color:Transparent; height:35px; width:35px; border:none; cursor:hand" title="<?echo $STR_Play_Audeo_list;?>" onclick="javascript:Playit('Audio playlist');"></td>
  113. </tr>
  114. <tr>
  115. <td><input type="button" class='btn_2' value=" " style="background: url('pictures_btn.png');background-color:Transparent; height:35px; width:35px; border:none; cursor:hand" title="<?echo $STR_Play_Photo_list;?>" onclick="javascript:Playit('Photo playlist');"></td>
  116. </tr>
  117. <tr>
  118. <td><input type="button" class='btn_2' value=" " style="background: url('refresh_icon.png');background-color:Transparent; height:35px; width:35px; border:none; cursor:hand" title="<?echo $STR_Refresh;?>" onclick="javascript:window.location.reload();"></td>
  119. </tr>
  120. </form>
  121. </table>
  122. </td>
  123. <td valign=top>
  124. <form name="remocon" target='gframe' action="rc_action.php" method="post">
  125. <input type="submit" style="height:0px; width:0px; visibility:hidden" name="search" value=" ">
  126. <table width=480 cellspacing="0" cellpadding="0" border="1" bordercolor="#808080" bgcolor="black">
  127. <tr><td>
  128. <center>
  129. <table cellspacing="0" cellpadding="0" border="0">
  130. <tr height=10><td></td></tr>
  131. <tr valign=top >
  132. <td align=center width="44" ><input type="submit" style="background: url('power.png');background-color:Transparent; height:41px; width:41px; border:none; cursor:hand" name="power" value=" "></td>
  133. <td width=60 align=center>
  134. <table cellspacing="0" cellpadding="0" border="0"><tr><td align=center>
  135. <input type="submit" class='btn_2' style="background: url('btn.png');background-color:Transparent; height:24px; width:37px; border:none; cursor:hand" name="subt" value=" "></td></tr>
  136. <tr><td align=center><font face="arial" color="white" size="1">Sub-t/ID3</font></td></tr>
  137. </table>
  138. </td>
  139. <td width="44" align=center valign=middle>
  140. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  141. <input type="submit" style="background: url('home.png');background-color:Transparent; height:32px; width:32px; border:none; cursor:hand" name="home" value=" "></td></tr>
  142. <tr><td align=top><font face="arial" color="white" size="1">HOME</font></td></tr>
  143. </table>
  144. </td>
  145. </tr>
  146. <tr>
  147. <td width="44">
  148. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  149. <input type="submit" class='btn_2' style="background: url('1.png');background-color:Transparent; height:28px; width:44px; border:none; cursor:hand" name="1" value=" "></td></tr>
  150. <tr><td align=center><font face="arial" color="white" size="1">ADD</font></td></tr>
  151. </table>
  152. </td>
  153. <td align=center valign=top>
  154. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  155. <input type="submit" class='btn_2' style="background: url('2.png');background-color:Transparent; height:27px; width:48px; border:none; cursor:hand" name="2" value=" "></td></tr>
  156. <tr><td align=center><font face="arial" color="white" size="1">EJECT</font></td></tr>
  157. </table>
  158. </td>
  159. <td width="44" align=right>
  160. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  161. <input type="submit" class='btn_2' style="background: url('3.png');background-color:Transparent; height:29px; width:43px; border:none; cursor:hand" name="3" value=" "></td><tr>
  162. <tr><td align=center><font face="arial" color="white" size="1">DELETE</font></td></tr>
  163. </table>
  164. </td>
  165. </tr>
  166. <tr>
  167. <td width="44">
  168. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  169. <input type="submit" class='btn_2' style="background: url('4.png');background-color:Transparent; height:29px; width:44px; border:none; cursor:hand" name="4" value=" "></td></tr>
  170. <tr><td align=center><font face="arial" color="white" size="1">ZOOM</font></td></tr>
  171. </table>
  172. </td>
  173. <td align=center valign=top>
  174. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  175. <input type="submit" class='btn_2' style="background: url('5.png');background-color:Transparent; height:28px; width:48px; border:none; cursor:hand" name="5" value=" "></td></tr>
  176. <tr><td align=center><font face="arial" color="white" size="1">GOTO</font></td></tr>
  177. </table>
  178. </td>
  179. <td width="44" align=right>
  180. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  181. <input type="submit" class='btn_2' style="background: url('6.png');background-color:Transparent; height:29px; width:43px; border:none; cursor:hand" name="6" value=" "></td><tr>
  182. <tr><td align=center><font face="arial" color="white" size="1">MENU</font></td></tr>
  183. </table>
  184. </td>
  185. </tr>
  186. <tr>
  187. <td width="44">
  188. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  189. <input type="submit" class='btn_2' style="background: url('7.png');background-color:Transparent; height:28px; width:44px; border:none; cursor:hand" name="7" value=" "></td></tr>
  190. <tr><td align=center><font face="arial" color="red" size="1">SETUP</font></td></tr>
  191. </table>
  192. </td>
  193. <td align=center valign=top>
  194. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  195. <input type="submit" class='btn_2' style="background: url('8.png');background-color:Transparent; height:28px; width:48px; border:none; cursor:hand" name="8" value=" "></td></tr>
  196. <tr><td align=center><font face="arial" color="white" size="1">FUNC</font></td></tr>
  197. </table>
  198. </td>
  199. <td width="44" align=right>
  200. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  201. <input type="submit" class='btn_2' style="background: url('9.png');background-color:Transparent; height:29px; width:43px; border:none; cursor:hand" name="9" value=" "></td><tr>
  202. <tr><td align=center><font face="arial" color="red" size="1">TVOUT</font></td></tr>
  203. </table>
  204. </td>
  205. </tr>
  206. <tr>
  207. <td width="44">
  208. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  209. <input type="submit" class='btn_2' style="background: url('info.png');background-color:Transparent; height:29px; width:44px; border:none; cursor:hand" name="info" value=" "></td></tr>
  210. <tr><td align=center><font face="arial" color="white" size="1">INFO</font></td></tr>
  211. </table>
  212. </td>
  213. <td align=center valign=top>
  214. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  215. <input type="submit" class='btn_2' style="background: url('0.png');background-color:Transparent; height:27px; width:48px; border:none; cursor:hand" name="0" value=" "></td></tr>
  216. <tr><td align=center><font face="arial" color="white" size="1">PREVIEW</font></td></tr>
  217. </table>
  218. </td>
  219. <td width="44" align=right>
  220. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  221. <input type="submit" class='btn_2' style="background: url('return.png');background-color:Transparent; height:28px; width:43px; border:none; cursor:hand" name="return" value=" "></td><tr>
  222. <tr><td align=center><font face="arial" color="white" size="1">RETURN</font></td></tr>
  223. </table>
  224. </td>
  225. </tr>
  226. </table>
  227. </td>
  228. <td>
  229. <table cellspacing="0" cellpadding="0" border="0" align=center>
  230. <tr><td></td><td align=center><input type="submit" class='btn_2' style="background: url('navi_up.png');background-color:Transparent; height:32px; width:85px; border:none; cursor:hand" name="up" value=" "></td></tr>
  231. <tr><td valign=middle align=center>
  232. <input type="submit" class='btn_2' style="background: url('navi_left.png');background-color:Transparent;
  233. height:87px;width:34px; border:none; cursor:hand" name="left" value=" "></td>
  234. <td valign=middle align=center>
  235. <input type="submit" class='btn_2' valign=top style="background: url('enter.png');background-color:Transparent; height:53px; width:54px; border:none; cursor:hand; background-repeat: no-repeat; background-position: center center;" name="enter" value=" "></td>
  236. <td valign=middle align=center>
  237. <input type="submit" class='btn_2' style="background: url('navi_right.png');background-color:Transparent; height:87px; width:34px; border:none; cursor:hand" name="right" value=" "></td>
  238. </tr>
  239. <tr><td></td><td align=center><input type="submit" class='btn_2' style="background: url('navi_down.png');background-color:Transparent; height:33px; width:85px; border:none; cursor:hand" name="down" value=" "></td></tr>
  240. </table>
  241. <table cellspacing="0" cellpadding="0" border="0" width=160 align=center>
  242. <tr height=45>
  243. <td valign=top align=center width=40>
  244. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  245. <input type="submit" class='btn_2' style="background: url('pgup.png');background-color:Transparent; height:35px; width:35px; border:none; cursor:hand" name="pgup" value=" "></td></tr>
  246. <tr><td align=center><font face="arial" color="white" size="1">PGUP</font></td></tr>
  247. </table>
  248. </td>
  249. <td valign=bottom align=center width=40><input type="submit" class='btn_2' style="background: url('play_pause.png');background-color:Transparent; height:35px; width:35px; border:none; cursor:hand" name="play_pause" value=" "></td>
  250. <td valign=bottom align=center width=40><input type="submit" class='btn_2' style="background: url('stop.png');background-color:Transparent; height:35px; width:35px; border:none; cursor:hand" name="stop" value=" "></td>
  251. <td valign=top align=center width=40>
  252. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  253. <input type="submit" class='btn_2' style="background: url('pgdn.png');background-color:Transparent; height:35px; width:35px; border:none; cursor:hand" name="pgdn" value=" "></td></tr>
  254. <tr><td align=center><font face="arial" color="white" size="1">PGDN</font></td></tr>
  255. </table>
  256. </td>
  257. </tr>
  258. </table>
  259. </td>
  260. <td>
  261. <table cellspacing="0" cellpadding="0" border="0" width=150 align=center>
  262. <tr height=15><td></td></tr>
  263. <tr height=40>
  264. <td width="50" valign=top align=center><input type="submit" class='btn_2' style="background: url('FB.png');background-color:Transparent; height:25px; width:37px; border:none; cursor:hand" name="FB" value=" "></td>
  265. <td valign=top align=center><input type="submit" class='btn_2' style="background: url('FF.png');background-color:Transparent; height:25px; width:37px; border:none; cursor:hand" name="FF" value=" "></td>
  266. <td width="50" align=center>
  267. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  268. <input type="submit" class='btn_2' style="background: url('vol_up.png');background-color:Transparent; height:25px; width:37px; border:none; cursor:hand" name="vol_up" value=" "></td></tr>
  269. <tr><td align=center><font face="arial" color="red" size="1">VOL</font></td></tr>
  270. </table>
  271. </td>
  272. </tr>
  273. <tr height=40>
  274. <td width="50" align=center>
  275. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  276. <input type="submit" class='btn_2' style="background: url('btn.png');background-color:Transparent; height:24px; width:37px; border:none; cursor:hand" name="audio" value=" "></td></tr>
  277. <tr><td align=center><font face="arial" color="white" size="1">AUDIO</font></td></tr>
  278. </table>
  279. </td>
  280. <td align=center>
  281. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  282. <input type="submit" class='btn_2' style="background: url('btn.png');background-color:Transparent; height:24px; width:37px; border:none; cursor:hand" name="a-b" value=" "></td></tr>
  283. <tr><td align=center><font face="arial" color="white" size="1">A-B</font></td></tr>
  284. </table>
  285. </td>
  286. <td width="50" align=center valign=top><input type="submit" class='btn_2' style="background: url('vol_down.png');background-color:Transparent; height:24px; width:37px; border:none; cursor:hand" name="vol_down" value=" "></td>
  287. </tr>
  288. <tr height=40>
  289. <td width="50" align=center>
  290. <table cellspacing="0" cellpadding="0" border="0"><tr><td align=center>
  291. <input type="submit" class='btn_2' style="background: url('shufl.png');background-color:Transparent; height:24px; width:37px; border:none; cursor:hand" name="shufl" value=" "></td></tr>
  292. <tr><td align=center><font face="arial" color="white" size="1">SHUFFLE</font></td></tr>
  293. </table>
  294. </td>
  295. <td align=center>
  296. <table cellspacing="0" cellpadding="0" border="0"><tr><td align=center>
  297. <input type="submit" class='btn_2' style="background: url('repeat.png');background-color:Transparent; height:24px; width:37px; border:none; cursor:hand" name="repeat" value=" "></td></tr>
  298. <tr><td align=center><font face="arial" color="white" size="1">REPEAT</font></td></tr>
  299. </table>
  300. </td>
  301. <td width="50" align=center>
  302. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  303. <input type="submit" class='btn_2' style="background: url('mute.png');background-color:Transparent; height:24px; width:37px; border:none; cursor:hand" name="mute" value=" "></td></tr>
  304. <tr><td align=center><font face="arial" color="white" size="1">MUTE</font></td></tr>
  305. </table>
  306. </td>
  307. </tr>
  308. <tr height=40>
  309. <td width="50" valign=top align=center>
  310. <table cellspacing="0" cellpadding="0" border="0"><tr><td align=center>
  311. <input type="submit" class='btn_2' style="background: url('btn.png');background-color:Transparent; height:24px; width:37px; border:none; cursor:hand" name="subtitle" value=" "></td></tr>
  312. <tr><td align=center><font face="arial" color="white" size="1">SUBTITLE</font></td></tr>
  313. </table>
  314. </td>
  315. <td align=center colspan=2>
  316. <table cellspacing="0" cellpadding="0" border="0"><tr><td>
  317. <input type="submit" class='btn_2' style="background: url('sync_left.png');background-color:Transparent; height:24px; width:37px; border:none; cursor:hand" name="sync_left" value=" ">&nbsp&nbsp
  318. <input type="submit" class='btn_2' style="background: url('sync_right.png');background-color:Transparent; height:24px; width:37px; border:none; cursor:hand" name="sync_right" value=" "></td></tr>
  319. <tr><td align=center><font face="arial" color="white" size="1">- &nbsp&nbsp SYNC &nbsp&nbsp +</font></td></tr>
  320. </table>
  321. </td>
  322. </tr>
  323. </table>
  324. <table cellspacing="0" cellpadding="0" border="0" width=150 align=center>
  325. <tr height=40>
  326. <td width="35"><input type="text" name="command" size="14" value=" "></td>
  327. <td align=center><input type="submit" class='btn_2' name="search" value="Go"></td>
  328. </tr>
  329. </table>
  330. </center>
  331. </td></tr>
  332. </table>
  333. </form>
  334. </td></tr>
  335. </table>
  336. </center>
  337. <iframe name='gframe' width=0 height=0 style="display:none"></iframe>
  338. <div id="loadDiv" name="loadDiv" style="position:absolute; visibility:hidden; left:30;top:120;width:200; height:100; z-index:1;">
  339. <table cellspacing="0" cellpadding="0" border="0" width=100% height=100%>
  340. <td valign=middle align=center>
  341. <table borde=0 align=center>
  342. <td align=center>
  343. <img src="dlf/upload.gif">
  344. </td>
  345. </table>
  346. </td>
  347. </table>
  348. </div>
  349. </body>
  350. </html>