Ejemplo n.º 1
0
                    $cab_color = 'd3d3d3';
                }
            } else {
                F_display_db_error();
            }
        } else {
            $cbt_name = '';
            $cab_color = 'd3d3d3';
        }
    }
}
echo '<div class="container">' . K_NEWLINE;
echo '<div class="tceformbox">' . K_NEWLINE;
echo '<form action="' . $_SERVER['SCRIPT_NAME'] . '" method="post" enctype="multipart/form-data" id="form_editor">' . K_NEWLINE;
echo F_connection_selector($sel_a_obj_id, $sel_b_obj_id, $sel_cbt_id);
echo getFormNoscriptSelect('selectrecord');
echo '<div class="row"><hr /></div>' . K_NEWLINE;
if (isset($cab_ids) and !empty($cab_ids)) {
    echo getFormDescriptionLine($l['w_object'] . ' (A)', '', F_get_object_path($cab_a_obj_id, true));
    echo getFormDescriptionLine($l['w_object'] . ' (B)', '', F_get_object_path($cab_b_obj_id, true));
    echo getFormDescriptionLine($l['w_connection_type'], '', $cbt_name);
} else {
    echo F_object_selector($cab_a_obj_id, 'cab_a_obj_id', $l['w_object'] . ' (A)', false, false);
    echo F_object_selector($cab_b_obj_id, 'cab_b_obj_id', $l['w_object'] . ' (B)', false, false);
    echo F_select_connection_type($cab_cbt_id);
}
echo F_select_color($cab_color, 'cab_color', $l['w_color'], $l['h_cable_color']);
echo '<div class="row">' . K_NEWLINE;
// show buttons by case
if (isset($cab_ids) and !empty($cab_ids)) {
    echo '<span style="background-color:#999999;">';
Ejemplo n.º 2
0
}
echo '>' . $l['w_user'] . '</option>' . K_NEWLINE;
echo '<option value="1"';
if ($sqlordermode == 1) {
    echo ' selected="selected"';
}
echo '>' . $l['w_question'] . '</option>' . K_NEWLINE;
echo '<option value="2"';
if ($sqlordermode == 2) {
    echo ' selected="selected"';
}
echo '>' . $l['w_time'] . '</option>' . K_NEWLINE;
echo '</select>' . K_NEWLINE;
echo '</span>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo getFormNoscriptSelect('selectmode');
echo getFormRowCheckBox('display_user_info', $l['w_display_user_info'], $l['h_display_user_info'], '', 1, $display_user_info, false, '');
echo getFormRowCheckBox('display_all', $l['w_display_all'], $l['h_display_all'], '', 1, $display_all, false, '');
echo '<div class="row"><hr /></div>' . K_NEWLINE;
echo '<div class="row">' . K_NEWLINE;
echo '<span class="label">' . K_NEWLINE;
echo '<span title="' . $l['h_question_description'] . '">' . $l['w_question'] . '</span>' . K_NEWLINE;
echo '</span>' . K_NEWLINE;
echo '<span class="formw">' . K_NEWLINE;
echo $question;
echo '&nbsp;' . K_NEWLINE;
echo '</span>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
if (K_ENABLE_QUESTION_EXPLANATION and !empty($explanation)) {
    echo '<div class="row">' . K_NEWLINE;
    echo '<span class="label">' . K_NEWLINE;
Ejemplo n.º 3
0
if (strlen($searchterms) > 0) {
    $wherequery = '';
    $terms = preg_split("/[\\s]+/i", $searchterms);
    // Get all the words into an array
    foreach ($terms as $word) {
        $word = F_escape_sql($word);
        $wherequery .= ' AND ((user_name LIKE \'%' . $word . '%\')';
        $wherequery .= ' OR (user_email LIKE \'%' . $word . '%\')';
        $wherequery .= ' OR (user_firstname LIKE \'%' . $word . '%\')';
        $wherequery .= ' OR (user_lastname LIKE \'%' . $word . '%\')';
        $wherequery .= ' OR (user_regnumber LIKE \'%' . $word . '%\')';
        $wherequery .= ' OR (user_ssn LIKE \'%' . $word . '%\'))';
    }
    $wherequery = '(' . substr($wherequery, 5) . ')';
}
echo getFormNoscriptSelect();
echo '<div class="row"><hr /></div>' . K_NEWLINE;
if (isset($_POST['addgroup'])) {
    $menu_mode = 'addgroup';
} elseif (isset($_POST['delgroup'])) {
    $menu_mode = 'delgroup';
} elseif (isset($_POST['move'])) {
    $menu_mode = 'move';
}
if (isset($menu_mode) and !empty($menu_mode)) {
    $istart = 1 + $firstrow;
    $iend = $rowsperpage + $firstrow;
    for ($i = $istart; $i <= $iend; $i++) {
        // for each selected question
        $keyname = 'userid' . $i;
        if (isset(${$keyname})) {
Ejemplo n.º 4
0
echo '<span class="label">' . K_NEWLINE;
echo '<label for="display_mode">' . $l['w_stats'] . '</label>' . K_NEWLINE;
echo '</span>' . K_NEWLINE;
echo '<span class="formw">' . K_NEWLINE;
echo '<select name="display_mode" id="display_mode" size="0" title="' . $l['w_mode'] . '">' . K_NEWLINE;
foreach ($detail_modes as $key => $dmode) {
    echo '<option value="' . $key . '"';
    if ($key == $display_mode) {
        echo ' selected="selected"';
    }
    echo '>' . htmlspecialchars($dmode, ENT_NOQUOTES, $l['a_meta_charset']) . '</option>' . K_NEWLINE;
}
echo '</select>' . K_NEWLINE;
echo '</span>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo getFormNoscriptSelect('display_mode');
echo getFormRowCheckBox('show_graph', $l['w_graph'], $l['w_result_graph'], '', 1, $show_graph, false, '');
echo '<div class="row">' . K_NEWLINE;
echo '<span class="label">&nbsp;</span>' . K_NEWLINE;
echo '<span class="formw">' . K_NEWLINE;
echo '<input type="submit" name="selectcategory" id="selectcategory" value="' . $l['w_select'] . '" />' . K_NEWLINE;
echo '</span>' . K_NEWLINE;
echo '</div>' . K_NEWLINE;
echo '<div class="row"><hr /></div>' . K_NEWLINE;
// ---------------------------------------------------------------------
$itemcount = 0;
$data = F_getAllUsersTestStat($test_id, $group_id, $user_id, $startdate, $enddate, $full_order_field, true, $display_mode);
if (isset($data['num_records'])) {
    $itemcount = $data['num_records'];
}
echo '<div class="rowl">' . K_NEWLINE;
    echo '>&nbsp;-&nbsp;</option>' . K_NEWLINE;
    while ($m = F_db_fetch_array($r)) {
        echo '<option value="' . $m['group_id'] . '"';
        if ($m['group_id'] == $group_id) {
            echo ' selected="selected"';
        }
        echo '>' . htmlspecialchars($m['group_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('selectgroup');
echo '<div class="row"><hr /></div>' . K_NEWLINE;
echo '<div class="rowl">' . K_NEWLINE;
echo '<table class="userselect">' . K_NEWLINE;
echo '<tr>' . K_NEWLINE;
if ($l['a_meta_dir'] == 'rtl') {
    $tdalignr = 'left';
    $tdalign = 'right';
} else {
    $tdalignr = 'right';
    $tdalign = 'left';
}
echo '<th>&nbsp;</th>' . K_NEWLINE;
echo '<th>#</th>' . K_NEWLINE;
echo F_select_table_header_element('testuser_creation_time', $nextorderdir, $l['h_time_begin'], $l['w_time_begin'], $order_field, $filter);
//echo F_select_table_header_element('testuser_end_time', $nextorderdir, $l['h_time_end'], $l['w_time_end'], $order_field, $filter);
Ejemplo n.º 6
0
/**
 * Get a form selector for connection type.
 * @param $cbt_id (int) ID of conenction type.
 * @param $edit (boolean) If true include features for the editing form.
 * @param $submit (boolean) If true submit the form on change but without all edit features.
 * @param $filedname (string) Field name.
 * @return string HTML select form field code.
 */
function F_select_connection_type($cbt_id = 0, $edit = false, $submit = false, $filedname = 'cbt_id')
{
    global $l, $db;
    require_once '../config/tce_config.php';
    require_once '../../shared/code/tce_functions_form.php';
    $cbt_id = intval($cbt_id);
    $out = '';
    $out .= '<div class="row">' . K_NEWLINE;
    $out .= '<span class="label">' . K_NEWLINE;
    $out .= '<label for="' . $filedname . '">' . $l['w_connection_type'] . '</label>' . K_NEWLINE;
    $out .= '</span>' . K_NEWLINE;
    $out .= '<span class="formw">' . K_NEWLINE;
    if ($edit or $submit) {
        $out .= '<input type="hidden" name="change_connection_type" id="change_connection_type" value="" />' . K_NEWLINE;
        $out .= '<select name="' . $filedname . '" id="' . $filedname . '" size="0" onchange="document.getElementById(\'change_connection_type\').value=1;document.getElementById(\'form_editor\').submit()">' . K_NEWLINE;
        $out .= '<option value="0" style="background-color:#009900;color:white;"';
        if ($cbt_id == 0) {
            $out .= ' selected="selected"';
        }
        $out .= '>+</option>' . K_NEWLINE;
    } else {
        $out .= '<select name="' . $filedname . '" id="' . $filedname . '" size="0">' . K_NEWLINE;
    }
    $sql = 'SELECT * FROM ' . K_TABLE_CABLE_TYPES . ' WHERE 1 ORDER BY cbt_name ASC';
    if ($r = F_db_query($sql, $db)) {
        while ($m = F_db_fetch_array($r)) {
            $out .= '<option value="' . $m['cbt_id'] . '"';
            if ($m['cbt_id'] == $cbt_id) {
                $out .= ' selected="selected"';
            }
            $out .= '>' . htmlspecialchars($m['cbt_name'], ENT_NOQUOTES, $l['a_meta_charset']) . '</option>' . K_NEWLINE;
        }
    } else {
        $out .= '</select></span></div>' . K_NEWLINE;
        F_display_db_error();
    }
    $out .= '</select>' . K_NEWLINE;
    $out .= '</span>' . K_NEWLINE;
    $out .= '</div>' . K_NEWLINE;
    if ($edit) {
        $out .= getFormNoscriptSelect('selectconnectiontype');
    }
    return $out;
}