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("readme.txt", "index.php", "gedcoms.php", 'config.ini.php'); // If we are storing the media in the index 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 Index directory')); echo "

", i18n::translate('Cleanup Index directory'), "

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

Files marked with are required for proper operation and cannot be removed.
Files marked with 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'; ?>
    $ged_name){ $file=get_privacy_file($ged_id); if ($file!='privacy.php') { $locked_by_context[] = str_replace($INDEX_DIRECTORY, "", $file); } $file=get_config_file($ged_id); if ($file!='config_gedcom.php') { $locked_by_context[] = str_replace($INDEX_DIRECTORY, "", $file); } } $dir = dir($INDEX_DIRECTORY); $path = $INDEX_DIRECTORY; // snag our path $entryList = array(); while (false !== ($entry = $dir->read())) { $entryList[] = $entry; } sort($entryList); foreach ($entryList as $entry) { //echo $entry, "\n"; if ($entry{0} != '.') { if ($ged_id=get_id_from_gedcom($entry)) { print "
  • "; print "\"\"  "; print "".$entry.""; print "  ".i18n::translate('Associated files:')."  ".str_replace($path, "", get_gedcom_setting($ged_id, 'privacy')); print "  ".str_replace($path, "", get_gedcom_setting($ged_id, 'config')).""; } else if (in_array($entry, $locked_by_context)) { print "
  • "; print "\"\"  "; print "".$entry.""; } else{ print "
  • "; print "\n"; print $entry; $element[] = "li_".$entry; } print "
  • "; } } ?>
close(); print "
"; print ""; print "
"; if (isset($WT_IMAGES["trashcan"]["medium"])) print "\"\""; else print "\"\""; print "
    "; print "
"; print "
"; ?>