File Manager
Pro
/data/web/virtuals/8819/virtual/www/mp3/public/includes
PHP 7.4.33
Linux
/data/web/virtuals/8819/virtual/www/mp3/public/includes/process.php
4.4 KB
0640
Back
<?php header('Cache-Control: max-age=900 '); /***************************************************** File Upload Form Submit ******************************************************/ if (isset($_POST['file-upload'])) { $fu = $_POST['file-upload-path']; ##WRITE TO CONFIG FILE $selected_file = 'config/config.php'; $line = '15'; $text = 'remotePath:'."'".$fu."'".','; $file_array = file($selected_file); $file_array[$line - 1] = $text."\n"; $file_content = implode("", $file_array); $f = fopen($selected_file, 'w+') or die('unable to open'); fwrite($f, $file_content); fclose($f); ##WRITE TO PATHS FILE $pf = 'config/paths.txt'; $row = '1'; $pft = $fu; $file_array = file($pf); $file_array[$row - 1] = $pft."\n"; $file_content = implode("", $file_array); $f = fopen($pf, 'w+') or die('unable to open'); fwrite($f, $file_content); fclose($f); } /***************************************************** Remote Upload Form Submit ******************************************************/ if (isset($_POST['remote-upload'])) { $ru = $_POST['remote-upload-path']; ##WRITE TO CONFIG FILE $selected_file = 'config/config.php'; $line = '42'; $text = 'define("DownloadFolder", "' . $ru . '")'.";"; $file_array = file($selected_file); $file_array[$line - 1] = $text."\n"; $file_content = implode("", $file_array); $f = fopen($selected_file, 'w+') or die('unable to open'); fwrite($f, $file_content); fclose($f); ##WRITE TO PATHS FILE $pf = 'config/paths.txt'; $row = '2'; $pft = $ru; $file_array = file($pf); $file_array[$row - 1] = $pft."\n"; $file_content = implode("", $file_array); $f = fopen($pf, 'w+') or die('unable to open'); fwrite($f, $file_content); fclose($f); } /***************************************************** Mass Delete Form Submit ******************************************************/ if (isset($_POST['mass-delete'])) { $md = $_POST['mass-delete-path']; ##WRITE TO CONFIG FILE $selected_file = 'includes/functions.php'; $line = '2'; $text = '$folderpath ='."'"."../".$md."';" ; $file_array = file($selected_file); $file_array[$line - 1] = $text."\n"; $file_content = implode("", $file_array); $f = fopen($selected_file, 'w+') or die('unable to open'); fwrite($f, $file_content); fclose($f); ##WRITE TO PATHS FILE $pf = 'config/paths.txt'; $row = '3'; $pft = $md; $file_array = file($pf); $file_array[$row - 1] = $pft."\n"; $file_content = implode("", $file_array); $f = fopen($pf, 'w+') or die('unable to open'); fwrite($f, $file_content); fclose($f); } /***************************************************** File Manager Form Submit ******************************************************/ if (isset($_POST['file-manager'])) { $rp = $_POST['root_path']; $ru = $_POST['root_url']; ##Root_Path WRITE TO CONFIG FILE $selected_file = 'config/fm.config.php'; $line = '16'; $text = '$root_path = '."'".$rp."'".';'; $file_array = file($selected_file); $file_array[$line - 1] = $text."\n"; $file_content = implode("", $file_array); $f = fopen($selected_file, 'w+') or die('unable to open'); fwrite($f, $file_content); fclose($f); ##Root_Url WRITE TO CONFIG FILE $selected_file = 'config/fm.config.php'; $line = '25'; $text = '$root_url = '."'".$ru."'".';'; $file_array = file($selected_file); $file_array[$line - 1] = $text."\n"; $file_content = implode("", $file_array); $f = fopen($selected_file, 'w+') or die('unable to open'); fwrite($f, $file_content); fclose($f); ##Root_Path WRITE TO PATHS FILE $pf = 'config/paths.txt'; $row = '4'; $pft = $rp; $file_array = file($pf); $file_array[$row - 1] = $pft."\n"; $file_content = implode("", $file_array); $f = fopen($pf, 'w+') or die('unable to open'); fwrite($f, $file_content); fclose($f); ##Root_Url WRITE TO PATHS FILE $pf = 'config/paths.txt'; $row = '5'; $pft = $ru; $file_array = file($pf); $file_array[$row - 1] = $pft."\n"; $file_content = implode("", $file_array); $f = fopen($pf, 'w+') or die('unable to open'); fwrite($f, $file_content); fclose($f); } ?>
Cancel
Download
Save changes
File Manager Pro · single-file PHP 7.4.33 on Linux · paths encrypted in URL (AES-256-CTR)