コード例 #1
0
            $done = participant__update_last_enrolment_time($participant_id);
            $done = log__participant("cancel_session_enrolment", $participant['participant_id'], "experiment_id:" . $session['experiment_id'] . "\nsession_id:" . $session_id);
            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">
コード例 #2
0
ファイル: expregister.php プロジェクト: kfarr2/psu-orsee
function expregister__list_registered_for($participant, $reg_session_id = "")
{
    global $lang, $color, $preloaded_laboratories, $settings, $token_string;
    $registered = expregister__get_registrations($participant['participant_id']);
    if (!(is_array($preloaded_laboratories) && count($preloaded_laboratories) > 0)) {
        $preloaded_laboratories = laboratories__get_laboratories();
    }
    echo '<TABLE width="100%" border=0 cellspacing="0">';
    $labs = array();
    $shade = true;
    if (count($registered) > 0) {
        echo '<TR bgcolor="' . $color['list_shade_subtitle'] . '">
           	<TD>' . lang('experiment') . '</TD>
           	<TD>' . lang('date_and_time') . '</TD>
        	<TD>' . lang('location') . '</TD>';
        if (isset($settings['allow_subject_cancellation']) && $settings['allow_subject_cancellation'] == 'y') {
            echo '<TD></TD>';
        }
        echo '</TR>';
    } else {
        echo '<TD>' . lang('mobile_no_current_registrations') . '</TD>';
    }
    foreach ($registered as $s) {
        echo '<TR';
        if ($shade) {
            $shade = false;
        } else {
            $shade = true;
        }
        if ($s['session_id'] == $reg_session_id) {
            echo ' bgcolor="' . $color['just_registered_session_background'] . '"';
        } elseif ($shade) {
            echo ' bgcolor="' . $color['list_shade1'] . '"';
        } else {
            echo ' bgcolor="' . $color['list_shade2'] . '"';
        }
        echo '><TD>' . $s['experiment_public_name'];
        if (or_setting('allow_public_experiment_note') && isset($s['public_experiment_note']) && trim($s['public_experiment_note'])) {
            echo '<BR><i>' . lang('note') . ': ' . trim($s['public_experiment_note']) . '</i>';
        }
        echo '</TD>
        	 <TD>' . $s['session_name'];
        if (or_setting('allow_public_session_note') && isset($s['public_session_note']) && trim($s['public_session_note'])) {
            echo '<BR><i>' . lang('note') . ': ' . trim($s['public_session_note']) . '</i>';
        }
        echo '</TD>
			 <TD>';
        if (isset($preloaded_laboratories[$s['laboratory_id']])) {
            echo $preloaded_laboratories[$s['laboratory_id']]['lab_name'];
        } else {
            echo lang('unknown_laboratory');
        }
        echo '</TD>';
        if (isset($settings['allow_subject_cancellation']) && $settings['allow_subject_cancellation'] == 'y') {
            $s['cancellation_deadline'] = sessions__get_cancellation_deadline($s);
            if ($s['cancellation_deadline'] > time()) {
                echo '<FORM action="participant_show.php">
				<TD>';
                if ($token_string) {
                    echo '<INPUT type=hidden name="p" value="' . $participant['participant_id_crypt'] . '">';
                }
                echo '<INPUT type=hidden name="s" value="' . $s['session_id'] . '">
				<INPUT class="button small" style="font-size: 8pt;" type="submit" name="cancel" value="' . lang('cancel_enrolment') . '">		
				</td></FORM>';
            } else {
                echo '<TD></TD>';
            }
        }
        echo '</TR>';
        $labs[$s['laboratory_id']] = $s['laboratory_id'];
    }
    echo '</TABLE>';
    return $labs;
}