"; exit; } if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $auth_usern) && ( $PHP_AUTH_PW == "$auth_passw" )) ) { header("WWW-Authenticate: Basic entrer=\"file upload manager\""); header("HTTP/1.0 401 Unauthorized"); error("Access Denied! You must enter a valid username & password."); } } clearstatcache(); @include_once("http://www.mtnpeak.net/webdev/fileupload/curr_vers.inc"); $fum_vers = "1.2"; # do not edit this, the script will not work!!! ?> <? echo ($title) ? ($title) : ("File Upload Manager"); ?>

 v  © thepeak"; ?>
","",$o); $o=str_replace("\"","",$o); $o=str_replace("|","",$o); return $o; } if(!eregi("777",decoct(fileperms($dir)))) { echo"

ERROR: cannot access file directory. please chmod directory \"$dir\" with value 777 (xrw-xrw-xrw)!


»refresh"; } else { if(!$_FILES[fileupload]) { ?>
file:
rename to:
file types allowed:count($file_allow_ex)-1))$commas=", ";else $commas=""; list($key,$value)=each($file_allow_ex); echo $value.$commas; } ?>
file size limit:2000000 BYTES (1953.13 KB, 1.953 MB)
 
"." && $readdir<>".." && $readdir != "index.html") { $filearr[] = $readdir; } $sort=array(); for($i=1;$i<=count($filearr);$i++) { $key = sizeof($filearr)-$i; $file = $filearr[$key]; $sort[$i]=$file; } asort($sort); } if(count($filearr)>=1) { if(count($filearr)>1) { ?>
admin tools: <delete all files> | \nYou are running version \nYou can download it from http://webdev.mtnpeak.net')" style="font-size: 9px;"><current version>

"; } if($file_list_allow == "yes") { ?> "; } } } ?>
FILENAME FILE TYPE FILE SIZE FUNCTIONS
= 1073741824) { $show_filesize = number_format(($file_size / 1073741824),2) . " GB"; } elseif ($file_size >= 1048576) { $show_filesize = number_format(($file_size / 1048576),2) . " MB"; } elseif ($file_size >= 1024) { $show_filesize = number_format(($file_size / 1024),2) . " KB"; } elseif ($file_size >= 0) { $show_filesize = $file_size . " bytes"; } else { $show_filesize = "0 bytes"; } echo "$show_filesize"; ?> <view> | <dl><download>"; } ?> | <delete>
 file has been deleted!
»back"; } elseif(($_GET[act]=="view")&&$_GET[file]) { $value_de=base64_decode($_GET[file]); echo""; echo"
 file opened!
»back


If this file did not display, you must disable your popup manager or enable javascript in your browser."; } elseif(($_GET[act]=="dl")&&$_GET[file]) { $value_de=base64_decode($_GET[file]); echo"" . "
Right click here to download \"$value_de\"" . "

" . "IE Users - right click link above & select SAVE TARGET AS" . "
Netscape Users - right click link above & select SAVE LINK AS" . "
Mozilla Users - right click link above & select SAVE LINK TARGET AS" . "
Opera Users - right click link above & select SAVE TARGET AS" . "

»back

"; } if($_GET[act]=="delall") { $handle=opendir($dir); while($file=readdir($handle)) if(($file != ".")&&($file != "..")) @unlink($dir."/".$file); closedir($handle); echo"
 all files have been deleted!
»back"; } } else { echo"

"; $uploadpath=$dir."/"; $source=$_FILES[fileupload][tmp_name]; $fileupload_name=$_FILES[fileupload][name]; $weight=$_FILES[fileupload][size]; for($i=0;$i ERROR: your file type is not allowed (".getlast($fileupload_name)."), or you didn't specify a file to upload.
»back"; } else { if($weight>$file_size_ind) { echo"
 ERROR: please get the file size less than ".$file_size_ind." BYTES (".round(($file_size_ind/1024),2)." KB)
»back"; } else { foreach($_FILES[fileupload] as $key=>$value) { echo"$key : $value
"; } echo "
"; $dest = ''; if ( ($source != 'none') && ($source != '' )) { $dest=$uploadpath.$fileupload_name; if ($dest != '') { if(file_exists($uploadpath.$fileupload_name)) { echo"
 ERROR: that file has already been uploaded before, please choose another file
»back"; } else { if (copy($source,$dest)) { if($_POST[rename]) { $_POST[rename]=replace($_POST[rename]); $exfile=explode(".",$fileupload_name); if(@rename("$dir/$fileupload_name","$dir/$_POST[rename].".getlast($fileupload_name))) { echo"
 file has been renamed to $_POST[rename].".getlast($fileupload_name)."!
"; } } echo"
 file has been uploaded!
»back"; } else { echo"
 ERROR: cannot upload, please chmod the dir to 777
»back"; } } } } } } } } ?>