2002-04-30 22:22:54 +00:00
|
|
|
<?php
|
|
|
|
|
2002-11-09 20:26:50 +00:00
|
|
|
require_once("db.inc");
|
|
|
|
require_once("util.inc");
|
|
|
|
|
2002-04-30 22:22:54 +00:00
|
|
|
function platform_downloads($platform, $core_app) {
|
2002-12-18 20:37:42 +00:00
|
|
|
$result = mysql_query("select * from app_version where platformid=$platform->id and appid=$core_app->id order by version_num desc");
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2002-11-08 17:21:45 +00:00
|
|
|
if (!$result) return;
|
2002-11-09 20:26:50 +00:00
|
|
|
|
2002-11-26 00:39:58 +00:00
|
|
|
$found = false;
|
|
|
|
|
2002-11-09 20:26:50 +00:00
|
|
|
$download_url = parse_config("<download_url>");
|
2002-09-05 22:19:23 +00:00
|
|
|
echo "<tr><td><b>$platform->name</b></td></tr>\n";
|
2002-12-18 20:37:42 +00:00
|
|
|
if ($app_version = mysql_fetch_object($result)) {
|
2002-11-09 20:26:50 +00:00
|
|
|
$filename = parse_element($app_version->xml_doc, "<name>");
|
|
|
|
if (!$filename) { echo "CAN'T FIND FILENAMEn $app_version->xml_doc\n";}
|
2002-11-08 17:21:45 +00:00
|
|
|
$version = sprintf(
|
2002-12-13 00:12:44 +00:00
|
|
|
"<a href=$download_url/$filename>BOINC core client, <b>version %s %.2f</b></a>",
|
2002-11-26 00:39:58 +00:00
|
|
|
$platform->name,
|
2002-12-13 00:12:44 +00:00
|
|
|
$app_version->version_num/100
|
2002-11-08 17:21:45 +00:00
|
|
|
);
|
2002-11-09 20:26:50 +00:00
|
|
|
echo "<tr><td>$version</td></tr>\n";
|
2002-09-05 22:19:23 +00:00
|
|
|
//$app_version->md5_cksum";
|
2002-11-26 00:39:58 +00:00
|
|
|
$found = true;
|
2002-04-30 22:22:54 +00:00
|
|
|
}
|
2002-11-26 00:39:58 +00:00
|
|
|
if (!$found)
|
|
|
|
echo "<tr><td>No version found</td></tr>";
|
|
|
|
|
2002-11-08 17:21:45 +00:00
|
|
|
mysql_free_result($result);
|
2002-04-30 22:22:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-12-04 19:14:00 +00:00
|
|
|
$authenticator = init_session();
|
2002-04-30 22:22:54 +00:00
|
|
|
db_init();
|
2002-11-08 17:21:45 +00:00
|
|
|
page_head("Download the BOINC client");
|
2002-09-05 22:19:23 +00:00
|
|
|
|
2002-11-26 00:39:58 +00:00
|
|
|
start_table();
|
|
|
|
|
2002-11-15 20:33:27 +00:00
|
|
|
$result = mysql_query("select * from app where name='core client'");
|
2002-04-30 22:22:54 +00:00
|
|
|
$core_app = mysql_fetch_object($result);
|
|
|
|
mysql_free_result($result);
|
|
|
|
|
|
|
|
$result = mysql_query("select * from platform");
|
|
|
|
while ($platform = mysql_fetch_object($result)) {
|
|
|
|
platform_downloads($platform, $core_app);
|
|
|
|
}
|
2002-11-08 17:21:45 +00:00
|
|
|
mysql_free_result($result);
|
2002-11-26 00:39:58 +00:00
|
|
|
echo "</table>\n<p>\n";
|
2002-09-05 22:19:23 +00:00
|
|
|
page_tail();
|
2002-04-30 22:22:54 +00:00
|
|
|
?>
|