0) ? (int)$_GET['page'] : 1; $limit = (isset($_GET['limit']) && (int)$_GET['limit'] > 0) ? (int)$_GET['limit'] : 10; if (!empty($loggedInUserInfo['users_page_limit']) && empty($_GET['limit'])) { $limit = $loggedInUserInfo['users_page_limit']; } $ticket = new Ticket($db); $isAdmin = $db->isAdmin($_SESSION['user_id']); $ticketOwner = (!$isAdmin ? $_SESSION['user_id'] : null); $ticketCount = $ticket->count((array)$ticketOwner); $tickets = $ticket->tickets($ticketOwner, $page, $limit); echo '

'.get_lang('support_tickets').'

'; echo ''; if ($tickets !== false && $ticketCount > 0) { echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; foreach ((array)$tickets as $t) { $date = new DateTime($t['last_updated']); echo ''; } echo '
'.get_lang('ticket_subject').''.get_lang('ticket_status').''.get_lang('ticket_updated').'
'. htmlentities($t['subject']) .' '. ticketCodeToName($t['status']) .' '. $date->format('jS M Y (H:i)') .'
'; echo '
'.paginationPages($ticketCount, $page, $limit, '?m=tickets&limit='.$limit.'&page=', 3, 'Tickets').'
'; } else { if ($ticketCount > 0) { echo '
' . get_lang('ticket_invalid_page_num') . '
'; } else { echo '
' . get_lang('no_tickets_submitted') . '
'; } } }