Back':''; // Fallback translations if (!isset($button_cancel)) $button_cancel = 'Cancel'; //Check if allowed if (isAllowed($page,$_SESSION['authorization']['profile'],$_SESSION['authorization']['permission'],'R') === 0){ header('location: index.php'); exit; } //GET PARAMETERS && STORE in SESSION for FURTHER USE/NAVIGATION $pagination_page = $_SESSION['p'] = isset($_GET['p']) ? $_GET['p'] : 1; //PAGE Security $page_manage = 'products_software_version_manage'; $update_allowed = isAllowed($page ,$_SESSION['authorization']['profile'],$_SESSION['authorization']['permission'],'U'); $update_allowed_edit = isAllowed($page_manage ,$_SESSION['authorization']['profile'],$_SESSION['authorization']['permission'],'U'); $delete_allowed = isAllowed($page_manage ,$_SESSION['authorization']['profile'],$_SESSION['authorization']['permission'],'D'); $create_allowed = isAllowed($page_manage ,$_SESSION['authorization']['profile'],$_SESSION['authorization']['permission'],'C'); //GET Details from URL $GET_VALUES = urlGETdetails($_GET) ?? ''; //CALL TO API FOR General information $api_url = '/v2/products_software_versions/'.$GET_VALUES; $responses = ioServer($api_url,''); //Decode Payload if (!empty($responses)){$responses = json_decode($responses);}else{$responses = null;} $responses = $responses[0]; //CALL TO API FOR Related Licenses $api_url = '/v2/products_software_licenses/version_id='.$_GET['rowID']; $licenses = ioServer($api_url,''); //Decode Payload if (!empty($licenses)){$licenses = json_decode($licenses);}else{$licenses = null;} //CALL TO API FOR Upgrade Paths $api_url = '/v2/products_software_upgrade_paths/from_version_id='.$_GET['rowID']; $upgrade_paths_from = ioServer($api_url,''); //Decode Payload if (!empty($upgrade_paths_from)){$upgrade_paths_from = json_decode($upgrade_paths_from);}else{$upgrade_paths_from = null;} $api_url = '/v2/products_software_upgrade_paths/to_version_id='.$_GET['rowID']; $upgrade_paths_to = ioServer($api_url,''); //Decode Payload if (!empty($upgrade_paths_to)){$upgrade_paths_to = json_decode($upgrade_paths_to);}else{$upgrade_paths_to = null;} // Fetch all software versions for mapping $api_url = '/v2/products_software_versions/list'; $all_versions_response = ioServer($api_url,''); $version_map = []; if (!empty($all_versions_response)) { $all_versions = json_decode($all_versions_response); foreach ($all_versions as $ver) { $version_map[$ver->rowID] = $ver->name . ' (' . $ver->version . ')'; } } template_header('Software Version Details', 'products_software_version','view'); $view = '
Details and related information.
'.$responses->name.'
'.$responses->version.'
'.$responses->description.'
'.$responses->hw_version.'
'.($responses->mandatory ? 'Yes' : 'No').'
'.($responses->latest ? 'Yes' : 'No').'
'.($responses->status ? 'Active' : 'Inactive').'
'.$responses->file_path.'
| From Version | To Version | Price | Currency | Description | Active |
|---|---|---|---|---|---|
| No upgrade paths found. | |||||
| ' . ($version_map[$path->from_version_id] ?? $path->from_version_id) . ' | ' . ($version_map[$path->to_version_id] ?? $path->to_version_id) . ' | '.$path->price.' | '.$path->currency.' | '.$path->description.' | '.($path->is_active ? 'Yes' : 'No').' |