userid); if (!$user) { echo "no user for team $team->id\n"; exit(1); } if (!$user->email_validated) { echo "the founder of $team->name, $user->email_addr, is not validated\n"; return; } $user_email_munged = str_rot13($user->email_addr); fwrite($f, " $team->name $team->url $team->type $team->name_html $team->description $team->country $team->id $user_email_munged $user->name $user->country $user->postal_code $user->url " ); } function main() { $f = fopen("temp.xml", "w"); $result = mysql_query("select * from team"); fwrite($f, "\n"); while ($team=mysql_fetch_object($result)) { handle_team($team, $f); } fwrite($f, "\n"); fclose($f); rename("temp.xml", "boinc_teams.xml"); } main(); ?>