2020-12-26 01:42:23 +08:00
|
|
|
<?php
|
|
|
|
|
ob_start();
|
2021-01-13 19:32:26 +08:00
|
|
|
require_once("../include/bittorrent.php");
|
2020-12-26 01:42:23 +08:00
|
|
|
dbconn();
|
|
|
|
|
|
|
|
|
|
if (get_user_class() < UC_SYSOP) {
|
|
|
|
|
die('forbidden');
|
|
|
|
|
}
|
|
|
|
|
echo "<html><head><title>Do Clean-up</title></head><body>";
|
|
|
|
|
echo "<p>";
|
|
|
|
|
echo "clean-up in progress...please wait<br />";
|
|
|
|
|
ob_flush();
|
|
|
|
|
flush();
|
2021-01-07 17:35:00 +08:00
|
|
|
if (isset($_GET['forceall']) && $_GET['forceall']) {
|
2020-12-26 01:42:23 +08:00
|
|
|
$forceall = 1;
|
|
|
|
|
} else {
|
|
|
|
|
$forceall = 0;
|
|
|
|
|
echo "you may force full clean-up by adding the parameter 'forceall=1' to URL<br />";
|
|
|
|
|
}
|
|
|
|
|
echo "</p>";
|
|
|
|
|
$tstart = getmicrotime();
|
|
|
|
|
require_once("include/cleanup.php");
|
|
|
|
|
print("<p>".docleanup($forceall, 1)."</p>");
|
|
|
|
|
$tend = getmicrotime();
|
|
|
|
|
$totaltime = ($tend - $tstart);
|
|
|
|
|
printf ("Time consumed: %f sec<br />", $totaltime);
|
|
|
|
|
echo "Done<br />";
|
|
|
|
|
echo "</body></html>";
|