예제 #1
0
echo '<br />' . K_NEWLINE;
echo '<input type="radio" name="question_type" id="ordering_answer" value="4"';
if ($question_type == 4) {
    echo ' checked="checked"';
}
echo ' title="' . $l['h_enable_ordering_answer'] . '" />';
echo '<label for="free_answer">' . $l['w_ordering_answer'] . '</label>' . K_NEWLINE;
echo '</fieldset>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
// question difficulty
$items = array();
for ($i = 0; $i <= K_QUESTION_DIFFICULTY_LEVELS; ++$i) {
    $items[$i] = $i;
}
echo getFormRowSelectBox('question_difficulty', $l['w_question_difficulty'], $l['h_question_difficulty'], '', $question_difficulty, $items, '');
// question position
echo '<div class="row">' . K_NEWLINE;
echo '<span class="label">' . K_NEWLINE;
echo '<label for="question_position">' . $l['w_position'] . '</label>' . K_NEWLINE;
echo '</span>' . K_NEWLINE;
echo '<span class="formw">' . K_NEWLINE;
echo '<select name="question_position" id="question_position" size="0" title="' . $l['h_position'] . '">' . K_NEWLINE;
if (isset($question_id) and $question_id > 0) {
    $max_position = 1 + F_count_rows(K_TABLE_QUESTIONS, "WHERE question_subject_id=" . $question_subject_id . " AND question_position>0 AND question_id<>" . $question_id . "");
} else {
    $max_position = 0;
}
echo '<option value="0">&nbsp;</option>' . K_NEWLINE;
for ($pos = 1; $pos <= $max_position; $pos++) {
    echo '<option value="' . $pos . '"';
예제 #2
0
}
echo '</select>' . K_NEWLINE;
// link for user selection popup
$jsaction = 'selectWindow=window.open(\'tce_select_users_popup.php?cid=user_id\', \'selectWindow\', \'dependent, height=600, width=800, menubar=no, resizable=yes, scrollbars=yes, status=no, toolbar=no\');return false;';
echo '<a href="#" onclick="' . $jsaction . '" class="xmlbutton" title="' . $l['w_select'] . '">...</a>';
echo '</span>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo getFormNoscriptSelect('selectrecord');
echo '<div class="row"><hr /></div>' . K_NEWLINE;
echo getFormRowTextInput('user_name', $l['w_username'], $l['h_login_name'], '', $user_name, '', 255, false, false, false);
echo getFormRowTextInput('user_email', $l['w_email'], $l['h_usered_email'], '', $user_email, '^([a-zA-Z0-9_\\.\\-]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$', 255, false, false, false);
echo getFormRowTextInput('newpassword', $l['w_password'], $l['h_password'], ' (' . $l['d_password_lenght'] . ')', '', '^([a-zA-Z0-9]{8,32})$', 255, false, false, true);
echo getFormRowTextInput('newpassword_repeat', $l['w_password'], $l['h_password_repeat'], ' (' . $l['w_repeat'] . ')', '', '', 255, false, false, true);
echo getFormRowFixedValue('user_regdate', $l['w_regdate'], $l['h_regdate'], '', $user_regdate);
echo getFormRowFixedValue('user_ip', $l['w_ip'], $l['h_ip'], '', $user_ip);
echo getFormRowSelectBox('user_level', $l['w_level'], $l['h_level'], '', $user_level, array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
echo getFormRowTextInput('user_regnumber', $l['w_regcode'], $l['h_regcode'], '', $user_regnumber, '', 255, false, false, false);
echo getFormRowTextInput('user_firstname', $l['w_firstname'], $l['h_firstname'], '', $user_firstname, '', 255, false, false, false);
echo getFormRowTextInput('user_lastname', $l['w_lastname'], $l['h_lastname'], '', $user_lastname, '', 255, false, false, false);
echo getFormRowTextInput('user_birthdate', $l['w_birth_date'], $l['h_birth_date'] . ' ' . $l['w_date_format'], '', $user_birthdate, '', 10, true, false, false);
echo getFormRowTextInput('user_birthplace', $l['w_birth_place'], $l['h_birth_place'], '', $user_birthplace, '', 255, false, false, false);
echo getFormRowTextInput('user_ssn', $l['w_fiscal_code'], $l['h_fiscal_code'], '', $user_ssn, '', 255, false, false, false);
echo '<div class="row">' . K_NEWLINE;
echo '<span class="label">' . K_NEWLINE;
echo '<label for="user_groups">' . $l['w_groups'] . '</label>' . K_NEWLINE;
echo '</span>' . K_NEWLINE;
echo '<span class="formw">' . K_NEWLINE;
echo '<select name="user_groups[]" id="user_groups" size="5" multiple="multiple">' . K_NEWLINE;
$sql = 'SELECT * FROM ' . K_TABLE_GROUPS . ' ORDER BY group_name';
if ($r = F_db_query($sql, $db)) {
    while ($m = F_db_fetch_array($r)) {
예제 #3
0
if (file_exists(K_PATH_CACHE . 'OMR')) {
    // directory containing files to import
    $dirs = array('OMR/');
    $dirhdl = @opendir(K_PATH_CACHE . 'OMR/');
    if ($dirhdl !== false) {
        while ($file = readdir($dirhdl)) {
            if ($file != '.' and $file != '..') {
                $filename = K_PATH_CACHE . 'OMR/' . $file . '/';
                if (is_dir($filename)) {
                    $dirs[$filename] = 'OMR/' . $file . '/';
                }
            }
        }
        // sort files alphabetically
        natcasesort($dirs);
        echo getFormRowSelectBox('omrdir', $l['w_omr_dir'], $l['h_omr_dir'], '', $omrdir, $dirs, '');
    }
}
echo getFormRowCheckBox('overwrite', $l['w_overwrite'], $l['h_omr_overwrite'], '', 1, $overwrite, false, '');
// -----------------------------------------------------------------------------
echo '<div class="row">' . K_NEWLINE;
echo '<br />' . K_NEWLINE;
// show upload button
F_submit_button('upload', $l['w_upload'], $l['h_submit_file']);
echo '</div>' . K_NEWLINE;
echo '</form>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo '<div class="pagehelp">' . $l['hp_omr_bulk_importer'] . '</div>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
require_once '../code/tce_page_footer.php';
//============================================================+
예제 #4
0
        if ($m['atb_id'] == $atb_id) {
            echo ' selected="selected"';
        }
        echo '>' . htmlspecialchars($m['atb_name'], ENT_NOQUOTES, $l['a_meta_charset']) . '</option>' . K_NEWLINE;
    }
} else {
    echo '</select></span></div>' . K_NEWLINE;
    F_display_db_error();
}
echo '</select>' . K_NEWLINE;
echo '</span>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo getFormNoscriptSelect('selectrecord');
echo '<div class="row"><hr /></div>' . K_NEWLINE;
echo getFormRowTextInput('atb_name', $l['w_name'], $l['h_attribute_name'], '', $atb_name, '', 255, false, false, false, '');
echo getFormRowSelectBox('atb_type', $l['w_type'], $l['h_attribute_type'], '', $atb_type, $attribute_types, '');
echo getFormRowTextInput('atb_default', $l['w_default'], $l['h_attribute_default'], '', $atb_default, '', 255, false, false, false, '');
echo getFormRowTextBox('atb_description', $l['w_description'], $l['h_attribute_description'], $atb_description, false, '');
echo '<div class="row">' . K_NEWLINE;
// show buttons by case
if (isset($atb_id) and $atb_id > 0) {
    echo '<span style="background-color:#999999;">';
    echo '<input type="checkbox" name="confirmupdate" id="confirmupdate" value="1" title="confirm &rarr; update" />';
    F_submit_button('update', $l['w_update'], $l['h_update']);
    echo '</span>';
    F_submit_button('delete', $l['w_delete'], $l['h_delete']);
} else {
    F_submit_button('add', $l['w_add'], $l['h_add']);
}
F_submit_button('clear', $l['w_clear'], $l['h_clear']);
// comma separated list of required fields
예제 #5
0
echo '<form action="' . $_SERVER['SCRIPT_NAME'] . '" method="post" enctype="multipart/form-data" id="form_editor">' . K_NEWLINE;
// *** selection filter ***
echo '<fieldset class="subset" style="text-align:left;">' . K_NEWLINE;
echo '<legend>' . $l['w_selection filter'] . '</legend>' . K_NEWLINE;
echo F_select_datacenter($dcn_id, $datacenter_data, true);
echo F_select_suite($dcn_id, $sts_id, $suite_data, true);
echo F_select_multiple_racks($dcn_id, $sts_id, $rck_ids);
echo F_select_multiple_object_types($obt_ids);
echo F_get_user_selectbox($l['w_owner'], $obj_owner_id, 'obj_owner_id');
echo F_get_user_selectbox($l['w_tenant'], $obj_tenant_id, 'obj_tenant_id');
echo getFormRowTextInput('keywords', $l['w_keywords'], $l['w_search_keywords'], '', $keywords, '', 255, false, false, false, '');
echo '</fieldset>' . K_NEWLINE;
echo '<fieldset class="subset" style="text-align:left;">' . K_NEWLINE;
echo '<legend>' . $l['w_options'] . '</legend>' . K_NEWLINE;
echo getFormRowTextInput('exclude', $l['w_exclude'], $l['h_exclude_pattern'], '[i.e.: user password license child connection permissions object capacity]', $exclude, '', 255, false, false, false, '');
echo getFormRowSelectBox('format_type', $l['w_format'], $l['h_export_format'], '', $format_type, $format_types, '');
echo '</fieldset>' . K_NEWLINE;
// export button
echo '<div class="row">' . K_NEWLINE;
F_submit_button('generate', $l['w_export'], $l['w_export_data']);
echo '</div>' . K_NEWLINE;
echo '<div class="row">' . K_NEWLINE;
echo '&nbsp;' . K_NEWLINE;
// comma separated list of required fields
echo '<input type="hidden" name="ff_required" id="ff_required" value="" />' . K_NEWLINE;
echo '<input type="hidden" name="ff_required_labels" id="ff_required_labels" value="" />' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo '</form>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo '<div class="pagehelp">' . $l['hp_export_data'] . '</div>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
예제 #6
0
        if ($m['rck_id'] == $loc_rack_id) {
            echo ' selected="selected"';
        }
        echo '>' . htmlspecialchars($m['dcn_name'] . ' → ' . $m['sts_name'] . ' → ' . $m['rck_name'], ENT_NOQUOTES, $l['a_meta_charset']) . '</option>' . K_NEWLINE;
    }
} else {
    echo '</select></span></div>' . K_NEWLINE;
    F_display_db_error();
}
echo '</select>' . K_NEWLINE;
echo '</span>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo getFormRowSelectBox('loc_side', $l['w_side'], $l['h_rack_side'], '', $loc_side, $rack_sides, '');
$racks_slots = range(0, 50, 1);
echo getFormRowSelectBox('loc_row_top', $l['w_starting_row'], $l['h_rack_starting_row'], '', $loc_row_top, $racks_slots, '');
echo getFormRowSelectBox('loc_row_bottom', $l['w_ending_row'], $l['h_rack_ending_row'], '', $loc_row_bottom, $racks_slots, '');
echo getFormRowCheckBox('loc_front', $l['w_front'], $l['h_position_front'], '', '1', $loc_front, false, '');
echo getFormRowCheckBox('loc_center', $l['w_center'], $l['h_position_center'], '', '1', $loc_center, false, '');
echo getFormRowCheckBox('loc_rear', $l['w_rear'], $l['h_position_rear'], '', '1', $loc_rear, false, '');
echo '</fieldset>' . K_NEWLINE;
if (isset($obj_id) and $obj_id > 0) {
    // *** list child ojbects ----------------------------------------------------
    echo '<fieldset class="subset" style="text-align:left;">' . K_NEWLINE;
    echo '<legend>' . $l['w_child_objects'] . '</legend>' . K_NEWLINE;
    echo '<div>' . K_NEWLINE;
    $sql = 'SELECT obj_id, obj_name, obj_label, obj_tag FROM ' . K_TABLE_OBJECTS . ', ' . K_TABLE_OBJECTS_MAP . ' WHERE omp_child_obj_id=obj_id AND omp_parent_obj_id=' . $obj_id . ' ORDER BY obj_name ASC';
    if ($r = F_db_query($sql, $db)) {
        echo '<ul>' . K_NEWLINE;
        while ($m = F_db_fetch_array($r)) {
            echo '<li><a href="' . $_SERVER['SCRIPT_NAME'] . '?obj_id=' . $m['obj_id'] . '" title="' . $l['t_object_editor'] . ': ' . $m['obj_name'] . '">' . htmlspecialchars($m['obj_name'] . ' - ' . $m['obj_label'] . ' - ' . $m['obj_tag'], ENT_NOQUOTES, $l['a_meta_charset']) . '</a></li>' . K_NEWLINE;
        }