/**
 * Get HTML for properties items
 *
 * @param string              $section      name of config section in
 *                                          $GLOBALS['cfg'][$section] for plugin
 * @param string              $plugin_name  unique plugin name
 * @param OptionsPropertyItem $propertyItem Property item
 *
 * @return string
 */
function PMA_getHtmlForProperty($section, $plugin_name, $propertyItem)
{
    $ret = null;
    $property_class = get_class($propertyItem);
    switch ($property_class) {
        case 'PMA\\libraries\\properties\\options\\items\\BoolPropertyItem':
            $ret .= '<li>' . "\n";
            $ret .= '<input type="checkbox" name="' . $plugin_name . '_' . $propertyItem->getName() . '"' . ' value="something" id="checkbox_' . $plugin_name . '_' . $propertyItem->getName() . '"' . ' ' . PMA_pluginCheckboxCheck($section, $plugin_name . '_' . $propertyItem->getName());
            if ($propertyItem->getForce() != null) {
                // Same code is also few lines lower, update both if needed
                $ret .= ' onclick="if (!this.checked &amp;&amp; ' . '(!document.getElementById(\'checkbox_' . $plugin_name . '_' . $propertyItem->getForce() . '\') ' . '|| !document.getElementById(\'checkbox_' . $plugin_name . '_' . $propertyItem->getForce() . '\').checked)) ' . 'return false; else return true;"';
            }
            $ret .= ' />';
            $ret .= '<label for="checkbox_' . $plugin_name . '_' . $propertyItem->getName() . '">' . PMA_getString($propertyItem->getText()) . '</label>';
            break;
        case 'PMA\\libraries\\properties\\options\\items\\DocPropertyItem':
            echo 'PMA\\libraries\\properties\\options\\items\\DocPropertyItem';
            break;
        case 'PMA\\libraries\\properties\\options\\items\\HiddenPropertyItem':
            $ret .= '<li><input type="hidden" name="' . $plugin_name . '_' . $propertyItem->getName() . '"' . ' value="' . PMA_pluginGetDefault($section, $plugin_name . '_' . $propertyItem->getName()) . '"' . ' /></li>';
            break;
        case 'PMA\\libraries\\properties\\options\\items\\MessageOnlyPropertyItem':
            $ret .= '<li>' . "\n";
            $ret .= '<p>' . PMA_getString($propertyItem->getText()) . '</p>';
            break;
        case 'PMA\\libraries\\properties\\options\\items\\RadioPropertyItem':
            $default = PMA_pluginGetDefault($section, $plugin_name . '_' . $propertyItem->getName());
            foreach ($propertyItem->getValues() as $key => $val) {
                $ret .= '<li><input type="radio" name="' . $plugin_name . '_' . $propertyItem->getName() . '" value="' . $key . '" id="radio_' . $plugin_name . '_' . $propertyItem->getName() . '_' . $key . '"';
                if ($key == $default) {
                    $ret .= ' checked="checked"';
                }
                $ret .= ' />' . '<label for="radio_' . $plugin_name . '_' . $propertyItem->getName() . '_' . $key . '">' . PMA_getString($val) . '</label></li>';
            }
            break;
        case 'PMA\\libraries\\properties\\options\\items\\SelectPropertyItem':
            $ret .= '<li>' . "\n";
            $ret .= '<label for="select_' . $plugin_name . '_' . $propertyItem->getName() . '" class="desc">' . PMA_getString($propertyItem->getText()) . '</label>';
            $ret .= '<select name="' . $plugin_name . '_' . $propertyItem->getName() . '"' . ' id="select_' . $plugin_name . '_' . $propertyItem->getName() . '">';
            $default = PMA_pluginGetDefault($section, $plugin_name . '_' . $propertyItem->getName());
            foreach ($propertyItem->getValues() as $key => $val) {
                $ret .= '<option value="' . $key . '"';
                if ($key == $default) {
                    $ret .= ' selected="selected"';
                }
                $ret .= '>' . PMA_getString($val) . '</option>';
            }
            $ret .= '</select>';
            break;
        case 'PMA\\libraries\\properties\\options\\items\\TextPropertyItem':
        case 'PMA\\libraries\\properties\\options\\items\\NumberPropertyItem':
            $ret .= '<li>' . "\n";
            $ret .= '<label for="text_' . $plugin_name . '_' . $propertyItem->getName() . '" class="desc">' . PMA_getString($propertyItem->getText()) . '</label>';
            $ret .= '<input type="text" name="' . $plugin_name . '_' . $propertyItem->getName() . '"' . ' value="' . PMA_pluginGetDefault($section, $plugin_name . '_' . $propertyItem->getName()) . '"' . ' id="text_' . $plugin_name . '_' . $propertyItem->getName() . '"' . ($propertyItem->getSize() != null ? ' size="' . $propertyItem->getSize() . '"' : '') . ($propertyItem->getLen() != null ? ' maxlength="' . $propertyItem->getLen() . '"' : '') . ' />';
            break;
        default:
            break;
    }
    return $ret;
}
/**
 * Prints Html For Display Import options : Partial Import
 *
 * @param String $timeout_passed timeout passed
 * @param String $offset         timeout offset
 *
 * @return string
 */
