ob_start(); $null_list = array(); $pony_db->get_log_list($null_list, 0, 0, true); $log_list_data = ob_get_contents(); ob_end_clean(); create_zip_and_send('log.txt', $log_list_data); } else { set_common_file_download_header('log.txt'); $null_list = array(); $pony_db->get_log_list($null_list, 0, 0, true); } die; } if ($admin_routine == 'download_report' && $admin_action == 'reports') { $report_id = trim(assign($_REQUEST['report_id'])); $report_item_result = $pony_db->get_report_item($report_id); if ($pony_db->state && is_array($report_item_result)) { set_common_file_download_header('report_' . strval(intval($report_id)) . '.bin', 'application/octet-stream'); header("Content-Length: " . strlen($report_item_result['data'])); echo $report_item_result['data']; } else { die('Report not found!'); } die; } if ($admin_routine == 'filter_download' && $admin_action == 'ftp') { if ($use_zip) { set_common_file_download_header('filtered_list.zip', 'application/zip'); ob_start(); apply_data_filters($smarty, true); $filter_list_data = ob_get_contents();