if ($success) { if ($is_scheduler) { $_REQUEST['REPORT_RESULT'] = $focus->report_result; $_REQUEST['REPORT_RESULT_NAME'] = $focus->report_result_name; $_REQUEST['REPORT_RESULT_TYPE'] = $focus->report_result_type; } if ($focus->report_result_type == "FILE") { if (!empty($_REQUEST['parent_category'])) { $report = new ZuckerReport(); $report->container_id = $_REQUEST['parent_category']; if ($zuckerreports_config["debug"] == "yes") { $report->description = $focus->report_output; } $report->filename = $focus->report_result_name; $report->published = 0; $report->save(); $note = new Note(); $note->name = $focus->report_result_name; if ($zuckerreports_config["debug"] == "yes") { $note->description = $focus->report_output; } $note->filename = $focus->report_result_name; $note->parent_type = "ZuckerReport"; $note->parent_id = $report->id; $note->id = $report->id; $note->new_with_id = true; $note->save(); $uf = new UploadFile("upload"); $uf->set_for_soap($focus->report_result_name, file_get_contents($focus->report_result)); $uf->stored_file_name = $uf->create_stored_filename(); $uf->final_move($report->id);
<?php require_once 'include/formbase.php'; require_once 'include/upload_file.php'; require_once 'modules/ZuckerReports/ZuckerReport.php'; if (isset($_REQUEST['record'])) { $report = new ZuckerReport(); $report->retrieve($_REQUEST['record']); $report->published = 1; $return_id = $report->save(); handleRedirect($return_id, "ZuckerReports"); }