. // web interfance for managing app versions require_once('../inc/util_ops.inc'); function update() { $id = post_int("id"); $av = BoincAppVersion::lookup_id($id); if (!$av) admin_error_page("no such app version"); $n = post_str("beta", true) ? 1 : 0; $av->update("beta=$n"); $n = post_str("deprecated", true) ? 1 : 0; $av->update("deprecated=$n"); $n = post_int("min_core_version"); $av->update("min_core_version=$n"); $n = post_int("max_core_version"); $av->update("max_core_version=$n"); $n = post_str("plan_class"); $av->update("plan_class='$n'"); echo "Updated app version $id. This change will take effect when you restart the project.
";
}
function show_form($all) {
if ($all) {
echo "Don't show deprecated app versions\n";
} else {
echo "Show deprecated app versions\n";
}
$_platforms = BoincPlatform::enum("");
foreach ($_platforms as $platform) {
$platforms[$platform->id] = $platform;
}
$_apps = BoincApp::enum("");
foreach ($_apps as $app) {
$apps[$app->id] = $app;
}
start_table("");
table_header(
"ID #
click for details
", "Applicationclick for details
", "Version", "Platform", "Plan class", "minimum