#!/usr/bin/env php userid); if (!$user) { echo "no user for team $team->id\n"; exit(1); } if ($user->teamid != $team->userid) { echo "Founder is not member of $team->name\n"; return; } 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, " ".htmlspecialchars($team->name)." ".htmlspecialchars($team->url)." $team->type ".htmlspecialchars($team->name_html)." ".htmlspecialchars($team->description)." $team->country $team->id $user_email_munged ".htmlspecialchars($user->name)." ".htmlspecialchars($user->country)." ".htmlspecialchars($user->postal_code)." ".htmlspecialchars($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", "/home/boincadm/boinc/doc/boinc_teams.xml"); } main(); ?>