'Manage Configurations');
}
function body_configurations_manager(&$S) {
echo '
Configurations Manager
';
if (isset($_REQUEST['build']) && isset($_REQUEST['configuration'])) {
$c=new sql_configuration($_REQUEST['configuration']);
if ($c->owner!=$S['user']->id) {
echo print_error('You do not have permission to build this configuration.');
} else {
$name=isset($_REQUEST['name'])?$_REQUEST['name']:null;
$build=$c->build($name);
if (is_object($build))
echo print_success('Submitted for build - id").'">Logs');
else
echo print_error('Invalid configuration', 'Your configuration could not be submitted for build. Please return to id/$build").'">step '.$build.' and continue configuration from there.');
}
}
$r=query('SELECT * FROM `configurations` WHERE `owner`='.$S['user']->id);
if ($r->rowCount() == 0) {
echo print_warning('You have no configurations.').'Create a configuration';
return;
}
echo '';
}
?>