read())) { if ($entry == '.' || $entry == '..') { continue; } $entry = $dir . '/' . $entry; if (is_dir($entry)) { if (!full_rmdir($entry)) { return FALSE; } continue; } if (!@unlink($entry)) { $d->close(); return FALSE; } } $d->close(); rmdir($dir); return TRUE; } // Vars $ajaxdeleted = false; $elements = array(); $locked_by_context = array('index.php', 'config.ini.php'); // If we are storing the media in the data directory (this is the // default for the media firewall), then don't delete it. if ( $USE_MEDIA_FIREWALL && $MEDIA_FIREWALL_ROOTDIR==$INDEX_DIRECTORY && (substr($MEDIA_DIRECTORY, 0, 1)!='.') ) { $locked_by_context[]=trim($MEDIA_DIRECTORY, '/'); } print_header(i18n::translate('Cleanup data directory')); echo '

', '

', i18n::translate('Cleanup data directory'), '

'; echo i18n::translate('To delete a file or subdirectory from the data directory drag it to the wastebasket or select its checkbox. Click the Delete button to permanently remove the indicated files.'), '

', i18n::translate('Files marked with %s are required for proper operation and cannot be removed.', ''), '
', i18n::translate('Files marked with %s have important settings or pending change data and should only be deleted if you are sure you know what you are doing.', ''); //post back if(isset($_REQUEST["to_delete"])) { echo "", i18n::translate('Deleted files:'), "
"; foreach($_REQUEST["to_delete"] as $k=>$v) { if (is_dir($INDEX_DIRECTORY.$v)) { full_rmdir($INDEX_DIRECTORY.$v); } elseif (file_exists($INDEX_DIRECTORY.$v)) { unlink($INDEX_DIRECTORY.$v); } echo "", $v, "
"; } } require_once WT_ROOT.'js/prototype.js.htm'; require_once WT_ROOT.'js/scriptaculous.js.htm'; ?>
    read())) { $entryList[] = $entry; } sort($entryList); foreach ($entryList as $entry) { //echo $entry, "\n"; if ($entry{0} != '.') { if (in_array($entry, $locked_by_context)) { print "
  • "; print "\"\"  "; print "".$entry.""; } else{ print "
  • "; print "\n"; print $entry; $elements[] = "li_".$entry; } print "
  • "; } } ?>
close(); print "
"; print ""; print "
"; if (isset($WT_IMAGES["trashcan"]["medium"])) print "\"\""; else print "\"\""; print "
    "; print "
"; print "
"; ?>