diff --git a/tickets.php b/tickets.php index 6e32582b..d15944e6 100644 --- a/tickets.php +++ b/tickets.php @@ -36,7 +36,28 @@ $disp = "ASC"; } + // Ticket status from GET + if (isset($_GET['status']) && ($_GET['status']) == 'Open') { + $status = 'Open'; + } + elseif (isset($_GET['status']) && ($_GET['status']) == 'Closed') { + $status = 'Closed'; + } + else { + $status = '%'; + } + if(isset($_GET['status'])) { + unset($_GET['status']); + } + //Date Filter + + if (empty($_GET['canned_date'])) { + //Prevents lots of undefined variable errors. + // $dtf and $dtt will be set by the below else to 0000-00-00 / 9999-00-00 + $_GET['canned_date'] = 'custom'; + } + if($_GET['canned_date'] == "custom" AND !empty($_GET['dtf'])){ $dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']); $dtt = mysqli_real_escape_string($mysqli,$_GET['dtt']); @@ -109,9 +130,10 @@