message(lang('successfully_canceled_enrolment_xxx') . " " . experiment__get_public_name($session['experiment_id']) . ", " . session__build_name($session_id) . ". " . lang('this_will_be_confirmed_by_an_email')); redirect("public/participant_show_mob.php" . $token_string); } } } if ($proceed) { $labs = laboratories__get_laboratories(); // load the data // invitations $invdata = expregister__get_invitations($participant_id); $invited = $invdata['invited']; $inv_experiments = $invdata['inv_experiments']; // registrations $registered = expregister__get_registrations($participant_id); // history $history = expregister__get_history($participant_id); if (isset($_SESSION['message_text'])) { $message_text = $_SESSION['message_text']; } else { $message_text = ""; } $_SESSION['message_text'] = ""; // render the page $footer = '<div data-role="footer" data-theme="a"><h1>' . $settings['default_area'] . '</h1></div></div>'; //$footer='</div>'; html__mobile_header(); echo ' <!-- index --> <div data-role="page" id="indexPage"> <div data-role="header" data-theme="a"> <h1>' . lang('mobile_experiment_registrations') . '</h1>';
function expregister__list_history($participant) { global $lang, $color, $preloaded_laboratories; if (!(is_array($preloaded_laboratories) && count($preloaded_laboratories) > 0)) { $preloaded_laboratories = laboratories__get_laboratories(); } $history = expregister__get_history($participant['participant_id']); echo '<TABLE width=100% border=0 cellspacing="0">'; if (count($history) > 0) { echo '<TR bgcolor="' . $color['list_shade_subtitle'] . '"> <TD>' . lang('experiment') . '</TD> <TD>' . lang('date_and_time') . '</TD> <TD>' . lang('location') . '</TD> <TD>' . lang('showup?') . '</TD> </TR>'; } else { echo '<TD>' . lang('mobile_no_past_enrolments') . '</TD>'; } $labs = array(); $shade = true; $pstatuses = expregister__get_participation_statuses(); foreach ($history as $s) { echo '<TR'; if ($shade) { $shade = false; } else { $shade = true; } if ($shade) { echo ' bgcolor="' . $color['list_shade1'] . '"'; } else { echo ' bgcolor="' . $color['list_shade2'] . '"'; } echo '><TD>' . $s['experiment_public_name'] . '</TD> <TD>' . $s['session_name'] . '</TD> <TD>'; if (isset($preloaded_laboratories[$s['laboratory_id']])) { echo $preloaded_laboratories[$s['laboratory_id']]['lab_name']; } else { echo lang('unknown_laboratory'); } echo '</TD><TD>'; if ($s['session_status'] == "completed" || $s['session_status'] == "balanced") { if ($pstatuses[$s['pstatus_id']]['noshow']) { $tcolor = $color['shownup_no']; //$ttext=lang('no'); } else { $tcolor = $color['shownup_yes']; //$ttext=lang('yes'); } $ttext = $pstatuses[$s['pstatus_id']]['display_name']; echo '<FONT color="' . $tcolor . '">' . $ttext . '</FONT>'; } else { echo lang('three_questionmarks'); } echo '</TD>'; echo '</TR>'; $labs[$s['laboratory_id']] = $s['laboratory_id']; } echo '</TABLE>'; return $labs; }