diff --git a/admin/reports_gen.php b/admin/reports_gen.php index 3e2bd6f1..25fd6836 100644 --- a/admin/reports_gen.php +++ b/admin/reports_gen.php @@ -35,6 +35,10 @@ if($format == '') $format = NULL; - report_gen_by_id($id, $year, $format); - + if($id && $year) + report_gen_by_id($id, $year, $format); + else { + header("Location: reports.php"); + exit; + } ?>