function rebuildZones()
{
$zones = $this->db->Execute("SELECT domain FROM domains ORDER BY domain");
while ($row = $zones->fetchRow()) {
print "Rebuilding {$row['domain']}......";
flush();
$this->writeZone($row['domain']);
print "done\n";
flush();
}
$this->reloadZone();
}