2004-11-15 01:58:30 +00:00
|
|
|
<?php
|
|
|
|
|
2007-03-04 02:30:48 +00:00
|
|
|
// NOTE: the core client fetches download.php?xml=1 every so often;
|
|
|
|
// don't break this!!!
|
|
|
|
|
2004-11-15 01:58:30 +00:00
|
|
|
require_once("docutil.php");
|
2005-05-20 17:42:06 +00:00
|
|
|
require_once("versions.inc");
|
2006-08-03 17:31:40 +00:00
|
|
|
require_once("../html/inc/translation.inc");
|
2005-03-22 22:50:33 +00:00
|
|
|
|
2006-08-02 21:33:19 +00:00
|
|
|
$client_info = $_SERVER['HTTP_USER_AGENT'];
|
2005-05-20 17:42:06 +00:00
|
|
|
|
2006-08-02 21:33:19 +00:00
|
|
|
function latest_version($p) {
|
|
|
|
foreach ($p['versions'] as $i=>$v) {
|
|
|
|
if (!$dev && is_dev($v)) continue;
|
|
|
|
return $v;
|
2005-05-20 17:42:06 +00:00
|
|
|
}
|
2007-05-01 21:21:13 +00:00
|
|
|
foreach ($p['versions'] as $i=>$v) {
|
|
|
|
return $v;
|
|
|
|
}
|
2005-05-20 17:42:06 +00:00
|
|
|
}
|
2004-11-15 01:58:30 +00:00
|
|
|
|
2006-08-02 21:33:19 +00:00
|
|
|
function download_link($pname) {
|
|
|
|
global $platforms;
|
2005-12-09 07:12:56 +00:00
|
|
|
global $url_base;
|
2006-08-02 21:33:19 +00:00
|
|
|
$p = $platforms[$pname];
|
|
|
|
$v = latest_version($p);
|
|
|
|
$file = $v['file'];
|
|
|
|
$long_name = $p['name'];
|
|
|
|
$num = $v['num'];
|
2005-05-20 17:42:06 +00:00
|
|
|
$path = "dl/$file";
|
2005-12-09 07:12:56 +00:00
|
|
|
$url = $url_base.$file;
|
2008-08-16 20:59:53 +00:00
|
|
|
$dlink = "<a href=\"$url\">$file</a>";
|
2005-05-20 17:42:06 +00:00
|
|
|
$s = number_format(filesize($path)/1000000, 2);
|
2005-03-05 23:12:31 +00:00
|
|
|
|
2006-12-01 00:38:36 +00:00
|
|
|
echo "
|
2008-10-17 16:40:15 +00:00
|
|
|
<table cellpadding=10><tr><td class=heading>
|
2008-08-16 20:59:53 +00:00
|
|
|
<a href=\"$url\"><font size=4><u>".tra("Download BOINC")."</u></font></a>
|
2006-08-03 17:31:40 +00:00
|
|
|
<br>".
|
2008-05-20 00:11:28 +00:00
|
|
|
sprintf(tra("%s for %s (%s MB)"), $num, $long_name, $s )."
|
2006-08-02 21:33:19 +00:00
|
|
|
</td></tr> </table>
|
2005-05-20 17:42:06 +00:00
|
|
|
";
|
2008-01-15 18:43:00 +00:00
|
|
|
if ($pname == 'linux'||$pname == 'linuxx64') {
|
2008-04-01 15:08:47 +00:00
|
|
|
show_linux_info();
|
2006-12-01 00:38:36 +00:00
|
|
|
}
|
2005-03-05 23:12:31 +00:00
|
|
|
}
|
|
|
|
|
2006-08-02 21:33:19 +00:00
|
|
|
function link_row($pname) {
|
|
|
|
echo "<tr><td>";
|
|
|
|
if ($pname=='win') {
|
2008-08-16 20:59:53 +00:00
|
|
|
echo "<img src=\"images/ico-win.png\" alt=\"Windows icon\"> <b>Windows</b>";
|
2006-08-02 21:33:19 +00:00
|
|
|
} else if ($pname=='mac') {
|
2008-08-16 20:59:53 +00:00
|
|
|
echo "<img src=\"images/ico-osx-uni.png\" alt=\"Mac icon\"> <b>Mac OS X</b>";
|
2006-08-02 21:33:19 +00:00
|
|
|
} else if ($pname=='linux') {
|
2008-08-16 20:59:53 +00:00
|
|
|
echo "<img src=\"images/ico-tux.png\" alt=\"Linux icon\"> <b>Linux/x86</b>";
|
2005-10-23 07:19:03 +00:00
|
|
|
}
|
2006-08-02 21:33:19 +00:00
|
|
|
echo "</td><td>";
|
2006-12-01 00:38:36 +00:00
|
|
|
download_link($pname);
|
2006-08-02 21:33:19 +00:00
|
|
|
echo "</td></tr>
|
|
|
|
";
|
2005-10-23 07:19:03 +00:00
|
|
|
}
|
|
|
|
|
2006-08-03 16:39:57 +00:00
|
|
|
$apps = array(
|
|
|
|
array('classic.jpg', 180, 143),
|
|
|
|
array('cpdn_200.jpg', 200, 147),
|
|
|
|
array('eah_200.png', 200, 150),
|
2006-08-04 21:39:03 +00:00
|
|
|
array('rosetta_at_home.jpg', 200, 150),
|
|
|
|
array('qah.200x150.png', 200, 150),
|
2006-08-03 16:39:57 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
function show_pictures() {
|
|
|
|
global $apps;
|
|
|
|
shuffle($apps);
|
|
|
|
$a0 = $apps[0];
|
|
|
|
$a1 = $apps[1];
|
|
|
|
$f0 = $a0[0];
|
|
|
|
$f1 = $a1[0];
|
|
|
|
echo "
|
|
|
|
<div style=\"max-height: 300px\">
|
2008-08-16 20:59:53 +00:00
|
|
|
<img src=\"images/mgrwork.png\" alt=\"BOINC manager\"><br>
|
2006-08-03 16:39:57 +00:00
|
|
|
<div style=\"position:relative; top:-80px; left:30px\">
|
2008-08-16 20:59:53 +00:00
|
|
|
<img src=\"images/$f0\" alt=\"BOINC project\"><br>
|
2006-08-03 16:39:57 +00:00
|
|
|
</div>
|
|
|
|
<div style=\"position:relative; top:-160px; left:70px\">
|
2008-08-16 20:59:53 +00:00
|
|
|
<img src=\"images/$f1\" alt=\"BOINC project\"><br>
|
2006-08-03 16:39:57 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
|
2006-08-02 21:33:19 +00:00
|
|
|
function show_download($pname) {
|
|
|
|
echo "
|
2006-08-03 16:39:57 +00:00
|
|
|
<table cellpadding=10><tr><td valign=top>
|
2008-05-20 00:11:28 +00:00
|
|
|
".tra("BOINC is a program that lets you donate your idle computer time to science projects like SETI@home, Climateprediction.net, Rosetta@home, World Community Grid, and many others. <p> After installing BOINC on your computer, you can connect it to as many of these projects as you like.").
|
|
|
|
"<p>"
|
2006-08-03 17:31:40 +00:00
|
|
|
;
|
2005-10-23 07:19:03 +00:00
|
|
|
if ($pname) {
|
2006-12-01 00:38:36 +00:00
|
|
|
download_link($pname);
|
2005-10-23 07:19:03 +00:00
|
|
|
} else {
|
2006-08-02 21:33:19 +00:00
|
|
|
echo "<table cellpadding=8>
|
2005-12-09 07:12:56 +00:00
|
|
|
";
|
2006-08-02 21:33:19 +00:00
|
|
|
link_row('win');
|
2007-05-01 21:21:13 +00:00
|
|
|
link_row('winx64');
|
2006-08-02 21:33:19 +00:00
|
|
|
link_row('mac');
|
|
|
|
link_row('linux');
|
2008-01-15 18:43:00 +00:00
|
|
|
link_row('linuxx64');
|
|
|
|
link_row('linuxcompat');
|
2006-08-02 21:33:19 +00:00
|
|
|
echo "</table>
|
2005-10-23 07:19:03 +00:00
|
|
|
";
|
2005-05-20 17:42:06 +00:00
|
|
|
}
|
|
|
|
echo "
|
|
|
|
<p>
|
2008-08-16 20:59:53 +00:00
|
|
|
<a href=\"wiki/System_requirements\"><span class=nobr>".tra("System requirements")."</span></a>
|
|
|
|
| <a href=\"wiki/Release_Notes\"><span class=nobr>".tra("Release notes")."</span></a>
|
|
|
|
| <a href=\"wiki/BOINC_Help\"><span class=nobr>".tra("Help")."</span></a>
|
2006-08-02 21:33:19 +00:00
|
|
|
";
|
|
|
|
if ($pname) {
|
2008-08-16 20:59:53 +00:00
|
|
|
//echo " | <a href=\"download.php?all_platforms=1\"><span class=nobr>".tra("Other systems")."</span></a>
|
|
|
|
echo " | <a href=download_all.php><span class=nobr>".tra("All versions")."</span></a>
|
2006-08-02 21:33:19 +00:00
|
|
|
";
|
|
|
|
} else {
|
2008-08-16 20:59:53 +00:00
|
|
|
echo " | <a href=download_all.php><span class=nobr>".tra("All versions")."</span></a>
|
2006-08-03 17:31:40 +00:00
|
|
|
<p>"
|
2008-05-20 00:11:28 +00:00
|
|
|
.tra("If your computer is not of one of the above types, you can")."
|
2006-08-03 04:07:18 +00:00
|
|
|
<ul>
|
2008-05-20 00:11:28 +00:00
|
|
|
<li> ".sprintf(tra("%s make your own client software %s or"), "<a href=anonymous_platform.php>", "</a>")."
|
|
|
|
<li> ".sprintf(tra("%s download executables from a third-party site %s (available for Solaris/Opteron, Linux/Opteron, Linux/PPC, HP-UX, and FreeBSD, and others)."), "<a href=download_other.php>", "</a>")."
|
2006-08-03 04:07:18 +00:00
|
|
|
</ul>
|
2006-08-02 21:33:19 +00:00
|
|
|
";
|
|
|
|
}
|
2006-08-03 16:39:57 +00:00
|
|
|
echo "
|
2008-08-16 20:59:53 +00:00
|
|
|
| <a href=\"trac/wiki/VersionHistory\">Version history</a>
|
2006-08-03 16:39:57 +00:00
|
|
|
<p>
|
|
|
|
</td><td valign=top>
|
|
|
|
";
|
|
|
|
show_pictures();
|
|
|
|
echo "
|
|
|
|
</td>
|
|
|
|
</tr></table>
|
2005-05-20 17:42:06 +00:00
|
|
|
";
|
2005-03-22 22:50:33 +00:00
|
|
|
}
|
2005-05-20 17:42:06 +00:00
|
|
|
|
2006-08-02 21:33:19 +00:00
|
|
|
if ($_GET['xml']) {
|
2006-08-03 04:07:18 +00:00
|
|
|
$args = strstr($_SERVER['REQUEST_URI'], '?');
|
|
|
|
Header("Location: download_all.php$args");
|
2006-08-02 21:33:19 +00:00
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
2008-05-20 00:11:28 +00:00
|
|
|
page_head(tra("BOINC: compute for science"));
|
2006-08-02 21:33:19 +00:00
|
|
|
|
|
|
|
if ($_GET['all_platforms']) {
|
|
|
|
show_download(null);
|
|
|
|
} else if (strstr($client_info, 'Windows')) {
|
2007-06-19 16:00:59 +00:00
|
|
|
if (strstr($client_info, 'Win64')||strstr($client_info, 'WOW64')) {
|
2007-05-01 21:21:13 +00:00
|
|
|
show_download('winx64');
|
|
|
|
} else {
|
|
|
|
show_download('win');
|
|
|
|
}
|
2006-08-02 21:33:19 +00:00
|
|
|
} else if (strstr($client_info, 'Mac')) {
|
|
|
|
show_download('mac');
|
|
|
|
} else if (strstr($client_info, 'Linux')) {
|
2008-01-15 18:43:00 +00:00
|
|
|
if (strstr($client_info, 'x86_64')) {
|
|
|
|
show_download('linuxx64');
|
|
|
|
} else {
|
|
|
|
show_download('linux');
|
|
|
|
}
|
2006-08-02 21:33:19 +00:00
|
|
|
} else {
|
|
|
|
show_download(null);
|
|
|
|
}
|
2008-01-15 18:43:00 +00:00
|
|
|
|
2006-08-08 20:32:37 +00:00
|
|
|
page_tail(true);
|
2006-08-02 21:33:19 +00:00
|
|
|
|
2004-11-15 01:58:30 +00:00
|
|
|
?>
|