' . "\n"; } echo PMA_generate_common_hidden_inputs('', '', 0, 'server') . "\n"; echo PMA_getHiddenFields((array)$hidden_fields); } /** * Displays form tabs which are given by an array indexed by fieldset id * ({@link display_fieldset_top}), with values being tab titles. * * @param array $tabs */ function display_tabs_top($tabs) { ?>
'optbox'), $attributes); foreach ($attributes as $k => &$attr) { $attr = $k . '="' . htmlspecialchars($attr) . '"'; } echo '
'; echo '' . $title . ''; if (!empty($description)) { echo '

' . $description . '

'; } // this must match with displayErrors() in scripts.js if (is_array($errors) && count($errors) > 0) { echo '
'; foreach ($errors as $error) { echo '
' . $error . '
'; } echo '
'; } ?> fields * o values_escaped - (boolean) tells whether values array is already escaped (defaults to false) * o values_disabled - (array)list of disabled values (keys from values) * o comment - (string) tooltip comment * o comment_warning - (bool) whether this comments warns about something * o wiki - (string) wiki link * * @uses $GLOBALS['_FormDisplayGroup'] * @uses $GLOBALS['cfg']['ThemePath'] * @uses $_SESSION['PMA_Theme'] * @uses display_group_footer() * @param string $path * @param string $name * @param string $description * @param string $type * @param mixed $value * @param bool $value_is_default * @param array $opts */ function display_input($path, $name, $description = '', $type, $value, $value_is_default = true, $opts = null) { global $_FormDisplayGroup; static $base_dir, $img_path; $is_setup_script = defined('PMA_SETUP'); if ($base_dir === null) { $base_dir = $is_setup_script ? '../' : ''; $img_path = $is_setup_script ? '../' . ltrim($GLOBALS['cfg']['ThemePath'], './') . '/original/img/' : $_SESSION['PMA_Theme']->img_path; } $has_errors = isset($opts['errors']) && !empty($opts['errors']); $option_is_disabled = !$is_setup_script && isset($opts['userprefs_allow']) && !$opts['userprefs_allow']; $name_id = 'name="' . htmlspecialchars($path) . '" id="' . htmlspecialchars($path) . '"'; $field_class = $type == 'checkbox' ? 'checkbox' : ''; if (!$value_is_default) { $field_class .= ($field_class == '' ? '' : ' ') . ($has_errors ? 'custom field-error' : 'custom'); } $field_class = $field_class ? ' class="' . $field_class . '"' : ''; $tr_class = $_FormDisplayGroup > 0 ? 'group-field group-field-' . $_FormDisplayGroup : ''; if (isset($opts['setvalue']) && $opts['setvalue'] == ':group') { unset($opts['setvalue']); $_FormDisplayGroup++; $tr_class = 'group-header-field group-header-' . $_FormDisplayGroup; } if ($option_is_disabled) { $tr_class .= ($tr_class ? ' ' : '') . 'disabled-field'; } $tr_class = $tr_class ? ' class="' . $tr_class . '"' : ''; ?> >  '; } ?>
Doc Wiki '; break; case 'short_text': echo ''; break; case 'number_text': echo ''; break; case 'checkbox': echo ''; break; case 'select': echo ''; break; case 'list': echo ''; break; } if (isset($opts['comment']) && $opts['comment']) { $class = 'field-comment-mark'; if (isset($opts['comment_warning']) && $opts['comment_warning']) { $class .= ' field-comment-warning'; } ?> i comment " title="" style="display:none">set-value "; foreach ($opts['errors'] as $error) { echo '
' . htmlspecialchars($error) . '
'; } echo ''; } ?>
/>
\n"; } /** * Displays bottom part of the form */ function display_form_bottom() { echo "\n"; } /** * Appends JS validation code to $js_array * * @uses PMA_escapeJsString() * @param string $field_id * @param string|array $validator * @param array $js_array */ function js_validate($field_id, $validators, &$js_array) { foreach ((array)$validators as $validator) { $validator = (array)$validator; $v_name = array_shift($validator); $v_args = array(); foreach ($validator as $arg) { $v_args[] = PMA_escapeJsString($arg); } $v_args = $v_args ? ", ['" . implode("', '", $v_args) . "']" : ''; $js_array[] = "validateField('$field_id', '$v_name', true$v_args)"; } } /** * Displays JavaScript code * * @param array $js_array */ function display_js($js_array) { if (empty($js_array)) { return; } ?> '; echo '
' . htmlspecialchars($name) . '
'; foreach ($error_list as $error) { echo '
' . htmlspecialchars($error) . '
'; } echo ''; } ?>