示例#1
0
/**
 * Prints Html For Export Options
 *
 * @param String $export_type Selected Export Type
 *
 * @return string
 */
function PMA_getHtmlForExportOptionsOutput($export_type)
{
    global $cfg;
    $html = '<div class="exportoptions" id="output">';
    $html .= '<h3>' . __('Output:') . '</h3>';
    $html .= '<ul id="ul_output">';
    $html .= '<li>';
    $html .= '<input type="radio" name="output_format" value="sendit" ';
    $html .= 'id="radio_dump_asfile" ';
    if (!isset($_GET['repopulate'])) {
        $html .= PMA_exportCheckboxCheck('asfile');
    }
    $html .= '/>';
    $html .= '<label for="radio_dump_asfile">' . __('Save output to a file') . '</label>';
    $html .= '<ul id="ul_save_asfile">';
    if (isset($cfg['SaveDir']) && !empty($cfg['SaveDir'])) {
        $html .= PMA_getHtmlForExportOptionsOutputSaveDir();
    }
    $html .= PMA_getHtmlForExportOptionsOutputFormat($export_type);
    // charset of file
    if ($GLOBALS['PMA_recoding_engine'] != PMA_CHARSET_NONE) {
        $html .= PMA_getHtmlForExportOptionsOutputCharset();
    }
    // end if
    $html .= PMA_getHtmlForExportOptionsOutputCompression();
    $html .= '</ul>';
    $html .= '</li>';
    $html .= PMA_getHtmlForExportOptionsOutputRadio();
    $html .= '</ul>';
    /*
     * @todo use sprintf() for better translatability, while keeping the
     *       <label></label> principle (for screen readers)
     */
    $html .= '<label for="maxsize">' . __('Skip tables larger than') . '</label>';
    $html .= '<input type="text" id="maxsize" name="maxsize" size="4">' . __('MiB');
    $html .= '</div>';
    return $html;
}
/**
 * Prints Html For Export Options
 *
 * @param String $export_type Selected Export Type
 *
 * @return string
 */
function PMA_getHtmlForExportOptionsOutput($export_type)
{
    global $cfg;
    $html = '<div class="exportoptions" id="output">';
    $html .= '<h3>' . __('Output:') . '</h3>';
    $html .= '<ul id="ul_output">';
    $html .= '<li><input type="checkbox" id="btn_alias_config" ';
    if (isset($_SESSION['tmpval']['aliases']) && !PMA_emptyRecursive($_SESSION['tmpval']['aliases'])) {
        $html .= 'checked="checked"';
    }
    unset($_SESSION['tmpval']['aliases']);
    $html .= '/>';
    $html .= '<label for="btn_alias_config">';
    $html .= __('Rename exported databases/tables/columns');
    $html .= '</label></li>';
    if ($export_type != 'server') {
        $html .= '<li>';
        $html .= '<input type="checkbox" name="lock_tables"';
        $html .= ' value="something" id="checkbox_lock_tables"';
        if (!isset($_GET['repopulate'])) {
            $html .= PMA_exportCheckboxCheck('lock_tables') . '/>';
        } elseif (isset($_GET['lock_tables'])) {
            $html .= ' checked="checked"';
        }
        $html .= '<label for="checkbox_lock_tables">';
        $html .= sprintf(__('Use %s statement'), '<code>LOCK TABLES</code>');
        $html .= '</label></li>';
    }
    $html .= '<li>';
    $html .= '<input type="radio" name="output_format" value="sendit" ';
    $html .= 'id="radio_dump_asfile" ';
    if (!isset($_GET['repopulate'])) {
        $html .= PMA_exportCheckboxCheck('asfile');
    }
    $html .= '/>';
    $html .= '<label for="radio_dump_asfile">' . __('Save output to a file') . '</label>';
    $html .= '<ul id="ul_save_asfile">';
    if (isset($cfg['SaveDir']) && !empty($cfg['SaveDir'])) {
        $html .= PMA_getHtmlForExportOptionsOutputSaveDir();
    }
    $html .= PMA_getHtmlForExportOptionsOutputFormat($export_type);
    // charset of file
    if ($GLOBALS['PMA_recoding_engine'] != PMA_CHARSET_NONE) {
        $html .= PMA_getHtmlForExportOptionsOutputCharset();
    }
    // end if
    $html .= PMA_getHtmlForExportOptionsOutputCompression();
    if ($export_type == 'server' || $export_type == 'database') {
        $html .= PMA_getHtmlForExportOptionsOutputSeparateFiles($export_type);
    }
    $html .= '</ul>';
    $html .= '</li>';
    $html .= PMA_getHtmlForExportOptionsOutputRadio();
    $html .= '</ul>';
    /*
     * @todo use sprintf() for better translatability, while keeping the
     *       <label></label> principle (for screen readers)
     */
    $html .= '<label for="maxsize">' . __('Skip tables larger than') . '</label>';
    $html .= '<input type="text" id="maxsize" name="maxsize" size="4">' . __('MiB');
    $html .= '</div>';
    return $html;
}
示例#3
0
/**
 * Prints Html For Export Options
 *
 * @param String $export_type Selected Export Type
 *
 * @return string
 */
function PMA_getHtmlForExportOptionsOutput($export_type)
{
    global $cfg;
    $html = '<div class="exportoptions" id="output">';
    $html .= '<h3>' . __('Output:') . '</h3>';
    $html .= '<ul id="ul_output">';
    $html .= '<li>';
    $html .= '<input type="radio" name="output_format" value="sendit" ';
    $html .= 'id="radio_dump_asfile" ';
    if (!isset($_GET['repopulate'])) {
        $html .= PMA_exportCheckboxCheck('asfile');
    }
    $html .= '/>';
    $html .= '<label for="radio_dump_asfile">' . __('Save output to a file') . '</label>';
    $html .= '<ul id="ul_save_asfile">';
    if (isset($cfg['SaveDir']) && !empty($cfg['SaveDir'])) {
        $html .= PMA_getHtmlForExportOptionsOutputSaveDir();
    }
    $html .= PMA_getHtmlForExportOptionsOutputFormat($export_type);
    // charset of file
    if ($GLOBALS['PMA_recoding_engine'] != PMA_CHARSET_NONE) {
        $html .= PMA_getHtmlForExportOptionsOutputCharset();
    }
    // end if
    $html .= PMA_getHtmlForExportOptionsOutputCompression();
    $html .= '</ul>';
    $html .= '</li>';
    $html .= PMA_getHtmlForExportOptionsOutputRadio();
    $html .= '</ul>';
    $html .= '</div>';
    return $html;
}