.
/***********************************************************************\
* Display and Manage BOINC Application Versions
*
* This page presents a form with information about application versions.
* Some of the fields can be changed.
*
* Eric Myers
To add a new application please supply both a brief name and a
longer 'user-friendly' name.$cmd
\n";
mysql_query($cmd);
}
/* Minimum version limit */
$field="min_version_".$id;
$new_v= $_POST[$field] + 0;
$old_v=$item->min_version;
if( $new_v != $old_v ) {
$cmd = "UPDATE app SET min_version=$new_v WHERE id=$id";
$commands .= "$cmd
\n";
mysql_query($cmd);
}
/* Minimum version limit */
$field="weight_".$id;
$new_v= $_POST[$field] + 0;
$old_v=$item->weight;
if( $new_v != $old_v ) {
$cmd = "UPDATE app SET weight=$new_v WHERE id=$id";
$commands .= "$cmd
\n";
mysql_query($cmd);
}
/* Homogendous redundancy restriction (same platform for all WU's) */
$field="homogeneous_redundancy_".$id;
$new_v= $_POST[$field];
$old_v=$item->homogeneous_redundancy;
if( $new_v != $old_v ) {
$cmd = "UPDATE app SET homogeneous_redundancy=$new_v WHERE id=$id";
$commands .= "$cmd
\n";
mysql_query($cmd);
}
}
/* Adding a new application */
if(post_str('add_app', true)) {
$name= mysql_real_escape_string($_POST['add_name']);
$user_friendly_name=mysql_real_escape_string($_POST['add_user_friendly_name']);
if( empty($name) || empty($user_friendly_name) ) {
$commands .= "$cmd
\n";
mysql_query($cmd);
}
}
}//$_POST
/***************************************************\
* Display the DB contents in a form
\***************************************************/
admin_page_head("Manage Applications");
if(isset($commands)) echo $commands;
$self=$_SERVER['PHP_SELF'];
echo "
\n"; admin_page_tail(); //Generated automatically - do not edit $cvs_version_tracker[]="\$Id$"; ?>