2007-03-13 19:33:27 +00:00
|
|
|
<?php
|
2009-01-28 23:45:36 +00:00
|
|
|
|
|
|
|
// The BOINC client uses this to get a current list of projects,
|
|
|
|
// which it does every 14 days.
|
|
|
|
// Don't break backwards compatibility!
|
|
|
|
|
2007-03-13 19:33:27 +00:00
|
|
|
require_once("projects.inc");
|
2009-01-28 23:45:36 +00:00
|
|
|
require_once("account_managers.inc");
|
2009-01-08 19:12:13 +00:00
|
|
|
require_once("get_platforms.inc");
|
2007-03-13 19:33:27 +00:00
|
|
|
|
|
|
|
header('Content-type: text/xml');
|
|
|
|
echo '<?xml version="1.0" encoding="ISO-8859-1" ?>
|
|
|
|
<projects>
|
|
|
|
';
|
|
|
|
|
|
|
|
$proj_list = array();
|
|
|
|
|
|
|
|
shuffle($areas);
|
|
|
|
foreach ($areas as $area) {
|
|
|
|
$area_name = $area[0];
|
|
|
|
$projects = $area[1];
|
|
|
|
shuffle($projects);
|
|
|
|
foreach ($projects as $p) {
|
|
|
|
$np = null;
|
2014-03-16 21:48:03 +00:00
|
|
|
if (array_key_exists(5, $p) && strlen($p[5])) {
|
2007-03-13 19:33:27 +00:00
|
|
|
$np->image = $p[5];
|
|
|
|
}
|
|
|
|
$np->url = $p[1];
|
2009-01-13 19:34:04 +00:00
|
|
|
$np->web_url = $p[1];
|
2014-03-16 21:48:03 +00:00
|
|
|
if (array_key_exists(6, $p) && strlen($p[6])) {
|
2009-01-13 19:34:04 +00:00
|
|
|
$np->web_url = $p[6];
|
|
|
|
}
|
2014-03-16 21:48:03 +00:00
|
|
|
if (array_key_exists(7, $p) && strlen($p[7])) {
|
|
|
|
$np->summary = $p[7];
|
|
|
|
}
|
2007-03-13 19:33:27 +00:00
|
|
|
$np->home = $p[2];
|
|
|
|
$np->general_area = $area_name;
|
|
|
|
$np->specific_area = $p[3];
|
|
|
|
$np->description = $p[4];
|
|
|
|
$np->name = $p[0];
|
|
|
|
|
|
|
|
$proj_list[] = $np;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach($proj_list as $p) {
|
|
|
|
echo " <project>
|
|
|
|
<name>$p->name</name>
|
|
|
|
<url>$p->url</url>
|
|
|
|
<general_area>$p->general_area</general_area>
|
|
|
|
<specific_area>$p->specific_area</specific_area>
|
2011-06-17 19:16:07 +00:00
|
|
|
<description><![CDATA[$p->description]]></description>
|
2007-03-13 19:33:27 +00:00
|
|
|
<home>$p->home</home>
|
|
|
|
";
|
2009-01-13 19:34:04 +00:00
|
|
|
$platforms = get_platforms_cached($p->web_url);
|
2009-01-08 19:12:13 +00:00
|
|
|
if ($platforms) {
|
|
|
|
echo " <platforms>\n";
|
2009-11-17 21:38:44 +00:00
|
|
|
foreach ($platforms as $platform) {
|
|
|
|
if ($platform == 'Unknown') continue;
|
|
|
|
echo " <name>$platform</name>\n";
|
2009-01-08 19:12:13 +00:00
|
|
|
}
|
|
|
|
echo " </platforms>\n";
|
|
|
|
}
|
2009-11-17 21:38:44 +00:00
|
|
|
if (isset($p->image)) {
|
2007-03-13 19:33:27 +00:00
|
|
|
echo " <image>http://boinc.berkeley.edu/images/$p->image</image>
|
2014-03-16 21:48:03 +00:00
|
|
|
";
|
|
|
|
}
|
|
|
|
if (isset($p->summary)) {
|
|
|
|
echo " <summary>$p->summary</summary>
|
2007-03-13 19:33:27 +00:00
|
|
|
";
|
|
|
|
}
|
|
|
|
echo " </project>
|
|
|
|
";
|
|
|
|
}
|
2009-01-28 23:45:36 +00:00
|
|
|
|
|
|
|
foreach ($account_managers as $am) {
|
|
|
|
$name = $am[0];
|
|
|
|
$url = $am[1];
|
|
|
|
$desc = $am[2];
|
|
|
|
$image = $am[3];
|
|
|
|
echo " <account_manager>
|
|
|
|
<name>$name</name>
|
|
|
|
<url>$url</url>
|
|
|
|
<description>$desc</description>
|
|
|
|
<image>http://boinc.berkeley.edu/images/$image</image>
|
|
|
|
</account_manager>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
|
2007-03-13 19:33:27 +00:00
|
|
|
echo "</projects>
|
|
|
|
";
|
|
|
|
|
|
|
|
?>
|