function openreport($idrep = false) { if ($idrep != false && $idrep > 0) { $id_report = $idrep; } else { $id_report = $_SESSION['report_tempdata']['id_report']; if ($id_report != false && $idrep > 0) { load_filter($idrep, true, false); } } $query_report = "\r\n\tSELECT r.class_name, r.file_name, r.report_name, f.filter_name, f.filter_data, f.author\r\n\tFROM %lms_report AS r\r\n\t\tJOIN %lms_report_filter AS f\r\n\t\tON ( r.id_report = f.id_report )\r\n\tWHERE f.id_filter = '" . $idrep . "'"; $re_report = sql_query($query_report); list($class_name, $file_name, $report_name) = sql_fetch_row($re_report); if (sql_num_rows($re_report) == 0) { reportlist(); return; } require_once _lms_ . '/admin/modules/report/' . $file_name; $obj_report = new $class_name($id_report); return $obj_report; }
function reportDispatch($op) { if (isset($_POST['save_showed'])) { $op = 'report_schedule'; } switch ($op) { case "reportlist": reportlist(); break; case "report_category": report_category(); break; case "report_rows_filter": report_rows_filter(); break; case "report_sel_columns": report_sel_columns(); break; case "report_columns_filter": report_columns_filter(); break; case "report_save": if (Get::req('nosave', DOTY_INT, 0) > 0) { report_show_results(false); } report_save_filter(); break; case "show_results": report_show_results(Get::req('idrep', DOTY_INT, false)); break; case "modify_name": report_modify_name(); break; case "modify_rows": report_modify_rows(); break; case "modify_cols": report_modify_columns(); break; case "sched_mod": require_once _lms_ . '/admin/modules/report/report_schedule.php'; modify_schedulation(); break; case "report_open_filter": report_open_filter(); break; case "report_schedule": require_once _lms_ . '/admin/modules/report/report_schedule.php'; schedule_report(); break; case "schedulelist": schedulelist(); break; } // end switch }