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8FRc8vJxR0nTsvtvMGxBb+N8dQO2ISjUYDh8MBp9MJWsysPXhjR0GnBGIbbzrbytGmaw/zCRr+LOu9iqrBEhT1FqDAmo9wOAydTgeXywW32426ujqEQiFoBlSoH9NDO6REvkOERFl8lKB3HqRtIdoWOC5Lp3jXchakUum80WhkQLoXmM1mCASC+dySMwvZtVlf0zWpYzT8ZfeVXYPEdr/pTvMdjX2sh+52/VQAAAAASUVORK5CYII=', ); $ftypes = array( 'media.png' => array('.mp3','.mp4','.ogg','.wav'), 'doc.png' => array('.doc','.pps'), 'pdf.png' => array('.pdf'), 'page.png' => array('.html','.php','.htm'), 'pic.png' => array('.jpg','.jpeg','.gif','.png'), 'arc.png' => array('.tgz','.gz','.zip','.bz2','arj'), 'film.png' => array('.avi','.asf','.mpg','.mpeg','.3gp','.wmv'), ); $req_uri = $_SERVER['REQUEST_URI']; $doc_root = $_SERVER['DOCUMENT_ROOT']; $srv_name = $_SERVER['SERVER_NAME']; $pos = strpos($req_uri,'?'); $pos != 0 ? $webcurpath = substr($req_uri,0,$pos) : $webcurpath = $req_uri; $for_chdir = rawurldecode($doc_root . $webcurpath); chdir (stripslashes($for_chdir)); // Main action of this script is performed here if(isset($_GET['action'])) { $action = $_GET['action']; } else { $action = ''; } if (is_file('gallery') && $action == '') $action = 'gallery'; switch($action) { case 'phpinfo': phpinfo(); break; case 'pls': getDirContent(); header('Content-Disposition: attachment; filename="' . $srv_name . '.m3u"'); header('Content-Type: audio/x-mpegurl; name="' . $srv_name . '.m3u"'); echo "#EXTM3U\r\n"; foreach( $GLOBALS['items']['files'] as $file ) { if( preg_match('/\.mp3$/i',$file) ) { echo 'http://' , $srv_name , $webcurpath , rawurlencode($file) , "\r\n"; } } break; // end of pls case 'image': $item = $_GET['item']; if( isset($images[$item]) && $len = strlen($images[$item]) != 0 ) { header("Expires: ".gmdate("D, d M Y H:i:s", time()+315360000)." GMT"); header("Cache-Control: max-age=315360000"); header('Content-type: image/'. substr($_GET['item'],-3)); echo base64_decode($images[$item])."\n"; } break; // end of image case 'thumb': @mkdir('thumbs'); @chmod('thumbs',0755); $GLOBALS['image'] = $_GET['item']; if(file_exists('thumbs/'.$GLOBALS['image'])) { if(filectime($GLOBALS['image'])>filectime('thumbs/'.$GLOBALS['image'])) { unlink('thumbs/'.$GLOBALS['image']); resizeimg($GLOBALS['image']); imageJPEG($GLOBALS['sm_image'],'thumbs/'.$GLOBALS['image']); header("Expires: ".gmdate("D, d M Y H:i:s", time()+315360000)." GMT"); header("Cache-Control: max-age=315360000"); Header('Content-type: image/jpeg'); imageJPEG($GLOBALS['sm_image']); } else { $GLOBALS['orig_image'] = imagecreatefromjpeg("thumbs/".$GLOBALS['image']); header("Expires: ".gmdate("D, d M Y H:i:s", time()+315360000)." GMT"); header("Cache-Control: max-age=315360000"); Header('Content-type: image/jpeg'); imageJPEG($GLOBALS['orig_image']); } } else { resizeimg($GLOBALS['image']); imageJPEG($GLOBALS['sm_image'],'thumbs/'.$GLOBALS['image']); header("Expires: ".gmdate("D, d M Y H:i:s", time()+3153600)." GMT"); header("Cache-Control: max-age=315360"); Header('Content-type: image/jpeg'); imageJPEG($GLOBALS['sm_image']); } if(isset($GLOBALS['sm_image'])) { imagedestroy($GLOBALS['sm_image']); } if(isset($GLOBALS['orig_image'])) { imageDestroy($GLOBALS['orig_image']); } break; // end of thumb case 'slide': $GLOBALS['image'] = $_REQUEST['item']; getDirContent(); foreach ($GLOBALS['items']['files'] as $img ) { if(preg_match('/.jpg$|.jpeg$|.png$|.gif$/i',$img)) { $imgs[] = $img; } } natcasesort($imgs); $imgs = array_values($imgs); $imgcount = count($imgs); $GLOBALS['startimgnum'] = array_search($GLOBALS['image'],$imgs); for($c=0;$c<$imgcount;$c=$c+12) { if(($GLOBALS['startimgnum'] >= $c) && ($GLOBALS['startimgnum'] < ($c + 12))) { $current = $c; } else { // something } } $arkey = array_search ($GLOBALS['image'],$imgs); if (!($arkey <= "0")) { $GLOBALS['prev_html'] = 'Previous\n"; $GLOBALS['prev'] = '?action=slide%26item='.$imgs[($arkey - 1)]; } else { $GLOBALS['prev'] = ''; } $GLOBALS['up_html'] = 'Up\n"; $up = ''; if ($imgs[($arkey + 1)]) { $GLOBALS['next_html'] = 'Next
\n"; $GLOBALS['next'] = '?action=slide%26item=' . $imgs[($arkey + 1)]; } else { $GLOBALS['next'] = ''; } echo print_header('fimage'); ?>

