if (@phpversion() < '4.1.0') {
$_FILE = $HTTP_POST_FILES;
$_GET = $HTTP_GET_VARS;
$_POST = $HTTP_POST_VARS;
}
clearstatcache();
error_reporting(E_ALL & ~E_NOTICE);
$fum_vers = "1.3"; # do not edit this line, the script will not work!!!
$fum_info_full = "File Upload Manager v$fum_vers";
function authDo($auth_userToCheck, $auth_passToCheck)
{
global $auth_usern, $auth_passw;
$auth_encodedPass = md5($auth_passw);
if ($auth_userToCheck == $auth_usern && $auth_passToCheck == $auth_encodedPass) {
$auth_check = TRUE;
} else {
$auth_check = FALSE;
}
return $auth_check;
}
if (isset($logout)) {
setcookie ('fum_user', "",time()-3600);
setcookie ('fum_pass', "",time()-3600);
}
if (isset($login)) {
$auth_password_en = md5($auth_formPass);
$auth_username_en = $auth_formUser;
if (authDo($auth_username_en, $auth_password_en)) {
setcookie ('fum_user', $auth_username_en,time()+3600);
setcookie ('fum_pass', $auth_password_en,time()+3600);
$auth_msg = "Authentication successful! The cookies have been set.
".
$auth_msg . "Your password (MD5 encrypted) is: $auth_password_en";
} else {
$auth_msg = "Authentication error!";
}
}
if (($_GET[act]=="dl")&&$_GET[file])
{
if ($auth_ReqPass != 1 || ($auth_ReqPass == 1 && isset($fum_user) && !isset($logout))) {
if ($auth_ReqPass != 1 || ($auth_ReqPass == 1 && authDo($fum_user, $fum_pass))) {
$value_de=base64_decode($_GET[file]);
$dl_full=$dir_store."/".$value_de;
$dl_name=$value_de;
if (!file_exists($dl_full))
{
echo"ERROR: Cannot download file, it does not exist.
�back";
exit();
}
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=$dl_name");
header("Content-Length: ".filesize($dl_full));
header("Accept-Ranges: bytes");
header("Pragma: no-cache");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-transfer-encoding: binary");
@readfile($dl_full);
exit();
}
}
}
function getlast($toget)
{
$pos=strrpos($toget,".");
$lastext=substr($toget,$pos+1);
return $lastext;
}
function replace($o)
{
$o=str_replace("/","",$o);
$o=str_replace("\\","",$o);
$o=str_replace(":","",$o);
$o=str_replace("*","",$o);
$o=str_replace("?","",$o);
$o=str_replace("<","",$o);
$o=str_replace(">","",$o);
$o=str_replace("\"","",$o);
$o=str_replace("|","",$o);
return $o;
}
?>
File Name | Type | File Size | Functions |
echo strtoupper(getlast($value)); ?> | $value_full = $dir_store."/".$value; $file_size = filesize($value_full); if ($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"; ?> | <��Ŵ> | if ($file_del_allow == 1) { echo"<dl>"; } else { echo"<download>"; } if ($file_del_allow == 1) { echo" | <delete>"; } else { echo" "; } ?> |
Authentication error
" . "Delete cookies and login again
"); } } else { if (!isset($login) || isset($relogin)) { ?> echo ($title) ? ($title) : ("File Upload Manager"); ?> - AuthenticationYou must have cookies enabled in your browser to continue. |
$auth_msg
" . "You'll be redirected in 2 seconds!
"); } } ?>
|