function PMA_getHtmlForImportOptionsPartialImport($timeout_passed, $offset)
{
    $html = '    <div class="importoptions">';
    $html .= '        <h3>' . __('Partial import:') . '</h3>';
    if (isset($timeout_passed) && $timeout_passed) {
        $html .= '<div class="formelementrow">' . "\n";
        $html .= '<input type="hidden" name="skip" value="' . $offset . '" />';
        $html .= sprintf(__('Previous import timed out, after resubmitting ' . 'will continue from position %d.'), $offset);
        $html .= '</div>' . "\n";
    }
    $html .= '        <div class="formelementrow">';
    $html .= '           <input type="checkbox" name="allow_interrupt" value="yes"';
    $html .= '                  id="checkbox_allow_interrupt" ' . PMA_pluginCheckboxCheck('Import', 'allow_interrupt') . '/>';
    $html .= '            <label for="checkbox_allow_interrupt">' . __('Allow the interruption of an import in case the script detects ' . 'it is close to the PHP timeout limit. <i>(This might be a good way' . ' to import large files, however it can break transactions.)</i>') . '</label><br />';
    $html .= '        </div>';
    if (!(isset($timeout_passed) && $timeout_passed)) {
        $html .= '        <div class="formelementrow">';
        $html .= '            <label for="text_skip_queries">' . __('Skip this number of queries (for SQL) or lines (for other ' . 'formats), starting from the first one:') . '</label>';
        $html .= '            <input type="number" name="skip_queries" value="' . PMA_pluginGetDefault('Import', 'skip_queries') . '" id="text_skip_queries" min="0" />';
        $html .= '        </div>';
    } else {
        // If timeout has passed,
        // do not show the Skip dialog to avoid the risk of someone
        // entering a value here that would interfere with "skip"
        $html .= '         <input type="hidden" name="skip_queries" value="' . PMA_pluginGetDefault('Import', 'skip_queries') . '" id="text_skip_queries" />';
    }
    $html .= '    </div>';
    return $html;
}
    echo __('Number of rows to skip, starting from the first row:');
    ?>
</label>
            <input type="text" name="skip_queries" value="<?php 
    echo PMA_pluginGetDefault('Import', 'skip_queries');
    ?>
" id="text_skip_queries" />
        </div>
            <?php 
} else {
    // If timeout has passed,
    // do not show the Skip dialog to avoid the risk of someone
    // entering a value here that would interfere with "skip"
    ?>
        <input type="hidden" name="skip_queries" value="<?php 
    echo PMA_pluginGetDefault('Import', 'skip_queries');
    ?>
" id="text_skip_queries" />
            <?php 
}
?>
    </div>

    <div class="importoptions">
        <h3><?php 
