if (!isset($t['item_details']['current_template'])) {
        $t['item_details']['current_template'] = '';
    }
    if (!isset($t['item_details']['current_draft'])) {
        $t['item_details']['current_draft'] = $t['item_details']['current_template'];
    }
    echo '<center>
			<TABLE class="or_page_subtitle" style="background: ' . $color['page_subtitle_background'] . '; color: ' . $color['page_subtitle_textcolor'] . '; width: 98%">
				<TR><TD align="center">' . lang('edit_participant_profile_form_template') . ' ' . $t['item_name'] . '</TD></TR></TABLE>
		<BR>';
    echo '
		<FORM action="options_profile_template_edit.php" METHOD=POST>
		<INPUT type=hidden name="item_name" value="' . $item_name . '">
		<TABLE width="95%" border=0 cellspacing="0">
		<TR><TD>
			' . lang('display_preview_for_subjectpool') . subpools__select_field('subpool_id', $subpool_id) . '<INPUT class="button" id="change_subpool" name="change_subpool" type="submit" value="' . lang('apply') . '">
		</TD></TR></TABLE></FORM>
	';
    $edit = array();
    if (isset($subpool_id)) {
        $edit['subpool_id'] = $subpool_id;
    }
    // form
    echo '	<FORM action="options_profile_template_edit.php" METHOD=POST>
		<INPUT type=hidden name="item_name" value="' . $item_name . '">
		<INPUT type=hidden name="subpool_id" value="' . $subpool_id . '">
		
		<TABLE class="or_formtable" style="max-width: 98%; width: 98%; padding: 0px;">
			<TR>
				<TD></TD>
				<TD></TD>
