. // output XML summary of app versions require_once("../inc/boinc_db.inc"); require_once("../inc/xml.inc"); function prune($avs) { $out = array(); foreach($avs as $av) { $found = false; foreach ($out as $av2) { if ($av->appid == $av2->appid && $av->plan_class == $av2->plan_class && $av->version_num > $av2->version_num ) { $found = true; break; } } if (!$found) { $out[] = $av; } } return $out; } BoincDb::get(true); xml_header(); echo "\n"; $app_versions = BoincAppVersion::enum("deprecated=0"); $app_versions = prune($app_versions); foreach ($app_versions as $av) { $platform = BoincPlatform::lookup_id($av->platformid); $app = BoincApp::lookup_id($av->appid); echo " $av->create_time $platform->name $app->name $av->version_num $av->plan_class $av->pfc_n $av->pfc_avg $av->pfc_scale $av->expavg_credit $av->expavg_time "; } echo "\n"; ?>