echo __('Format:');
?>
</h3>
        <?php 
echo PMA_pluginGetChoice('Import', 'format', $import_list);
?>
Example #4
0
/**
 * string PMA_pluginGetOneOption(string $section, string $plugin_name, string $id, array &$opt)
 *
 * returns single option in a table row
 *
 * @uses    PMA_getString()
 * @uses    PMA_pluginCheckboxCheck()
 * @uses    PMA_pluginGetDefault()
 * @param   string  $section        name of config section in
 *                                  $GLOBALS['cfg'][$section] for plugin
 * @param   string  $plugin_name    unique plugin name
 * @param   string  $id             option id
 * @param   array   &$opt           plugin option details
 * @return  string                  table row with option
 */
function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt)
{
    $ret = "\n";
    if ($opt['type'] == 'bool') {
        $ret .= '<div class="formelementrow">' . "\n";
        $ret .= '<input type="checkbox" name="' . $plugin_name . '_' . $opt['name'] . '"' . ' value="something" id="checkbox_' . $plugin_name . '_' . $opt['name'] . '"' . ' ' . PMA_pluginCheckboxCheck($section, $plugin_name . '_' . $opt['name']);
        if (isset($opt['force'])) {
            /* Same code is also few lines lower, update both if needed */
            $ret .= ' onclick="if (!this.checked &amp;&amp; ' . '(!document.getElementById(\'checkbox_' . $plugin_name . '_' . $opt['force'] . '\') ' . '|| !document.getElementById(\'checkbox_' . $plugin_name . '_' . $opt['force'] . '\').checked)) ' . 'return false; else return true;"';
        }
        $ret .= ' />';
        $ret .= '<label for="checkbox_' . $plugin_name . '_' . $opt['name'] . '">' . PMA_getString($opt['text']) . '</label>';
        $ret .= '</div>' . "\n";
    } elseif ($opt['type'] == 'text') {
        $ret .= '<div class="formelementrow">' . "\n";
        $ret .= '<label for="text_' . $plugin_name . '_' . $opt['name'] . '" class="desc">' . PMA_getString($opt['text']) . '</label>';
        $ret .= '<input type="text" name="' . $plugin_name . '_' . $opt['name'] . '"' . ' value="' . PMA_pluginGetDefault($section, $plugin_name . '_' . $opt['name']) . '"' . ' id="text_' . $plugin_name . '_' . $opt['name'] . '"' . (isset($opt['size']) ? ' size="' . $opt['size'] . '"' : '') . (isset($opt['len']) ? ' maxlength="' . $opt['len'] . '"' : '') . ' />';
        $ret .= '</div>' . "\n";
    } elseif ($opt['type'] == 'message_only') {
        $ret .= '<div class="formelementrow">' . "\n";
        $ret .= '<label for="text_' . $plugin_name . '_' . $opt['name'] . '" class="desc">' . PMA_getString($opt['text']) . '</label>';
        $ret .= '</div>' . "\n";
    } elseif ($opt['type'] == 'select') {
        $ret .= '<div class="formelementrow">' . "\n";
        $ret .= '<label for="select_' . $plugin_name . '_' . $opt['name'] . '" class="desc">' . PMA_getString($opt['text']) . '</label>';
        $ret .= '<select name="' . $plugin_name . '_' . $opt['name'] . '"' . ' id="select_' . $plugin_name . '_' . $opt['name'] . '">';
        $default = PMA_pluginGetDefault($section, $plugin_name . '_' . $opt['name']);
        foreach ($opt['values'] as $key => $val) {
            $ret .= '<option name="' . $key . '"';
            if ($key == $default) {
                $ret .= ' selected="selected"';
            }
            $ret .= '>' . PMA_getString($val) . '</option>';
        }
        $ret .= '</select>';
        $ret .= '</div>' . "\n";
    } elseif ($opt['type'] == 'hidden') {
        $ret .= '<input type="hidden" name="' . $plugin_name . '_' . $opt['name'] . '"' . ' value="' . PMA_pluginGetDefault($section, $plugin_name . '_' . $opt['name']) . '"' . ' />';
    } elseif ($opt['type'] == 'bgroup') {
        $ret .= '<fieldset><legend>';
        /* No checkbox without name */
        if (!empty($opt['name'])) {
            $ret .= '<input type="checkbox" name="' . $plugin_name . '_' . $opt['name'] . '"' . ' value="something" id="checkbox_' . $plugin_name . '_' . $opt['name'] . '"' . ' ' . PMA_pluginCheckboxCheck($section, $plugin_name . '_' . $opt['name']);
            if (isset($opt['force'])) {
                /* Same code is also few lines higher, update both if needed */
                $ret .= ' onclick="if (!this.checked &amp;&amp; ' . '(!document.getElementById(\'checkbox_' . $plugin_name . '_' . $opt['force'] . '\') ' . '|| !document.getElementById(\'checkbox_' . $plugin_name . '_' . $opt['force'] . '\').checked)) ' . 'return false; else return true;"';
            }
            $ret .= ' />';
            $ret .= '<label for="checkbox_' . $plugin_name . '_' . $opt['name'] . '">' . PMA_getString($opt['text']) . '</label>';
        } else {
            $ret .= PMA_getString($opt['text']);
        }
        $ret .= '</legend>';
    } elseif ($opt['type'] == 'egroup') {
        $ret .= '</fieldset>';
    } else {
        /* This should be seen only by plugin writers, so I do not thing this
         * needs translation. */
        $ret .= 'UNKNOWN OPTION ' . $opt['type'] . ' IN IMPORT PLUGIN ' . $plugin_name . '!';
    }
    if (isset($opt['doc'])) {
        $ret .= PMA_showMySQLDocu($opt['doc'][0], $opt['doc'][1]);
    }
    $ret .= "\n";
    return $ret;
}
Example #5
0
/**
 * Returns html div with editable options for plugin
 *
 * @param string $section name of config section in $GLOBALS['cfg'][$section]
 * @param array &$list array with plugin instances
 *
 * @return string  html fieldset with plugin options
 */
