コード例 #1
0
function set_export_defaults($format, $export)
{
    $defaults = get_export_defaults();
    $export['general'] = $defaults['general'];
    $export[$format] = $defaults[$format];
    if ($export['target']['option'] == 'file') {
        $export['target']['filename'] = fix_export_filename_suffix($defaults['target']['filename'], $format);
    }
    return $export;
}
コード例 #2
0
ファイル: data.php プロジェクト: silvadelphi/firebirdwebadmin
    }
}
//
// the Ready button on the dt_enter-panel was pushed
//
if (isset($_POST['dt_enter_ready']) || isset($_POST['dt_enter_insert']) && $s_cust['enter']['another_row'] == FALSE && empty($ib_error)) {
    $s_enter_name = '';
    $s_enter_values = array();
}
//
// the Export button on the csv-panel was pushed
//
if (have_panel_permissions($s_login['user'], 'dt_export', TRUE)) {
    include './inc/export.inc.php';
    if (empty($s_export)) {
        $s_export = get_export_defaults();
    }
    // set default values for general options and selected format options
    if (isset($_POST['dt_export_defaults'])) {
        $s_export = set_export_defaults($s_export['format'], $s_export);
    }
    if (isset($_POST['dt_export_doit'])) {
        $s_export = get_export_form_data($s_export);
        list($warning, $error) = check_export_form_data($s_export);
        if (empty($error) && empty($warning)) {
            // display result in an iframe by iframe_content.php
            if ($s_export['target']['option'] == 'screen') {
                // remove pending dbstat-jobs from session
                $s_iframejobs = array_filter($s_iframejobs, create_function('$a', '$a["job"]!="export";'));
                $iframekey_export = md5(uniqid('export'));
                $s_iframejobs[$iframekey_export] = array('job' => 'export', 'data' => $s_export, 'timestamp' => time());