'.$button_back.'':''; //Check if allowed if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){ header('location: index.php'); exit; } //GET PARAMETERS $pagination_page = isset($_GET['p']) ? $_GET['p'] : 1; $status = isset($_GET['status']) ? '&status='.$_GET['status'] : ''; $search = isset($_GET['search']) ? '&search='.$_GET['search'] : ''; $equipmentid = isset($_GET['equipmentid']) ? '&equipmentid='.$_GET['equipmentid'] : ''; // Determine the URL $url = 'index.php?page=servicereports'.$status.$search.$equipmentid; //GET Details from URL $GET_VALUES = urlGETdetails($_GET) ?? ''; //CALL TO API FOR History $api_url = '/v1/history/type=ServiceReport&'.$GET_VALUES.''; $history = ioServer($api_url,''); //Decode Payload if (!empty($history)){$history = decode_payload($history);}else{$history = null;} //Return QueryTotal from API $api_url = '/v1/history/type=ServiceReport&'.$GET_VALUES.'&totals='; $query_total = ioServer($api_url,''); //Decode Payload if (!empty($query_total)){$query_total = decode_payload($query_total);}else{$query_total = null;} template_header('Servicereports', 'servicereports','view'); $view = '
'.$servicereports_p.'