Page generated in 0.5278 seconds - ©2006 A.B.

0) { echo ' '; } ?> =0 ) { $GLOBALS['galllegend'] .= ' << \n"; $GLOBALS['prev'] = '?action=gallery%26startimgnum=' . ($GLOBALS['startimgnum']-12); }else{ $GLOBALS['galllegend'] .= ' << '; $GLOBALS['prev']= ''; } for($c=0;$c<$imgcount;$c=$c+12) { if(($GLOBALS['startimgnum'] >= $c) && ($GLOBALS['startimgnum'] < ($c + 12))) { $GLOBALS['galllegend'] .= '[#]'; } else { $GLOBALS['galllegend'] .= ' [' . ($c/12) . "] \n"; } } if( ($GLOBALS['startimgnum']+12)<$imgcount ) { $GLOBALS['galllegend'] .= ' >> \n"; $GLOBALS['next'] = '?action=gallery%26startimgnum=' . ($GLOBALS['startimgnum']+12); } else { $GLOBALS['galllegend'] .= ' >> '; $GLOBALS['next'] = ''; } $i = 0; $c = 0; foreach ($imgs as $file ) { if($GLOBALS['startimgnum']<=$i && $i<($GLOBALS['startimgnum']+12)) { $stats = stat($file); $GLOBALS['gallhtml'] .= '
  • ' . $file . ''; $GLOBALS['gallhtml'] .= '
    ' . substr($file,0,22) . ' - '.number_format(($stats['size']/1024),2).'KB - '.date("y.m.H",$stats['mtime'])."
  • \n"; } $i++; } echo print_header('gallery'); ?>

    Page generated in 0.5279 seconds - ©2006 A.B.

    0) { echo ' '; } ?> 1024 ) { $size = number_format((($stats['size']/1024)/1024),2).'MB'; } else { $size = number_format(($stats['size']/1024),2).'KB'; } echo 'dir.png ' , substr($dir,0,120) , ' ' , $size , ' ' , date("d/m/Y H:i",$stats['mtime']) , ' ' , "\n"; } $mp3div = 0; foreach( $GLOBALS['items']['files'] as $file ) { $mp3div++; $stats = stat($file); if( ($stats['size']/1024) > 1024 ) { $size = number_format((($stats['size']/1024)/1024),2).'MB'; } else { $size = number_format(($stats['size']/1024),2)."KB"; } if($mp3info==1 && substr($file,-4) == '.mp3') { if(!is_dir($mp3info_cache)) { @mkdir($mp3info_cache); } if(!file_exists($mp3info_cache.'/.'.$file.'.tag')) { $exec = array(); if (exec($mp3infobin . ' -x "' . $file . '"', $exec)) { echo 'something is NOT ok!'; } ; $description = ""; foreach( $exec as $line ) { if(!empty($line)) { list($key,$arg) = explode(":",$line); $arg = str_replace("'","",$arg); $arg = str_replace('"','',$arg); $description .= '' . htmlspecialchars($key) . ': ' . htmlspecialchars($arg) . '
    '; } } $hnd = fopen($mp3info_cache . '/.' . $file . '.tag','w'); fwrite( $hnd, $description ); fclose( $hnd ); } else { $hnd = fopen($mp3info_cache . '/.' .$file . '.tag','r'); $description = @fread( $hnd, filesize($mp3info_cache . '/.' . $file . '.tag') ); fclose( $hnd ); } echo "' 
					, ftype($file)
					, ' ' , htmlspecialchars(substr($file,0,120)) , '
    ' , $description , '
    ' , $size , ' ' , date("d/m/Y H:i",$stats['mtime']) , ' ' , "\n"; } else { echo '' 
					, ftype($file)
					, ' ' , htmlspecialchars(substr($file,0,120)) , '
    ' , $size , ' ' , date("d/m/Y H:i",$stats['mtime']) , ' ' , "\n"; } } ?>

    Page generated in 0.5280 seconds - ©2006 A.B.

    0) { echo ' '; } ?>
    parent.png Parent Directory
    '; break; // end of index case 'fimage': if($GLOBALS['image_width']> 1024) { $content = $GLOBALS['prev_html'] . "\n" . $GLOBALS['up_html'] . "\n" . $GLOBALS['next_html'] . '
    ' . $GLOBALS['image'] . '
    '; } else { $content = $GLOBALS['prev_html'] . "\n" . $GLOBALS['up_html'] . "\n" . $GLOBALS['next_html'] . '
    ' . $GLOBALS['image'] . '
    '; } break; //end of fimage case 'gallery': $content = $GLOBALS['galllegend'] . 'parent.png Parent Directory
      ' . $GLOBALS['gallhtml']; break; // end of gallery } // end of switch type Header('Content-Type: text/html; charset=utf-8'); return ' ' . print_title($type) .' ' . print_js($type) . '
      ' . $content; } function print_title($type) { switch($type){ case 'index': return 'Index of ' . stripslashes(rawurldecode($GLOBALS['req_uri'])) . ' on ' . $GLOBALS['srv_name']; case 'gallery': return 'Images in ' . stripslashes(rawurldecode($GLOBALS['webcurpath'])) . ' on ' . $GLOBALS['srv_name']; case 'fimage': return 'Image ' . stripslashes(rawurldecode($GLOBALS['image'])); } } function print_js($type) { switch($type) { case 'gallery': $tmpbuf = ' '; return $tmpbuf; break; case 'fimage'; $tmpbuf = ' '; return $tmpbuf; break; // fimage default: return ''; break; } } function getDirContent(){ if($dh = opendir('.')) { while (($item = readdir($dh)) !== false) { if($item != '.' && $item != '..' && !in_forbiden($item)) { if(is_dir($item)) { array_push( $GLOBALS['items']['dirs'], $item ); } elseif(is_file($item) && check_ext($item)) { array_push( $GLOBALS['items']['files'], $item ); } } } } } function check_ext($item) { foreach( $GLOBALS['allow_ext'] as $ext ) { if ( strcasecmp($ext, substr( $item, - strlen( $ext ))) == 0) { return 1; } } return 0; } function ftype($item) { foreach( $GLOBALS['ftypes'] as $type => $arr ) { foreach( $arr as $ext ) { if( strcasecmp($ext, substr( $item, - strlen( $ext ))) == 0) { return $type; } } } return 'file.png'; } function geturi($uri) { $arr = explode("/",$uri); $path = ""; $ret = ""; foreach( $arr as $component ) { if(!empty($component)) { $path .= '/' . $component; $ret .= ' / ' . $component.''; } } if(empty($ret)) { return "/"; } else { return $ret; } } function in_forbiden($item) { $r = false; foreach($GLOBALS['forbiden'] as $fitem) { if (strcasecmp($fitem,$item)==0) return true; } return $r; } // gallery functions function resizeimg($image) { $cell_size = 240; setMemoryForImage($image); if(preg_match("/.jpg$|.jpeg$/i",$image)) { $GLOBALS['orig_image'] = imagecreatefromjpeg($image); } elseif(preg_match("/.png$/i",$image)) { $GLOBALS['orig_image'] = imagecreatefrompng($image); } elseif(preg_match("/.gif$/i",$image)) { $GLOBALS['orig_image'] = imagecreatefromgif($image); } list($width, $height, $type, $attr) = getimagesize($image); $GLOBALS['image_width'] = $width; if( $width > $height ) { $max = $width; } else { $max = $height; } $factor = ($max/100); for($i=100;($i*$factor)>$cell_size;$i--) { $final = $i; } $xsize = ($width/100)*$final; $ysize = ($height/100)*$final; $GLOBALS['sm_image'] = imagecreatetruecolor(260,260) or die ("Cannot Initialize new gd image stream"); $whitesmoke = imagecolorallocate($GLOBALS['sm_image'], 245, 245, 245); $black = imagecolorallocate($GLOBALS['sm_image'], 0, 0, 0); imagefilltoborder ( $GLOBALS['sm_image'],0 ,0, 1, $whitesmoke); Imagecopyresampled($GLOBALS['sm_image'],$GLOBALS['orig_image'],((260-$xsize)/2),((260-$ysize)/2),0,0,$xsize,$ysize,imagesx($GLOBALS['orig_image']),imagesy($GLOBALS['orig_image'])); } function setMemoryForImage( $filename ){ $imageInfo = getimagesize($filename); $MB = 1048576; $K64 = 65536; $TWEAKFACTOR = 2.0; $memoryNeeded = round( ( $imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $imageInfo['channels'] / 8 + $K64 ) * $TWEAKFACTOR ); $memoryLimitMB = 8; $memoryLimit = $memoryLimitMB * $MB; if (function_exists('memory_get_usage') && memory_get_usage() + $memoryNeeded > $memoryLimit) { $newLimit = $memoryLimitMB + ceil( ( memory_get_usage() + $memoryNeeded - $memoryLimit ) / $MB ); ini_set( 'memory_limit', $newLimit . 'M' ); return true; } else { return false; } } ?>
    NameSizeModified