function PMA_pluginGetOptions($section, &$list)
{
    $ret = '';
    $default = PMA_pluginGetDefault('Export', 'format');
    // Options for plugins that support them
    foreach ($list as $plugin) {
        $properties = $plugin->getProperties();
        if ($properties != null) {
            $text = $properties->getText();
            $options = $properties->getOptions();
        }
        $plugin_name = strtolower(substr(get_class($plugin), strlen($section)));
        $ret .= '<div id="' . $plugin_name . '_options" class="format_specific_options">';
        $ret .= '<h3>' . PMA_getString($text) . '</h3>';
        $no_options = true;
        if ($options != null && count($options) > 0) {
            foreach ($options->getProperties() as $propertyMainGroup) {
                // check for hidden properties
                $no_options = true;
                foreach ($propertyMainGroup->getProperties() as $propertyItem) {
                    if (strcmp("HiddenPropertyItem", get_class($propertyItem))) {
                        $no_options = false;
                        break;
                    }
                }
                $ret .= PMA_pluginGetOneOption($section, $plugin_name, $propertyMainGroup);
            }
        }
        if ($no_options) {
            $ret .= '<p>' . __('This format has no options') . '</p>';
        }
        $ret .= '</div>';
    }
    return $ret;
}
/**
 * Returns single option in a list element
 *
 * @param string  $section        name of config section in
 *                               $GLOBALS['cfg'][$section] for plugin
 * @param string  $plugin_name    unique plugin name
 * @param array   &$propertyGroup options property main group instance
 * @param boolean $is_subgroup    if this group is a subgroup
 *
 * @return string  table row with option
 */
