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;
|
2005-05-20 17:42:06 +00:00
|
|
|
$dlink = "<a href=$url>$file</a>";
|
|
|
|
$s = number_format(filesize($path)/1000000, 2);
|
2005-03-05 23:12:31 +00:00
|
|
|
|
2006-12-01 00:38:36 +00:00
|
|
|
echo "
|
2006-08-02 21:33:19 +00:00
|
|
|
<table border=4 cellpadding=10><tr><td bgcolor=ccccff>
|
2006-08-03 17:31:40 +00:00
|
|
|
<a href=$url><font size=4><u>".tr(DL_DOWNLOAD)."</u></font></a>
|
|
|
|
<br>".
|
|
|
|
sprintf(tr(DL_VERSION_LNAME_SIZE), $num, $long_name, $s )."
|
2006-08-02 21:33:19 +00:00
|
|
|
</td></tr> </table>
|
2005-05-20 17:42:06 +00:00
|
|
|
";
|
2006-12-01 00:38:36 +00:00
|
|
|
if ($pname == 'linux') {
|
|
|
|
echo "
|
|
|
|
<p>
|
|
|
|
Note: BOINC may be available as a package for
|
2007-07-13 17:25:47 +00:00
|
|
|
for your particular Linux distribution.
|
|
|
|
Check this first before downloading from this page.
|
|
|
|
Example package names:
|
|
|
|
<ul>
|
|
|
|
<li> Gentoo: sci-misc/boinc
|
|
|
|
<li> Debian and Ubuntu: boinc-client, boinc-manager
|
|
|
|
(more info <a href=http://wiki.debian.org/BOINC>here</a>).
|
|
|
|
Also boinc-dev (for project developers).
|
|
|
|
</ul>
|
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') {
|
|
|
|
echo "<img src=images/ico-win.png> <b>Windows</b>";
|
|
|
|
} else if ($pname=='mac') {
|
|
|
|
echo "<img src=images/ico-osx-uni.png> <b>Mac OS X</b>";
|
|
|
|
} else if ($pname=='linux') {
|
2006-08-03 16:39:57 +00:00
|
|
|
echo "<img src=images/ico-tux.png> <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\">
|
|
|
|
<img src=images/mgrwork.png><br>
|
|
|
|
<div style=\"position:relative; top:-80px; left:30px\">
|
|
|
|
<img src=images/$f0><br>
|
|
|
|
</div>
|
|
|
|
<div style=\"position:relative; top:-160px; left:70px\">
|
|
|
|
<img src=images/$f1><br>
|
|
|
|
</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>
|
2006-08-03 17:31:40 +00:00
|
|
|
".tr(DL_WHATS_BOINC)
|
|
|
|
;
|
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');
|
|
|
|
echo "</table>
|
2005-10-23 07:19:03 +00:00
|
|
|
";
|
2005-05-20 17:42:06 +00:00
|
|
|
}
|
|
|
|
echo "
|
|
|
|
<p>
|
2007-07-13 17:25:47 +00:00
|
|
|
<a href=trac/wiki/SystemRequirements><nobr>".tr(DL_SYSTEMREQ)."</nobr></a>
|
|
|
|
| <a href=trac/wiki/ReleaseNotes><nobr>".tr(DL_RELNOTES)."</nobr></a>
|
|
|
|
| <a href=trac/wiki/TroubleshootClient><nobr>".tr(DL_TROUBLE)."</nobr></a>
|
2006-08-02 21:33:19 +00:00
|
|
|
";
|
|
|
|
if ($pname) {
|
2006-10-22 01:46:33 +00:00
|
|
|
//echo " | <a href=download.php?all_platforms=1><nobr>".tr(DL_OTHERSYS)."</nobr></a>
|
|
|
|
echo " | <a href=download_all.php></nobr>".tr(DL_ALLVERSIONS)."</nobr></a>
|
2006-08-02 21:33:19 +00:00
|
|
|
";
|
|
|
|
} else {
|
2006-08-03 17:31:40 +00:00
|
|
|
echo " | <a href=download_all.php></nobr>".tr(DL_ALLVERSIONS)."</nobr></a>
|
|
|
|
<p>"
|
|
|
|
.tr(DL_IF_OTHERTYPES)."
|
2006-08-03 04:07:18 +00:00
|
|
|
<ul>
|
2006-08-03 17:31:40 +00:00
|
|
|
<li> ".sprintf(tr(DL_MAKEYOUROWN),"<a href=anonymous_platform.php>","</a>")."
|
|
|
|
<li> ".sprintf(tr(DL_DL_FROM3RDP),"<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 "
|
|
|
|
<p>
|
|
|
|
</td><td valign=top>
|
|
|
|
";
|
|
|
|
show_pictures();
|
|
|
|
echo "
|
|
|
|
</td>
|
|
|
|
</tr></table>
|
|
|
|
<hr>
|
|
|
|
<font size=-2>
|
2006-08-03 17:31:40 +00:00
|
|
|
".tr(DL_MIRRORS)."
|
2006-08-03 16:39:57 +00:00
|
|
|
</font>
|
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();
|
|
|
|
}
|
|
|
|
|
2006-08-03 17:31:40 +00:00
|
|
|
page_head(tr(DL_DOWNLOAD_TITLE));
|
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')) {
|
|
|
|
show_download('linux');
|
|
|
|
} else {
|
|
|
|
show_download(null);
|
|
|
|
}
|
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
|
|
|
?>
|