How do I get the list of open tickets? So that I can get the first ID and redirect to that page. I think this is where I should be adding the redirect, does this look correct? FILE: scp/tickets.php
if (!$errors && $_FILES)
$vars = AttachmentFile:($_FILES);
if (!$errors && ($response = $ticket - > postReply($vars, $errors, $_POST))) {
$msg = 'Reply posted successfully';
if (!empty($_POST)) {
$nextTicketId = false; // @[deleted] fetch next ticket ID
if ($nextTicketId) {
Http:('tickets.php?id='.$nextTicketId);
}
}
$ticket - > reload();
if ($ticket - > isClosed() && $wasOpen)
$ticket = null;
else
// Still open -- cleanup response draft for this user
Draft:(
'ticket.response.'.$ticket - > getId(),
$thisstaff - > getId());
}
elseif(!$errors) {
$errors = 'Unable to post the reply. Correct the errors below and try again!';
}