Example #2
0
function query__get_bulkactions()
{
    global $color;
    $bulkactions = array();
    // don't use ' in text!
    if (check_allow('participants_bulk_mail')) {
        // BULK EMAIL
        $display_text = lang('send_bulk_mail');
        $inv_langs = lang__get_part_langs();
        $html = ' <center>
                <TABLE class="or_page_subtitle" style="background: ' . $color['page_subtitle_background'] . '; color: ' . $color['page_subtitle_textcolor'] . '; width: 90%;">
                    <TR><TD align="center">
                        ' . lang('send_bulk_mail_to') . ' #xyz_participants#
                </TD></TR></TABLE>
                <input class="bforminput" type="hidden" name="action" value="bulkmail">
                <TABLE class="or_formtable" style="width: 90%;">';
        foreach ($inv_langs as $inv_lang) {
            if (count($inv_langs) > 1) {
                $html .= '<TR><TD colspan=2>
                                                <TABLE width="100%" border=0 class="or_panel_title"><TR>
                        <TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '">
                            ' . $inv_lang . ':
                        </TD>
                        </TR></TABLE>
                        </TD></TR>';
            }
            if (isset($_REQUEST['message_subject_' . $inv_lang])) {
                $tsubject = $_REQUEST['message_subject_' . $inv_lang];
            } else {
                $tsubject = '';
            }
            if (isset($_REQUEST['message_text_' . $inv_lang])) {
                $ttext = $_REQUEST['message_text_' . $inv_lang];
            } else {
                $ttext = '';
            }
            $html .= '   <TR>
                    <TD>' . lang('subject') . ':</TD>
                    <TD><input class="bforminput" type="text" name="message_subject_' . $inv_lang . '" size="50" max-length="200" value="' . $tsubject . '"></TD>
                </TR><TR>
                    <TD valign="top">' . lang('message_text') . ':</TD>
                    <TD><textarea class="bforminput" name="message_text_' . $inv_lang . '" rows="20" cols="50" wrap="virtual">' . $ttext . '</textarea></TD>
                </TR>';
        }
        $html .= '<TR><TD colspan="2" align="center"><INPUT id="popupsubmit" class="button" type="submit" name="popupsubmit" value="' . lang('send') . '"></TD></TR>
                </TABLE></center>';
        $bulkactions['bulkmail'] = array('display_text' => $display_text, 'html' => $html);
    }
    if (check_allow('participants_bulk_participant_status')) {
        // PARTICIPANT STATUS
        $display_text = lang('set_participant_status');
        if (isset($_REQUEST['new_status'])) {
            $new_status = $_REQUEST['new_status'];
        } else {
            $new_status = '';
        }
        if (isset($_REQUEST['remark'])) {
            $remark = $_REQUEST['remark'];
        } else {
            $remark = '';
        }
        $status_select = participant_status__select_field('new_status', $new_status, array(), 'bforminput');
        $html = ' <center>
                <TABLE class="or_page_subtitle" style="background: ' . $color['page_subtitle_background'] . '; color: ' . $color['page_subtitle_textcolor'] . '; width: 90%;">
                    <TR><TD align="center">
                        ' . lang('set_participant_status_for') . ' #xyz_participants#
                </TD></TR></TABLE>
                <input class="bforminput" type="hidden" name="action" value="status">
                <TABLE class="or_formtable" style="width: 90%;">
                <TR>
                    <TD>' . lang('new_status') . ':</TD>
                    <TD>' . $status_select . '</TD>
                </TR>
                <TR>
                    <TD valign="top">' . lang('add_remark_to_profile') . ':</TD>
                    <TD><textarea class="bforminput" name="remark" rows="5" cols="30" wrap="virtual">' . $remark . '</textarea></TD>
                </TR>


                <TR><TD colspan="2" align="center"><INPUT id="popupsubmit" class="button" type="submit" name="popupsubmit" value="' . lang('set_status') . '"></TD></TR>
                </TABLE></center>
                ';
        $bulkactions['status'] = array('display_text' => $display_text, 'html' => $html);
    }
    if (check_allow('participants_bulk_profile_update')) {
        // PROFILE UPDATE REQUEST
        $display_text = lang('set_profile_update_request');
        if (isset($_REQUEST['new_pool'])) {
            $new_pool = $_REQUEST['new_pool'];
        } else {
            $new_pool = '';
        }
        if (isset($_REQUEST['new_profile_update_status'])) {
            $new_profile_update_status = $_REQUEST['new_profile_update_status'];
        } else {
            $new_profile_update_status = '';
        }
        if (isset($_REQUEST['do_pool_transfer'])) {
            $do_pool_transfer = $_REQUEST['do_pool_transfer'];
        } else {
            $do_pool_transfer = '';
        }
        $pool_select = subpools__select_field('new_pool', $new_pool, array(), 'bforminput');
        $html = ' <center>
                <TABLE class="or_page_subtitle" style="background: ' . $color['page_subtitle_background'] . '; color: ' . $color['page_subtitle_textcolor'] . '; width: 90%;">
                    <TR><TD align="center">
                        ' . lang('set_profile_update_request_for') . ' #xyz_participants#
                </TD></TR></TABLE>
                <input class="bforminput" type="hidden" name="action" value="profile_update">
                <TABLE class="or_formtable" style="width: 90%;">
                <TR>
                    <TD>' . lang('set_profile_update_request_status_equal_to') . ' <SELECT name="new_profile_update_status" class="bforminput">
                            <OPTION value="y"';
        if ($new_profile_update_status == 'y') {
            $html .= ' SELECTED';
        }
        $html .= '>' . lang('active') . '</OPTION>
                            <OPTION value="n"';
        if ($new_profile_update_status != 'y') {
            $html .= ' SELECTED';
        }
        $html .= '>' . lang('inactive') . '</OPTION>
                            </SELECT>
                    </TD>
                </TR>
                <TR>
                    <TD><INPUT class="bforminput" type="checkbox" name="do_pool_transfer" value="y"';
        if ($do_pool_transfer == 'y') {
            $html .= ' CHECKED';
        }
        $html .= '>' . lang('upon_profile_update_transfer_to_subject_pool') . ' ' . $pool_select . '</TD>
                </TR>
                <TR><TD colspan="2" align="center"><INPUT id="popupsubmit" class="button" type="submit" name="popupsubmit" value="' . lang('set_status') . '"></TD></TR>
                </TABLE></center>
                ';
        $bulkactions['profile_update'] = array('display_text' => $display_text, 'html' => $html);
    }
    return $bulkactions;
}
Example #3
0
                <FORM action="subpool_delete.php">
                <INPUT type=hidden name="subpool_id" value="' . $subpool_id . '">
                <TABLE class="or_formtable">
                <TR><TD colspan="2">
				<TABLE width="100%" border=0 class="or_panel_title"><TR>
						<TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '" align="center">
							' . lang('delete_subpool') . ' "' . $subpool['subpool_name'] . '"
						</TD>
				</TR></TABLE>
				</TD></TR>
                
                <TR>
                	<TD colspan=2>
                       	' . lang('really_delete_subpool?') . '
                                <BR><BR>';
    dump_array($subpool);
    echo '</TD></TR>
                <TR><TD align=left colspan=2>
                    <INPUT class="button" type=submit name=reallydelete value="' . lang('yes_delete') . '">
				<BR>' . lang('merge_subject_pool_with') . ' ';
    echo subpools__select_field("merge_with", "1", array($subpool_id));
    echo '		</TD></TR><TR>
					<TD align=center colspan=2><BR><BR>
					<INPUT class="button" type=submit name=betternot value="' . lang('no_sorry') . '">
					</TD>
					</TR>
	                </TABLE>
                </FORM>
                </center>';
}
include "footer.php";
Example #4
0
function participant__show_admin_form($edit, $button_title = "", $errors, $extra = "")
{
    global $lang, $settings, $color;
    $out = array();
    if (!isset($edit['participant_id'])) {
        $edit['participant_id'] = '';
    }
    if (!isset($edit['subpool_id'])) {
        $edit['subpool_id'] = 1;
    }
    $subpool = orsee_db_load_array("subpools", $edit['subpool_id'], "subpool_id");
    if (!$subpool['subpool_id']) {
        $subpool = orsee_db_load_array("subpools", 1, "subpool_id");
    }
    $edit['subpool_id'] = $subpool['subpool_id'];
    $pools = subpools__get_subpools();
    foreach ($pools as $p => $pool) {
        $out['is_subjectpool_' . $p] = false;
    }
    $out['is_subjectpool_' . $subpool['subpool_id']] = true;
    echo '<FORM action="' . thisdoc() . '" method="POST">';
    echo '<table border="0">';
    echo '<TR><TD valign="top">';
    echo '<TABLE class="or_formtable" style="width: 100%; height: 100%; max-width: 100%"><TR><TD>';
    // get the participant form
    participant__show_inner_form($edit, $errors, true);
    echo '</TD></TR></TABLE>';
    echo '</TD><TD valign="top">';
    echo '<TABLE class="or_formtable" style="width: 100%; height: 100%; max-width: 100%; background: ' . $color['list_shade2'] . '"><TR><TD>';
    echo '<INPUT type="hidden" name="participant_id" value="' . $edit['participant_id'] . '">';
    global $hide_header;
    if (isset($hide_header) && $hide_header) {
        echo '<INPUT type="hidden" name="hide_header" value="true">';
    }
    $adminformoutput = participant__get_inner_admin_form($edit, $errors);
    if ($adminformoutput) {
        echo '<TABLE width="100%">
                <TR><TD valign="top" bgcolor="' . $color['list_shade1'] . '">';
        echo $adminformoutput;
        echo '</TD></TR></TABLE>';
    }
    echo '<BR>';
    // then show the rest
    // initialize
    if (!isset($edit['participant_id'])) {
        $edit['participant_id'] = '???';
    }
    if (!isset($edit['participant_id_crypt'])) {
        $edit['participant_id_crypt'] = '???';
    }
    if (isset($edit['creation_time'])) {
        $tout['creation_time'] = ortime__format($edit['creation_time'], '', lang('lang'));
    } else {
        $tout['creation_time'] = '';
    }
    if (!isset($edit['rules_signed'])) {
        $edit['rules_signed'] = '';
    }
    if (!isset($edit['session_id'])) {
        $edit['session_id'] = '';
    }
    if (!isset($edit['remarks'])) {
        $edit['remarks'] = '';
    }
    echo '<table width="100%">';
    echo '  <tr><td>' . lang('subpool') . '</td>
            <td>' . subpools__select_field("subpool_id", $edit['subpool_id']) . '</td></tr>';
    echo '<tr><td colspan=2>&nbsp;</td></tr>';
    echo '  <tr><td>' . lang('id') . '</td>
            <td>' . $edit['participant_id'] . ' (' . $edit['participant_id_crypt'] . ')</td></tr>
        <tr><td>' . lang('creation_time') . '</td>
            <td>';
    if (isset($edit['creation_time'])) {
        echo ortime__format($edit['creation_time'], '', lang('lang'));
    } else {
        echo '???';
    }
    echo '  </td></tr>';
    if ($settings['enable_rules_signed_tracking'] == 'y') {
        echo '<tr><td>' . lang('rules_signed') . '</td>
            <td>' . participant__rules_signed_form_field($edit['rules_signed']) . '</td></tr>';
    }
    echo '<tr><td valign="top">' . lang('remarks') . '</td>
            <td>' . participant__remarks_form_field($edit['remarks']) . '</td></tr>';
    echo '<tr><td colspan=2>&nbsp;</td></tr>';
    echo '<tr><td colspan=2 align=left>
                ' . participant__add_to_session_checkbox() . ' ' . lang('register_sub_for_session') . '<BR>
                ' . participant__add_to_session_select($edit['session_id'], $edit['participant_id']) . '
            </td></tr>';
    echo '</td></tr></table>';
    echo '</TD></TR><TR><TD valign="bottom"  bgcolor="' . $color['list_shade2'] . '">';
    echo '<table>
            <tr style="outline: 2px solid red;">
            <td>
                <B>' . lang('participant_status') . '</B>: ';
    if (check_allow('participants_change_status')) {
        if (!isset($_REQUEST['status_id'])) {
            $_REQUEST['status_id'] = "";
        }
        if ($_REQUEST['status_id'] == '0') {
            $hide = array();
        } else {
            $hide = array('0');
        }
        echo '<INPUT type="hidden" name="old_status_id" value="' . $_REQUEST['status_id'] . '">' . participant_status__select_field('status_id', $_REQUEST['status_id'], $hide);
    } elseif (!$edit['participant_id']) {
        $default_status = participant_status__get("is_default_active");
        $statuses = participant_status__get_statuses();
        echo '<INPUT type="hidden" name="status_id" value="' . $default_status . '">' . $statuses[$default_status]['name'];
    } else {
        echo participant_status__get_name($_REQUEST['status_id']);
    }
    echo '</td></tr></table>';
    echo '</td></tr></table>';
    echo '</td></tr>';
    if (!$button_title) {
        $button_title = lang('change');
    }
    echo '<tr><td colspan="2" align="center">
            <INPUT class="button" name="add" type="submit" value="' . $button_title . '">
            </td></tr>';
    echo '</table></form>';
}