function PMA_pluginGetOneOption($section, $plugin_name, &$propertyGroup, $is_subgroup = false)
{
    $ret = "\n";
    if (!$is_subgroup) {
        // for subgroup headers
        if (strpos(get_class($propertyGroup), "PropertyItem")) {
            $properties = array($propertyGroup);
        } else {
            // for main groups
            $ret .= '<div class="export_sub_options" id="' . $plugin_name . '_' . $propertyGroup->getName() . '">';
            if (method_exists($propertyGroup, 'getText')) {
                $text = $propertyGroup->getText();
            }
            if ($text != null) {
                $ret .= '<h4>' . PMA_getString($text) . '</h4>';
            }
            $ret .= '<ul>';
        }
    }
    if (!isset($properties)) {
        $not_subgroup_header = true;
        if (method_exists($propertyGroup, 'getProperties')) {
            $properties = $propertyGroup->getProperties();
        }
    }
    if (isset($properties)) {
        foreach ($properties as $propertyItem) {
            $property_class = get_class($propertyItem);
            // if the property is a subgroup, we deal with it recursively
            if (strpos($property_class, "Subgroup")) {
                // for subgroups
                // each subgroup can have a header, which may also be a form element
                $subgroup_header = $propertyItem->getSubgroupHeader();
                if (isset($subgroup_header)) {
                    $ret .= PMA_pluginGetOneOption($section, $plugin_name, $subgroup_header);
                }
                $ret .= '<li class="subgroup"><ul';
                if (isset($subgroup_header)) {
                    $ret .= ' id="ul_' . $subgroup_header->getName() . '">';
                } else {
                    $ret .= '>';
                }
                $ret .= PMA_pluginGetOneOption($section, $plugin_name, $propertyItem, true);
            } else {
                // single property item
                switch ($property_class) {
                    case "BoolPropertyItem":
                        $ret .= '<li>' . "\n";
                        $ret .= '<input type="checkbox" name="' . $plugin_name . '_' . $propertyItem->getName() . '"' . ' value="something" id="checkbox_' . $plugin_name . '_' . $propertyItem->getName() . '"' . ' ' . PMA_pluginCheckboxCheck($section, $plugin_name . '_' . $propertyItem->getName());
                        if ($propertyItem->getForce() != null) {
                            // Same code is also few lines lower, update both if needed
                            $ret .= ' onclick="if (!this.checked &amp;&amp; ' . '(!document.getElementById(\'checkbox_' . $plugin_name . '_' . $propertyItem->getForce() . '\') ' . '|| !document.getElementById(\'checkbox_' . $plugin_name . '_' . $propertyItem->getForce() . '\').checked)) ' . 'return false; else return true;"';
                        }
                        $ret .= ' />';
                        $ret .= '<label for="checkbox_' . $plugin_name . '_' . $propertyItem->getName() . '">' . PMA_getString($propertyItem->getText()) . '</label>';
                        break;
                    case "DocPropertyItem":
                        echo "DocPropertyItem";
                        break;
                    case "HiddenPropertyItem":
                        $ret .= '<li><input type="hidden" name="' . $plugin_name . '_' . $propertyItem->getName() . '"' . ' value="' . PMA_pluginGetDefault($section, $plugin_name . '_' . $propertyItem->getName()) . '"' . ' /></li>';
                        break;
                    case "MessageOnlyPropertyItem":
                        $ret .= '<li>' . "\n";
                        $ret .= '<p>' . PMA_getString($propertyItem->getText()) . '</p>';
                        break;
                    case "RadioPropertyItem":
                        $default = PMA_pluginGetDefault($section, $plugin_name . '_' . $propertyItem->getName());
                        foreach ($propertyItem->getValues() as $key => $val) {
                            $ret .= '<li><input type="radio" name="' . $plugin_name . '_' . $propertyItem->getName() . '" value="' . $key . '" id="radio_' . $plugin_name . '_' . $propertyItem->getName() . '_' . $key . '"';
                            if ($key == $default) {
                                $ret .= ' checked="checked"';
                            }
                            $ret .= ' />' . '<label for="radio_' . $plugin_name . '_' . $propertyItem->getName() . '_' . $key . '">' . PMA_getString($val) . '</label></li>';
                        }
                        break;
                    case "SelectPropertyItem":
                        $ret .= '<li>' . "\n";
                        $ret .= '<label for="select_' . $plugin_name . '_' . $propertyItem->getName() . '" class="desc">' . PMA_getString($propertyItem->getText()) . '</label>';
                        $ret .= '<select name="' . $plugin_name . '_' . $propertyItem->getName() . '"' . ' id="select_' . $plugin_name . '_' . $propertyItem->getName() . '">';
                        $default = PMA_pluginGetDefault($section, $plugin_name . '_' . $propertyItem->getName());
                        foreach ($propertyItem->getValues() as $key => $val) {
                            $ret .= '<option value="' . $key . '"';
                            if ($key == $default) {
                                $ret .= ' selected="selected"';
                            }
                            $ret .= '>' . PMA_getString($val) . '</option>';
                        }
                        $ret .= '</select>';
                        break;
                    case "TextPropertyItem":
                    case "NumberPropertyItem":
                        $ret .= '<li>' . "\n";
                        $ret .= '<label for="text_' . $plugin_name . '_' . $propertyItem->getName() . '" class="desc">' . PMA_getString($propertyItem->getText()) . '</label>';
                        $ret .= '<input type="text" name="' . $plugin_name . '_' . $propertyItem->getName() . '"' . ' value="' . PMA_pluginGetDefault($section, $plugin_name . '_' . $propertyItem->getName()) . '"' . ' id="text_' . $plugin_name . '_' . $propertyItem->getName() . '"' . ($propertyItem->getSize() != null ? ' size="' . $propertyItem->getSize() . '"' : '') . ($propertyItem->getLen() != null ? ' maxlength="' . $propertyItem->getLen() . '"' : '') . ' />';
                        break;
                    default:
                }
            }
        }
    }
    if ($is_subgroup) {
        // end subgroup
        $ret .= '</ul></li>';
    } else {
        // end main group
        if (!empty($not_subgroup_header)) {
            $ret .= '</ul></div>';
        }
    }
    if (method_exists($propertyGroup, "getDoc")) {
        $doc = $propertyGroup->getDoc();
        if ($doc != null) {
            if (count($doc) == 3) {
                $ret .= PMA_Util::showMySQLDocu($doc[1], false, $doc[2]);
            } elseif (count($doc) == 1) {
                $ret .= PMA_Util::showDocu('faq', $doc[0]);
            } else {
                $ret .= PMA_Util::showMySQLDocu($doc[1]);
            }
        }
    }
    // Close the list element after $doc link is displayed
    if (isset($property_class)) {
        if ($property_class == 'BoolPropertyItem' || $property_class == 'MessageOnlyPropertyItem' || $property_class == 'SelectPropertyItem' || $property_class == 'TextPropertyItem') {
            $ret .= '</li>';
        }
    }
    $ret .= "\n";
    return $ret;
}
Example #7
0
/**
 * string PMA_pluginGetOneOption(string $section, string $plugin_name, string $id, array &$opt)
 *
 * returns single option in a table row
 *
 * @uses    PMA_getString()
 * @uses    PMA_pluginCheckboxCheck()
 * @uses    PMA_pluginGetDefault()
 * @param   string  $section        name of config section in
 *                                  $GLOBALS['cfg'][$section] for plugin
 * @param   string  $plugin_name    unique plugin name
 * @param   string  $id             option id
 * @param   array   &$opt           plugin option details
 * @return  string                  table row with option
 */
