status.'_text'; $warrantydate = warrantyStatus($responses->warranty_date); $service_date_due = serviceStatus($responses->service_date); $firmware_status = availableFirmware($responses->sw_version, $responses->hw_version); //GetPartnerDetails $partner_data = json_decode($responses->accounthierarchy); $salesid = getPartnerName($partner_data->salesid) ?? $not_specified; $soldto = getPartnerName($partner_data->soldto) ?? '-'; $shipto = getPartnerName($partner_data->shipto) ?? '-'; $location = getPartnerName($partner_data->location) ?? '-'; if (isset($partner_data->section)){$section = getPartnerName($partner_data->section) ?? '-';} else {$section = '-';} //Check if productcode is 0 and status if ($responses->productcode == 0 && $responses->status == 0) {$location = $product_location_raw;} if ($responses->productcode == 0 && $responses->status == 1) {$location = $product_location_SFG;} if ($responses->productcode == 0 && $responses->status == 2) {$location = $product_location_FG;} if ($update_allowed === 1){ if (isset($_POST['description'])) { //GET ALL POST DATA $data = json_encode($_POST, JSON_UNESCAPED_UNICODE); //Secure data $payload = generate_payload($data); //API call $responses = ioServer('/v1/history', $payload); if ($responses === 'NOK'){ } else { header('Location: index.php?page=equipment&equipmentID='.$_POST['equipmentid'].'&success_msg=2'); exit; } } } // Handle success messages if (isset($_GET['success_msg'])) { if ($_GET['success_msg'] == 1) { $success_msg = $message_eq_1; } if ($_GET['success_msg'] == 2) { $success_msg = $message_eq_2; } if ($_GET['success_msg'] == 3) { $success_msg = $message_eq_3; } } template_header('Asset', 'asset', 'view'); $view = '
'.$success_msg.'
'.$$status_text.'
'.$responses->serialnumber.'
'.$responses->equipmentID.'
'.$responses->productcode.'
'.$responses->productname.'
'.$salesid.'
'.$soldto.'
'.$shipto.'
'.$location.'
'.$section.'
| '.$warranty_status.' | '.$warrantydate.' |
| '.$service_status.' | '.$service_date_due.' |
| '.$software_status.' | '.$firmware_status.' |
| '.$equipment_label5.' | '.$responses->hw_version.' |
| '.$equipment_label6.' | '.$responses->sw_version.' |