Home Page
The Tools Folder ","{","[","]", "}" ); $filetypes = array ( 'png' => 'jpg.gif', 'jpeg' => 'jpg.gif', 'bmp' => 'jpg.gif', 'jpg' => 'jpg.gif', 'gif' => 'gif.gif', 'zip' => 'archive.png', 'rar' => 'archive.png', 'exe' => 'exe.gif', 'setup' => 'setup.gif', 'txt' => 'text.png', 'htm' => 'html.gif', 'html' => 'html.gif', 'fla' => 'fla.gif', 'swf' => 'swf.gif', 'xls' => 'xls.gif', 'doc' => 'doc.gif', 'sig' => 'sig.gif', 'fh10' => 'fh10.gif', 'pdf' => 'pdf.gif', 'psd' => 'psd.gif', 'rm' => 'real.gif', 'mpg' => 'video.gif', 'mpeg' => 'video.gif', 'mov' => 'video2.gif', 'avi' => 'video.gif', 'eps' => 'eps.gif', 'gz' => 'archive.png', 'asc' => 'sig.gif', ); $startdir = '.'; $showthumbnails = false; $showdirs = true; $forcedownloads = false; $displayindex = false; $overwrite = false; $allowprocess=false; $allowuploads = false; $allowdeletes = false; $allowedexts = array('jpg'); $indexfiles = array ( 'index.php', ); $hide = array( $logfilename, '.css', '.js', '.htm', '.html', '.php', 'Thumbs', 'thumbs', '.htaccess', '.htpasswd' ); if($dlftype == 'upload'){ $allowedexts = array('jpg', 'bmp', 'gif', 'pdf','txt','zip','rar','kml','kmz'); $allowuploads = true; $allowdeletes = true; $showthumbnails = true; }elseif($dlftype == 'process'){ $allowedexts = array('txt','log','csv'); $allowuploads = true; $allowprocess = true; }elseif($dlftype == 'delete'){ $allowedexts = array('jpg', 'bmp', 'gif', 'pdf','txt','zip','rar','kml','kmz'); $allowdeletes=true; }elseif($dlftype == 'mine'){ $showthumbnails = true; $hide = array( '.css', '.js', '.htm', '.html', '.php', 'Thumbs', 'thumbs', '.htaccess', '.htpasswd' ); }elseif($dlftype == 'main'){ } $phpallowuploads = false; $phpmaxsize = 1; $GOT_dir =""; $GOT_sort ="date"; $GOT_order ="desc"; //$sortorder = '?dir='.trim($_GET['dir']).'&sort='.$_GET['sort'].'&order='.$_GET['order']; if(isset($_GET["sort"])) $GOT_sort = $_GET["sort"]; if(isset($_GET["order"])) $GOT_order = $_GET["order"]; if(isset($_GET["dir"])) $GOT_dir = $_GET["dir"]; $sortorder = '&sort='.$GOT_sort.'&order='.$GOT_order; if($allowuploads) { $phpallowuploads = (bool) ini_get('file_uploads'); $phpmaxsize = ini_get('upload_max_filesize'); $phpmaxsize = trim($phpmaxsize); $last = strtolower($phpmaxsize{strlen($phpmaxsize)-1}); switch($last) { case 'g':$phpmaxsize *= 1024; case 'm':$phpmaxsize *= 1024; } } $allowuploads = $phpallowuploads; function createThumbs( $pathToImages, $pathToThumbs, $thumbWidth ) { $pathToImages = $_SERVER['DOCUMENT_ROOT'].'/'.trim($pathToImages); $pathToThumbs = $_SERVER['DOCUMENT_ROOT'].'/'.trim($pathToThumbs); $xmal=$pathToImages; if(substr($xmal, -1, 1)=='/') {$xmal=substr($xmal,0,-1);} $xmalt=$pathToThumbs; if(substr($xmalt, -1, 1)=='/') {$xmalt=substr($xmalt,0,-1);} $dir = opendir( $xmal ); while (false !== ($fname = readdir( $dir ))) { $fname=trim($fname); $doit = 0; // $info = pathinfo($xmal.$fname); $fn_array = explode('.', $pathToImages.$fname); $type = strtolower(end($fn_array)); if ($type == 'jpg' || $type == 'jpeg' || $type == 'gif') { $doit = 1; if (!is_dir($xmalt)){ if(mkdir($xmalt , 0757)){ }else{$doit = 0;} } // if (!mkdir($structure, 0, true)) $dir2 = opendir( $xmalt ); while (false !== ($tname = readdir( $dir2 ))) { $tname=trim($tname); //echo 'Images='.$pathToImages.$name.' thumbs='.$pathToThumbs.$tname.'
'; if ($fname == $tname) { $doit=0;break;} } closedir( $dir2 ); } if ($doit == 1){ if ($type == 'jpg' || $type == 'jpeg') $img = @imagecreatefromjpeg("{$pathToImages}{$fname}"); elseif ($type == 'png') $img = @imagecreatefrompng("{$pathToImages}{$fname}"); elseif ($type == 'gif') { if (!function_exists('imagecreatefromgif')) {$doit =0;} if ($doit == 1) {$img = @imagecreatefromgif("{$pathToImages}{$fname}");} } else $doit = 0; // die("Error: Image type not supported"); } if ($doit == 1){ $x = imagesx($img); $y = imagesy($img); $width = $thumbWidth; $height = round(($y/$x) * $width); $tmpimage = imagecreatetruecolor($width, $height); imagecopyresampled($tmpimage, $img, 0, 0, 0, 0, $width, $height, $x, $y); imagedestroy($img); $img = $tmpimage; if ($type == 'jpg' || $type == 'jpeg') { //header("Content-type: image/jpeg"); imagejpeg($img, "{$pathToThumbs}{$fname}", 65); } elseif ($type == 'png') { //header("Content-type: image/png"); imagetruecolortopalette($img, false, 128); imagepng($img,"{$pathToThumbs}{$fname}"); } elseif ($type == 'gif') { //header("Content-type: image/png"); imagetruecolortopalette($img, false, 128); imagepng($img,"{$pathToThumbs}{$fname}"); } // $img = imagecreatefromjpeg( "{$pathToImages}{$fname}" ); // $width = imagesx( $img ); // $height = imagesy( $img ); // $new_width = $thumbWidth; // $new_height = floor( $height * ( $thumbWidth / $width ) ); // $tmp_img = imagecreatetruecolor( $new_width, $new_height ); // imagecopyresized( $tmp_img, $img, 0, 0, 0, 0, $new_width, $new_height, $width, $height ); // imagejpeg( $tmp_img, "{$pathToThumbs}{$fname}" ); }else{ // echo "File Exists {$pathToThumbs}{$fname}
"; } } closedir( $dir ); $dir = opendir( $xmalt ); if (false !== ($tname = readdir( $dir ))) {rmdir($xmalt);} closedir( $dir ); } error_reporting(0); if(!function_exists('imagecreatetruecolor')) $showthumbnails = false; $leadon = $startdir; if($leadon=='.') $leadon = ''; if((substr($leadon, -1, 1)!='/') && $leadon!='') $leadon = $leadon . '/'; $startdir = $leadon; if($GOT_dir) { //check this is okay. if(substr($GOT_dir, -1, 1)!='/') { $GOT_dir = $GOT_dir . '/'; } $dirok = true; $dirnames = split('/', $GOT_dir); for($di=0; $di Directory Listing of /tools/

Directory Listing of /tools/

'.$files[$i].''; $thumb2 = ' onmouseover="o('.$i.', \''.$files[$i].'\');" onmouseout="f('.$i.');"'; } if($filetypes[$ext]) {$icon = $filetypes[$ext];} $filename = $files[$i]; if(strlen($filename)>43) {$filename = substr($files[$i], 0, 40) . '...';} $fileurl = $leadon . $files[$i]; if($forcedownloads) {$fileurl = $_SESSION['PHP_SELF'] . '?dir=' . urlencode($leadon) . '&download=' . urlencode($files[$i]);} ?>
File Upload (Max Filesize: KB)
FolderName:
File uploads are disabled in your php.ini file. Please enable them.