Guest User

Untitled

a guest
May 12th, 2015
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.35 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for SourceGuardian & phpSHIELD)
  6. *
  7. * @ Version : 1.1.6.0
  8. * @ Author : DeZender
  9. * @ Release on : 02.06.2013
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function cam_link($cam, $hostname, $port) {
  15. $direct = 0;
  16. $fd = fopen( . '/srv/etc/direct.' . $cam, 'r' );
  17. $direct = fgets( $fd, 4096 );
  18. $direct = chop( $direct );
  19. fclose( $fd );
  20. $remoteuser = $_SERVER['PHP_AUTH_USER'];
  21. $camnr = substr( $cam, 3 );
  22.  
  23. if ($direct) {
  24. $ipdata = . '/srv/etc/ip.' . $cam;
  25. $fd = fopen( $ipdata, 'r' );
  26. $ip = fgets( $fd, 4096 );
  27. $port = fgets( $fd, 4096 );
  28. $user = fgets( $fd, 4096 );
  29. $pass = fgets( $fd, 4096 );
  30. fclose( $fd );
  31. $ip = chop( $ip );
  32. $port = chop( $port );
  33. $user = chop( $user );
  34. $pass = chop( $pass );
  35.  
  36. if (has_cam_rights( $remoteuser, $camnr )) {
  37. if ($fstype = get_feature( $remoteuser, 'ss_user_cam_link' )) {
  38. print ( . '<a href="http://' . $ip . ':' ) . $port . '" class=link_button target=_BLANK>Live Stream</a>
  39. ';
  40. }
  41. }
  42. } else {
  43. if (has_cam_rights( $remoteuser, $camnr )) {
  44. if ($fstype = get_feature( $remoteuser, 'ss_user_cam_link' )) {
  45. print ( . '<a href="http://' . $hostname . ':' ) . $port . '" class=link_button target=_BLANK>Live Stream</a>
  46. ';
  47. }
  48. }
  49. }
  50.  
  51.  
  52. if (has_cam_rights( $remoteuser, $camnr )) {
  53. $permanentjpg = read_cam_permanent_jpg( $cam );
  54.  
  55. if ($permanentjpg) {
  56. print . '<a href="show-pictures-permanent.pml?cam=' . $cam . '&showpics=on&showfile=off" class=link_button>Single Frames</a>
  57. ';
  58. }
  59. }
  60.  
  61. }
  62.  
  63. function pic_width_cam($cam) {
  64. $size = getimagesize( . '/srv/www/htdocs/' . $cam . '/lastsnap.jpg' );
  65. $width = $size[0];
  66. return $width;
  67. }
  68.  
  69. function pic_height_cam($cam) {
  70. $size = getimagesize( . '/srv/www/htdocs/' . $cam . '/lastsnap.jpg' );
  71. $height = $size[1];
  72. return $height;
  73. }
  74.  
  75. function cam_pictures($cam, $remoteuser, $stream) {
  76. $fd = fopen( . '/srv/etc/' . $cam, 'r' );
  77. $buffer = fgets( $fd, 4096 );
  78. fclose( $fd );
  79. $hostname = $_SERVER['HTTP_HOST'];
  80. $camnr = substr( $cam, 3 );
  81. $port = 9000 + $camnr;
  82. $fd = fopen( . '/srv/etc/location.' . $cam, 'r' );
  83. $location = fgets( $fd, 4096 );
  84. $location = substr( $location, 0, 22 );
  85. fclose( $fd );
  86. print '<table border=0 cellpadding=0 cellspacing=0>
  87. ';
  88. print '<tr><td>
  89. ';
  90. print '<table border=0 cellpadding=0 cellspacing=0>
  91. ';
  92. print '<tr valign=top><td background="/img/td-back.jpg" height=14 width=144 bgcolor=#000066 valign=middle align=left>
  93. ';
  94. print . '<a href="show-movies.pml?cam=' . $cam . '&days=2&ujava=' . $stream . '" target="_top" class=homes>
  95. ';
  96. print . '&nbsp; ' . $camnr . '. ' . $location . '</a>
  97. ';
  98. print '</td><td background="/img/td-back.jpg" height=14 bgcolor=#000066 align=right valign=middle nowrap>
  99. ';
  100. $size = getimagesize( . '/srv/www/htdocs/' . $cam . '/lastsnap.jpg' );
  101. $vwidth = $size[0];
  102. $vheight = $size[1];
  103. $fwidth = $vwidth;
  104. $fheight = $vheight;
  105.  
  106. if (has_cam_rights( $remoteuser, $camnr )) {
  107. print . '<a onclick="javascript:focusall();" class=menuw href="javascript:var win' . $cam . '=window.open(\'/picframe.pml?cam=' . $cam . '&ujava=' . $stream . '\',\'SingleCam' . $cam . '\',';
  108. print . '\'width=' . $fwidth . ',height=' . $fheight . ',location=no,scrollbars=no,toolbar=no,menubar=no\');">';
  109. print '<img src="/img/csk.gif" border=0></a>';
  110. } else {
  111. print '<img src="/img/dummy.gif" width=16 height=2 border=0></a>';
  112. }
  113.  
  114. print '</td></tr></table>
  115. ';
  116. print '</td></tr>
  117. ';
  118. print '<tr><td valign=top>
  119. ';
  120. print '<center>
  121. ';
  122.  
  123. if ($buffer == 1) {
  124. $fd = fopen( . '/srv/etc/' . $cam . '.timetable', 'r' );
  125.  
  126. if ($fd) {
  127. $buffer2 = fgets( $fd, 4096 );
  128. } else {
  129. $buffer2 = 2;
  130. }
  131.  
  132. fclose( $fd );
  133.  
  134. if ($buffer2 == 0) {
  135. $outputwidth = 160;
  136. $outputheight = $vheight / ( $vwidth / $outputwidth );
  137. print . '<a href="show-movies.pml?cam=' . $cam . '&days=2&ujava=' . $stream . '" target="_top">
  138. ';
  139. print . '<img src="/getsnapshot.pml?cam=' . $cam . '" border=0 width=' . $outputwidth . ' height=' . $outputheight . '></a><br>
  140. ';
  141. ob_flush( );
  142. flush( );
  143. } else {
  144. if (has_cam_rights( $remoteuser, $camnr )) {
  145. if ($stream == '1') {
  146. $https = $_SERVER['HTTPS'];
  147. $host_port = $_SERVER['HTTP_HOST'];
  148.  
  149. if ($https == 'on') {
  150. $proto = 'https';
  151. } else {
  152. $proto = 'http';
  153. }
  154.  
  155. $stackingslavestatus = stackingslavestatus( );
  156.  
  157. if (strcmp( $stackingslavestatus, '1' ) == 0) {
  158. $redirect = $_SERVER['REDIRECT_URL'];
  159. $path = explode( '/', $redirect );
  160. $unitpath = $path[1];
  161. $lpath = $unitpath . '/l' . $camnr;
  162. } else {
  163. $unitpath = '';
  164. $lpath = 'l' . $camnr;
  165. }
  166.  
  167. $camurl = ( ( . $proto . '://' . $host_port . '/' ) . $lpath . '/' );
  168. print '<applet code="com.charliemouse.cambozola.Viewer" ';
  169. print 'archive="/cambozola.jar" ';
  170. $theight = $vheight / ( $vwidth / 160 );
  171. $theight = sprintf( '%d', $theight );
  172. print . 'width="160" height="' . $theight . '">
  173. ';
  174. print . '<param name="url" value="' . $camurl . '">
  175. ';
  176. print '</applet>
  177. ';
  178. } else {
  179. if ($stream == '2') {
  180. $outputwidth = 160;
  181. $outputheight = $vheight / ( $vwidth / $outputwidth );
  182. print . '<a href="show-movies.pml?cam=' . $cam . '&days=2&ujava=' . $stream . '" target="_top">';
  183. print . '<img onError="document.images[\'cam' . $camnr . '\'].src=\'/img/retrying.jpg\';setTimeout(\'document.images[\'cam' . $camnr . '\'].src=/l' . $camnr . '/\',10000);" src="/l' . $camnr . '/" border=0 width="' . $outputwidth . '" height="' . $outputheight . '" name="cam' . $camnr . '"></a>
  184. ';
  185. ob_flush( );
  186. flush( );
  187. } else {
  188. $feature = 'ss_delay';
  189. $fdelay = get_feature( $remoteuser, $feature );
  190. print . '<a href="show-movies.pml?cam=' . $cam . '&days=2&ujava=' . $stream . '" target="_top">
  191. ';
  192.  
  193. if (strpos( $fdelay, 'not_defined' ) !== false) {
  194. print . '<img onload=setTimeout("reloadcam' . $camnr . '()';
  195. } else {
  196. $fdelay = $fdelay * 1000;
  197. print ( . '<img onload=setTimeout("reloadcam' . $camnr . '()",' . $fdelay . ')' );
  198. }
  199.  
  200. $theight = $vheight / ( $vwidth / 160 );
  201. $theight = sprintf( '%d', $theight );
  202. print . ' onError="document.images[\'cam' . $camnr . '\'].src=\'/img/retrying.jpg\';setTimeout(\'reloadcam' . $camnr . '()\',10000);" onAbort=setTimeout(\'reloadcam' . $camnr . '()\',10000) name="cam' . $camnr . '" src="/cgi-bin/nph-getpic?c=' . $camnr . '&w=' . $vwidth . '&h=' . $vheight . '&o=160&q=65" width="160" height="' . $theight . '" border=0></a>
  203. ';
  204. }
  205. }
  206. } else {
  207. print '<img src="/img/no-access-320.jpg" border=0 width=160 height=120>
  208. ';
  209. }
  210. }
  211. } else {
  212. if (has_cam_rights( $remoteuser, $camnr )) {
  213. print . '<a href="show-movies.pml?cam=' . $cam . '&days=2&ujava=' . $stream . '" target="_top">
  214. ';
  215. print '<img src="/img/c-mor-dummy.jpg" width="160" height="120" border=0></a>
  216. ';
  217. } else {
  218. print '<img src="/img/no-access-320.jpg" border=0 width=160 height=120>
  219. ';
  220. }
  221. }
  222. ..................................................................
  223. ..........................
  224. ..........
Advertisement
Add Comment
Please, Sign In to add comment