コード例 #1
0
function get_export_form_data($old)
{
    $export = array('format' => get_request_data('dt_export_format'), 'source' => array('option' => get_request_data('dt_export_source'), 'table' => get_request_data('dt_export_source_table'), 'dbtables' => get_request_data('dt_export_source_dbtables'), 'query' => get_request_data('dt_export_query')), 'target' => array('option' => get_request_data('dt_export_target'), 'filename' => get_request_data('dt_export_target_filename')), 'general' => array('replnull' => get_request_data('dt_export_replnull'), 'date' => get_request_data('dt_export_date'), 'time' => get_request_data('dt_export_time')), 'csv' => array('fterm' => get_request_data('dt_export_csv_fterm'), 'fencl' => get_request_data('dt_export_csv_fencl'), 'ftencl' => get_request_data('dt_export_csv_ftencl'), 'fesc' => get_request_data('dt_export_csv_fesc'), 'lterm' => get_request_data('dt_export_csv_lterm'), 'fnamesf' => (bool) get_request_data('dt_export_csv_fnamesf')), 'sql' => array('cnames' => (bool) get_request_data('dt_export_sql_cnames'), 'qnames' => (bool) get_request_data('dt_export_sql_qnames'), 'cfields' => (bool) get_request_data('dt_export_sql_cfields'), 'info' => (bool) get_request_data('dt_export_sql_info'), 'lineend' => get_request_data('dt_export_sql_lineend'), 'ttable' => get_request_data('dt_export_sql_ttable')));
    foreach (array_keys(get_export_formats()) as $format) {
        if ($format != $export['format'] && !empty($old[$format])) {
            $export[$format] = $old[$format];
        }
    }
    return $export;
}
コード例 #2
0
function data_export_format_options($format)
{
    require '../inc/export.inc.php';
    if (in_array($format, array_keys(get_export_formats()))) {
        $GLOBALS['s_export']['target']['filename'] = fix_export_filename_suffix($GLOBALS['s_export']['target']['filename'], $format);
        $GLOBALS['s_export']['format'] = $format;
        $html = export_format_options_table($GLOBALS['s_export']);
        header('Content-Type: text/html;charset=' . $GLOBALS['charset']);
        echo $html;
    }
}
コード例 #3
0
    ?>
    <form method="post" action="<?php 
    echo url_session($_SERVER['PHP_SELF']) . '#dt_export';
    ?>
" name="dt_csv_form" enctype="multipart/form-data">
        <table class="table table-bordered">
            <tr>
                <td valign="top">
                    <table class="table table-bordered">
                        <tr>
                            <th align="left">Format</th>
                        </tr>
                        <tr>
                            <td>
                                <?php 
    echo get_indexed_selectlist('dt_export_format', get_export_formats(), $s_export['format'], FALSE, array('onChange' => 'replaceExportFormatOptions(this.value);'));
    ?>
                            </td>
                        </tr>
                    </table>
                </td>
                <td valign="top">
                    <table class="table table-bordered">
                        <tr>
                            <th align="left" colspan="2">Source</th>
                        </tr>
                        <tr>
                            <td valign="top">
                                <?php 
    echo get_indexed_selectlist('dt_export_source', get_export_sources(), $s_export['source']['option'], FALSE, array('onChange' => 'setExportSource(this.value);'));
    ?>