\n";
}
function xml_error($msg) {
xml_header();
echo "$msg\n";
exit();
}
function show_host_xml($host) {
echo "
$host->id
$host->create_time
$host->rpc_seqno
$host->host_cpid
$host->total_credit
$host->expavg_credit
$host->expavg_time
$host->domain_name
$host->p_ncpus
$host->p_vendor
$host->p_model
$host->p_fpops
$host->p_iops
$host->os_name
$host->os_version
$host->venue
";
}
function show_user_xml($user, $show_hosts) {
xml_header();
$cpid = md5($user->cross_project_id.$user->email_addr);
echo "
$user->id
$cpid
$user->create_time
".htmlspecialchars($user->name)."
$user->country
$user->total_credit
$user->expavg_credit
$user->expavg_time
$user->teamid
".htmlspecialchars($user->url)."
$user->has_profile
";
if ($show_hosts) {
$result = mysql_query("select * from host where userid=$user->id");
echo " $user->venue\n";
while ($host = mysql_fetch_object($result)) {
show_host_xml($host);
}
}
echo"
";
}
function show_team_member($user, $show_email) {
$cpid = md5($user->cross_project_id.$user->email_addr);
echo "
$user->id
";
if ($show_email) {
echo "$user->email_addr
";
}
echo "$cpid
$user->create_time
".htmlspecialchars($user->name)."
$user->country
$user->total_credit
$user->expavg_credit
$user->expavg_time
".htmlspecialchars($user->url)."
$user->has_profile
";
}
function show_team_xml($team) {
echo "
$team->id
".htmlspecialchars($team->name)."
$team->country
";
}
?>