$x $y "; } function version_url($file) { global $url_base; return $url_base.$file; // if (is_dev($v)) { // return "http://boinc.berkeley.edu/dl/$file"; // } else { // return $url_base.$file; // } } function show_detail($v) { $num = $v["num"]; $file = $v["file"]; $status = $v["status"]; $path = "dl/$file"; $url = version_url($v['file']); $dlink = "$file"; $s = number_format(filesize($path)/1000000, 2); $date = $v["date"]; $type = type_text($v["type"]); list_start(); dl_item("File (click to download)", "$dlink ($s MB)"); dl_item("Version number", $num); dl_item("Release date", $date); list_end(); } function show_version_xml($v, $p) { $name = $p["name"]; $dbname = $p["dbname"]; $num = $v["num"]; $file = $v["file"]; $status = $v["status"]; $path = "dl/$file"; $url = version_url($v['file']); $dlink = "$file"; $s = number_format(filesize($path)/1000000, 2); $date = $v["date"]; $type = type_text($v["type"]); echo " $name $dbname $status $date $num $url $file $s $type "; } function show_version($pname, $i, $v) { if (!$v) return; $num = $v["num"]; $file = $v["file"]; $status = $v["status"]; if (is_dev($v)) { $status = $status."
(MAY BE UNSTABLE - USE ONLY FOR TESTING) "; } $path = "dl/$file"; $s = number_format(filesize($path)/1000000, 2); $date = $v["date"]; $type = $v["type"]; $type_text = type_text($type); $url = version_url($v['file']); $link = ""; if (array_key_exists('vbox_file', $v)) { $vbox_file = $v['vbox_file']; $vbox_version = $v['vbox_version']; $vbox_url = version_url($vbox_file); $vbox_path = "dl/$vbox_file"; $vbox_size = number_format(filesize($vbox_path)/1000000, 2); $link = "Download BOINC + VirtualBox $vbox_version ($vbox_size MB)
"; } $link .= "Download ($s MB)"; echo " $num $status $link $date "; } function show_platform($short_name, $p, $dev) { global $min_version; global $max_version; $long_name = $p["name"]; $description = $p["description"]; if (array_key_exists('url', $p)) { $url = $p["url"]; $long_name .= " details"; } list_bar($long_name, $description); foreach ($p["versions"] as $i=>$v) { if ($min_version && version_compare($v['num'], $min_version, "<")) continue; if ($max_version && version_compare($v['num'], $max_version, ">")) continue; if (!$dev && is_dev($v)) continue; show_version($short_name, $i, $v); } } function show_platform_xml($short_name, $p, $dev) { foreach ($p["versions"] as $i=>$v) { if (!$dev && is_dev($v)) continue; // show only those builds that have been around for over three days. // Gives us time to address any showstoppers // found by the early adopters if (!$dev && ((time() - strtotime($v["date"])) <= 86400*3)) continue; show_version_xml($v, $p); } } // show details on a version if URL indicates // if ($pname && $version) { $p = $platforms[$pname]; if (!$p) { boinc_error_page("platform not found"); } $long_name = $p["name"]; $va = $p["versions"]; foreach ($va as $v) { if ($v['num'] == $version && $type_name==$v['type']) { page_head("BOINC version $version for $long_name"); show_detail($v); page_tail(); exit(); } } boinc_error_page( "version not found\n"); } if ($xml) { header('Content-type: text/xml'); echo " "; if (FALSE === strpos($client_info, '6.8.')) { foreach($platforms as $short_name=>$p) { show_platform_xml($short_name, $p, $dev); } } echo " "; } else { if ($pname) { $p = $platforms[$pname]; $name = $p['name']; page_head("Download BOINC client software for $name"); echo ""; show_platform($pname, $p, $dev); list_end(); } else { page_head("Download BOINC client software"); echo "
"; foreach($platforms as $short_name=>$p) { show_platform($short_name, $p, $dev); } list_end(); echo "

Other platforms

If your computer is not of one of these types, you can "; } echo "
The information on this page can be restricted by platform and/or version number, or presented in XML format. "; page_tail(); } ?>