function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt)
{
    $ret = '';
    $ret .= '<tr>';
    if ($opt['type'] == 'bool') {
        $ret .= '<td colspan="2">';
        $ret .= '<input type="checkbox" name="' . $plugin_name . '_' . $opt['name'] . '"' . ' value="something" id="checkbox_' . $plugin_name . '_' . $opt['name'] . '"' . ' ' . PMA_pluginCheckboxCheck($section, $plugin_name . '_' . $opt['name']) . ' />';
        $ret .= '<label for="checkbox_' . $plugin_name . '_' . $opt['name'] . '">' . PMA_getString($opt['text']) . '</label>';
        $ret .= '</td>';
    } elseif ($opt['type'] == 'text') {
        $ret .= '<td>';
        $ret .= '<label for="text_' . $plugin_name . '_' . $opt['name'] . '">' . PMA_getString($opt['text']) . '</label>';
        $ret .= '</td><td>';
        $ret .= '<input type="text" name="' . $plugin_name . '_' . $opt['name'] . '"' . ' value="' . PMA_pluginGetDefault($section, $plugin_name . '_' . $opt['name']) . '"' . ' id="text_' . $plugin_name . '_' . $opt['name'] . '"' . (isset($opt['size']) ? ' size="' . $opt['size'] . '"' : '') . (isset($opt['len']) ? ' maxlength="' . $opt['len'] . '"' : '') . ' />';
        $ret .= '</td>';
    } else {
        /* This should be seen only by plugin writers, so I do not thing this
         * needs translation. */
        $ret .= '<td colspan="2">';
        $ret .= 'UNKNOWN OPTION IN IMPORT PLUGIN ' . $plugin_name . '!';
        $ret .= '</td>';
    }
    $ret .= '</tr>';
    return $ret;
}
/**
 * string PMA_pluginGetOptions(string $section, array &$list)
 *
 * return html div with editable options for plugin
 *
 * @uses    PMA_getString()
 * @uses    PMA_pluginGetOneOption()
 * @uses    PMA_pluginGetDefault();
 * @param   string  $section    name of config section in $GLOBALS['cfg'][$section]
 * @param   array   &$list      array with plugin configuration defined in plugin file
 * @return  string              html fieldset with plugin options
 */
