. // 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) error_page("no such app version"); $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"); echo "Updated app version $id. This change will take effect when you restart the project.
";
}
function show_form() {
$_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 #",
"Application",
"Version",
"Platform",
"Plan Class",
"minimum
client version",
"maximum
client version",
"deprecated?",
""
);
$avs = BoincAppVersion::enum(
"true order by appid, platformid, plan_class, version_num"
);
foreach ($avs as $av) {
// grey out deprecated versions
//
$f1=$f2='';
if ($av->deprecated) {
$f1="";
$f2="";
}
echo "