'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 '
'.(count($S['conf']['modules']) > 1?'':'').''."\n"; $ready=0; while($c=$r->fetch(PDO::FETCH_ASSOC)) { $c=new sql_configuration($c); echo "\n"; } echo '
IDNameModuleStatusOptionsBuilds
"; if ($c->status == 0) { $ready++; echo "id\" type=\"radio\" name=\"configuration\" value=\"$c->id\" /> '; } else { echo $c->id; } echo ''.(isset($c->name) && strlen($c->name)?htmlentities($c->name):'Unnamed').''; if (count($S['conf']['modules']) > 1) { echo "$c->module"; } if ($c->status > 0) { echo 'id")."\">Step $c->status"; } elseif ($c->status == 0) { echo 'Ready'; } else { echo $c->status; } echo ' (id/status").'">view)'; echo ''.$c->summary().''; $builds=$c->get_builds(); if ($builds) { foreach ($builds as $build) { echo ''.$build.' '; } } else { echo 'None'; } echo "
'.($ready?'Name (optional): ':'').'
'; } ?>