break; case 'ping': ping($r); break; case 'query_batch': query_batch($r); break; case 'query_batch2': query_batch2($r); break; case 'query_batches': query_batches($r); break; case 'query_job': query_job($r); break; case 'query_completed_job': query_completed_job($r); break; case 'retire_batch': handle_retire_batch($r); break; case 'set_expire_time': handle_set_expire_time($r); break; case 'submit_batch': submit_batch($r); break; default: xml_error(-1, "bad command: " . $r->getName()); }
} } $user = get_logged_in_user(); $user_submit = BoincUserSubmit::lookup_userid($user->id); if (!$user_submit) { error_page("no submit access"); } $app = BoincApp::lookup("name='lammps'"); if (!$app) { error_page("no lammps app"); } if (!$user_submit->submit_all) { $usa = BoincUserSubmitApp::lookup("user_id={$user->id} and app_id={$app->id}"); if (!$usa) { error_page("no submit access"); } } $action = get_str('action', true); switch ($action) { case '': show_submit_form($user); break; case 'prepare': prepare_batch($user); break; case 'submit': submit_batch($user, $app); break; default: error_page("no such action {$action}"); }