Add script to get versions; don't show VBox button if no VBox version

This commit is contained in:
David Anderson 2017-11-13 17:57:22 -08:00
parent 147842c330
commit d6c1b971aa
2 changed files with 21 additions and 7 deletions

10
html/ops/get_versions.php Executable file
View File

@ -0,0 +1,10 @@
#! /usr/bin/env php
<?php
// get XML client version list from BOINC server
file_put_contents(
"../user/versions.xml",
file_get_contents("http://boinc.berkeley.edu/download_all.php?xml=1")
);
?>

View File

@ -179,13 +179,17 @@ function show_download_page($user) {
";
$token = make_login_token($user);
echo "<center><table border=0 cellpadding=20>\n";
table_row(
"",
download_button_vbox($v, $project_id, $token, $user),
"&nbsp;&nbsp;",
download_button($v, $project_id, $token, $user),
""
);
if ($v->vbox_filename) {
table_row(
"",
download_button_vbox($v, $project_id, $token, $user),
"&nbsp;&nbsp;",
download_button($v, $project_id, $token, $user),
""
);
} else {
table_row("", download_button($v, $project_id, $token, $user), "");
}
echo "</table></center>\n";
echo "<p><p>
When the download is finished,