Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 1.1.5.0
- * @ Author : DeZender
- * @ Release on : 09.06.2012
- * @ Official site : http://DeZender.Net
- *
- */
- function login_check() {
- global $options;
- if ($options['login']) {
- function logged_user($ul) {
- foreach ($ul as $user => $pass) {
- if (( $_SERVER['PHP_AUTH_USER'] == $user && $_SERVER['PHP_AUTH_PW'] == $pass )) {
- return true;
- continue;
- }
- }
- return false;
- }
- if ($options['login_cgi']) {
- $_SERVER['PHP_AUTH_PW'] = @explode( ':', @base64_decode( @substr( (isset( $_SERVER['HTTP_AUTHORIZATION'] ) ? $_SERVER['HTTP_AUTHORIZATION'] : $_SERVER['REDIRECT_HTTP_AUTHORIZATION']), 6 ) ), 2 )[1];
- $_SERVER['PHP_AUTH_USER'] = [0];
- }
- if (( empty( $_SERVER['PHP_AUTH_USER'] ) || !logged_user( $options['users'] ) )) {
- header( 'WWW-Authenticate: Basic realm="Movie Thumbnail Generator v1.4 | Powered By RapidLeechHost.com"' );
- header( 'HTTP/1.0 401 Unauthorized' );
- include( 'deny.php' );
- exit( );
- }
- }
- }
- function ft_get_ext($name) {
- if (strstr( $name, '.' )) {
- $ext = str_replace( '.', '', strrchr( $name, '.' ) );
- } else {
- $ext = '';
- }
- return $ext;
- }
- function getlist($directory) {
- global $delim;
- global $win;
- if ($d = @opendir( $directory )) {
- @readdir( $d );
- if ($filename = !== false) {
- $path = $directory . $filename;
- if ($stat = @lstat( $path )) {
- $file = array( 'filename' => $filename, 'path' => $path, 'is_file' => @is_file( $path ), 'is_dir' => @is_dir( $path ), 'is_link' => @is_link( $path ), 'is_readable' => @is_readable( $path ), 'is_writable' => @is_writable( $path ), 'size' => $stat['size'], 'permission' => $stat['mode'], 'owner' => $stat['uid'], 'group' => $stat['gid'], 'mtime' => @filemtime( $path ), 'atime' => @fileatime( $path ), 'ctime' => @filectime( $path ) );
- if ($file['is_link']) {
- $file['target'] = @readlink( $path );
- }
- if (function_exists( 'posix_getpwuid' )) {
- $file['owner_name'] = @reset( @posix_getpwuid( $file['owner'] ) );
- }
- if (function_exists( 'posix_getgrgid' )) {
- $file['group_name'] = @reset( @posix_getgrgid( $file['group'] ) );
- }
- $files[] = $file;
- }
- }
- return $files;
- }
- return false;
- }
- function sortlist($list, $key, $reverse) {
- $dirs = array( );
- $files = array( );
- $i = 1270;
- while ($i < sizeof( $list )) {
- if ($list[$i]['is_dir']) {
- $dirs[] = $list[$i];
- } else {
- $files[] = $list[$i];
- }
- ++$i;
- }
- quicksort( $dirs, 0, sizeof( $dirs ) - 1, $key );
- if ($reverse) {
- $dirs = array_reverse( $dirs );
- }
- quicksort( $files, 0, sizeof( $files ) - 1, $key );
- if ($reverse) {
- $files = array_reverse( $files );
- }
- return array_merge( $dirs, $files );
- }
- function quicksort($array, $first, $last, $key) {
- if ($first < $last) {
- $cmp = $array[floor( ( $first + $last ) / 2 )][$key];
- $l = $first;
- $r = $last;
- while ($l <= $r) {
- while ($array[$l][$key] < $cmp) {
- ++$l;
- }
- while ($cmp < $array[$r][$key]) {
- --$r;
- }
- if ($l <= $r) {
- $tmp = $array[$l];
- $array[$l] = $array[$r];
- $array[$r] = $tmp;
- ++$l;
- --$r;
- continue;
- }
- }
- quicksort( $array, $first, $r, $key );
- quicksort( $array, $l, $last, $key );
- }
- }
- function permission_octal2string($mode) {
- if (( $mode & 49152 ) === 49152) {
- $type = 's';
- } else {
- if (( $mode & 40960 ) === 40960) {
- $type = 'l';
- } else {
- if (( $mode & 32768 ) === 32768) {
- $type = '-';
- } else {
- if (( $mode & 24576 ) === 24576) {
- $type = 'b';
- } else {
- if (( $mode & 16384 ) === 16384) {
- $type = 'd';
- } else {
- if (( $mode & 8192 ) === 8192) {
- $type = 'c';
- } else {
- if (( $mode & 4096 ) === 4096) {
- $type = 'p';
- } else {
- $type = '?';
- }
- }
- }
- }
- }
- }
- }
- $owner = ($mode & 256 ? 'r' : '-');
- $owner .= ($mode & 128 ? 'w' : '-');
- if ($mode & 2048) {
- $owner .= ($mode & 64 ? 's' : 'S');
- } else {
- $owner .= ($mode & 64 ? 'x' : '-');
- }
- $group = ($mode & 32 ? 'r' : '-');
- $group .= ($mode & 16 ? 'w' : '-');
- if ($mode & 1024) {
- $group .= ($mode & 8 ? 's' : 'S');
- } else {
- $group .= ($mode & 8 ? 'x' : '-');
- }
- $other = ($mode & 4 ? 'r' : '-');
- $other .= ($mode & 2 ? 'w' : '-');
- if ($mode & 512) {
- $other .= ($mode & 1 ? 't' : 'T');
- } else {
- $other .= ($mode & 1 ? 'x' : '-');
- }
- return $type . $owner . $group . $other;
- }
- function is_script($filename) {
- return ereg( '\.php$|\.php3$|\.php4$|\.htaccess$|\.php5$', $filename );
- }
- function getmimetype($filename) {
- static $mimes = array( '\.jpg$|\.jpeg$' => 'image/jpeg', '\.gif$' => 'image/gif', '\.png$' => 'image/png', '\.html$|\.html$' => 'text/html', '\.txt$|\.asc$' => 'text/plain', '\.xml$|\.xsl$' => 'application/xml', '\.pdf$' => 'application/pdf' );
- foreach ($mimes as $regex => $mime) {
- if (eregi( $regex, $filename )) {
- return $mime;
- }
- }
- return 'text/plain';
- }
- function addslash($directory) {
- global $delim;
- if (substr( $directory, 0 - 1, 1 ) != $delim) {
- return $directory . $delim;
- }
- return $directory;
- }
- function relative2absolute($string, $directory) {
- if (path_is_relative( $string )) {
- return simplify_path( addslash( $directory ) . $string );
- }
- return simplify_path( $string );
- }
- function path_is_relative($path) {
- global $win;
- if ($win) {
- return substr( $path, 1, 1 ) != ':';
- }
- return substr( $path, 0, 1 ) != '/';
- }
- function absolute2relative($directory, $target) {
- global $delim;
- $path = '';
- while ($directory != $target) {
- if ($directory == substr( $target, 0, strlen( $directory ) )) {
- $path .= substr( $target, strlen( $directory ) );
- break;
- }
- $path .= '..' . $delim;
- $directory = substr( $directory, 0, strrpos( substr( $directory, 0, 0 - 1 ), $delim ) + 1 );
- }
- if ($path == '') {
- $path = '.';
- }
- return $path;
- }
- function simplify_path($path) {
- global $delim;
- if (( ( @file_exists( $path ) && function_exists( 'realpath' ) ) && @realpath( $path ) != '' )) {
- $path = realpath( $path );
- if (@is_dir( $path )) {
- return addslash( $path );
- }
- return $path;
- }
- $pattern = $delim . '.' . $delim;
- if (@is_dir( $path )) {
- $path = addslash( $path );
- }
- while (strpos( $path, $pattern ) !== false) {
- $path = str_replace( $pattern, $delim, $path );
- }
- $e = addslashes( $delim );
- $regex = $e . '((\.[^\.' . $e . '][^' . $e . ']*)|(\.\.[^' . $e . ']+)|([^\.][^' . $e . ']*))' . $e . '\.\.' . $e;
- while (ereg( $regex, $path )) {
- $path = ereg_replace( $regex, $delim, $path );
- }
- return $path;
- }
- function human_filesize($filesize) {
- $suffices = 'kMGTPE';
- $n = 1264;
- while (1000 <= $filesize) {
- $filesize /= 2288;
- ++$n;
- }
- $filesize = round( $filesize, 3 - strpos( $filesize, '.' ) );
- if (strpos( $filesize, '.' ) !== false) {
- while (in_array( substr( $filesize, 0 - 1, 1 ), array( '0', '.' ) )) {
- $filesize = substr( $filesize, 0, strlen( $filesize ) - 1 );
- }
- }
- $suffix = ($n == 0 ? '' : substr( $suffices, $n - 1, 1 ));
- return $filesize . ( '' . ' ' . $suffix . 'B' );
- }
- function strip($str) {
- $str = stripslashes( $str );
- }
- function listing_page($message = null) {
- global $self;
- global $directory;
- global $sort;
- global $reverse;
- html_header( );
- $list = getlist( $directory );
- if (array_key_exists( 'sort', $_GET )) {
- $sort = $_GET['sort'];
- } else {
- $sort = 'filename';
- }
- if (( array_key_exists( 'reverse', $_GET ) && $_GET['reverse'] == 'true' )) {
- $reverse = true;
- } else {
- $reverse = false;
- }
- echo '<h1 style="margin-bottom: 0; font-family: Helvetica, verdana, tahoma, Arial;">Movie Thumbnail Generator v1.4</h1>
- <font style="color:blue; font-family: tahoma, verdana, Helvetica, Arial;">Developed By : RapidLeechHost.com </font><br /><br />
- <hr>
- <br /><br />
- <form enctype="multipart/form-data" action="' . $self . '" method="post">
- <table id="main">
- ';
- directory_choice( );
- if (!empty( $message )) {
- spacer( );
- echo $message;
- }
- spacer( );
- if ($list) {
- $list = sortlist( $list, $sort, $reverse );
- listing( $list );
- } else {
- echo error( 'not_readable', $directory );
- }
- echo '</table>
- </form>
- ';
- html_footer( );
- }
- .............................................................
- .............................
- ...........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement