D7net Mini Sh3LL v1
Current File : C:/Domains/maymaytinson.com/httpdocs/lib/images/../../ckeditor/plugins/wsc/../widget/../mathjax/../videodetector/../zamanager/../autosave/../about/dialogs/../../flash/../btgrid/../div/../image2/dialogs/../../filebrowser/../zamanager/commands/delete_dir.php |
<?php
$dir =$_POST['dir'];
if (!is_dir($dir)) {echo "Please use FILE delete button. Choosen item is NOT Directory. probably you chose file for deletion"; exit;}
$it = new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS);
$files = new RecursiveIteratorIterator($it,
RecursiveIteratorIterator::CHILD_FIRST);
foreach($files as $file) {
if ($file->getFilename() === '.' || $file->getFilename() === '..') {
continue;
}
if ($file->isDir()){
if (! rmdir($file->getRealPath()))echo "you haven't perrmission to delete this directory";
} else {
if(!unlink($file->getRealPath())) echo "you haven't perrmission to delete this files";
}
}
if (!rmdir($dir))echo "you haven't perrmission to delete this directory, or it's still have items inside.Please delete items first";
else echo "Directory was deleted";
AnonSec - 2021 | Recode By D7net