function PMA_pluginGetOptions($section, &$list)
{
    $ret = '';
    $default = PMA_pluginGetDefault('Export', 'format');
    // Options for plugins that support them
    foreach ($list as $plugin_name => $val) {
        $ret .= '<div id="' . $plugin_name . '_options" class="format_specific_options">';
        $count = 0;
        $ret .= '<h3>' . PMA_getString($val['text']) . '</h3>';
        if (isset($val['options']) && count($val['options']) > 0) {
            foreach ($val['options'] as $id => $opt) {
                if ($opt['type'] != 'hidden' && $opt['type'] != 'begin_group' && $opt['type'] != 'end_group' && $opt['type'] != 'begin_subgroup' && $opt['type'] != 'end_subgroup') {
                    $count++;
                }
                $ret .= PMA_pluginGetOneOption($section, $plugin_name, $id, $opt);
            }
        }
        if ($count == 0) {
            $ret .= '<p>' . __('This format has no options') . '</p>';
        }
        $ret .= '</div>';
    }
    return $ret;
}
        </div>

        <?php
        if (! (isset($timeout_passed) && $timeout_passed)) {
        ?>
        <div class="formelementrow">
        <label for="text_skip_queries"><?php echo $strSkipQueries; ?></label>
        <input type="text" name="skip_queries" value="<?php echo PMA_pluginGetDefault('Import', 'skip_queries');?>" id="text_skip_queries" />
        </div>
        <?php
        } else {
        // If timeout has passed,
        // do not show the Skip dialog to avoid the risk of someone
        // entering a value here that would interfere with "skip"
        ?>
        <input type="hidden" name="skip_queries" value="<?php echo PMA_pluginGetDefault('Import', 'skip_queries');?>" id="text_skip_queries" />
        <?php
        }
        ?>
    </fieldset>

    <fieldset class="options">
        <legend><?php echo $strImportFormat; ?></legend>
<?php
// Let's show format options now
echo '<div style="float: left;">';
echo PMA_pluginGetChoice('Import', 'format', $import_list);
echo '</div>';

echo '<div style="float: left;">';
echo PMA_pluginGetOptions('Import', $import_list);