Location: PHPKode > scripts > Particle Gallery > includes/functions_maintenance.php
<?php
// this will delete everything from the cache
function clearcache(){
	$path = "cache";
	$d = dir($path);
	while (false !== ($entry = $d->read())){
		if ($entry!= "." && $entry!= "..") { 
			@unlink($path . "/" . $entry);
		}
	}
	$d->close();
	
	// and return
	return "Cache cleared successfully!";
}

function resetstats(){
	global $db, $dbprefix;
	
	// reset all views to 0
	$sql = "UPDATE " . $dbprefix . "images SET views = 0";
	$db->execute($sql);
	
	// and return
	return "Stats reset successfully!";
}

function flushreports(){
	global $db, $dbprefix;
	
	// delete all reports
	$sql = "DELETE FROM " . $dbprefix . "reported";
	$db->execute($sql);
	
	// and return
	return "Reported images queue flushed successfully!";
}

function destroyeverything(){
	return "Seriously, you didn't think this would be a feature did you? ;).";
}
?>
Return current item: Particle Gallery