'.$assets_h2.' ('.$query_total.')

'.$assets_p.'

'; if (isset($success_msg)){ $view .= '

'.$success_msg.'

'; } $view .= '
'; if ($create_allowed ===1){ $view .= ''.$button_create_asset.''; } $view .= '
'.$general_filters.'
'; //SHOW DOWNLOAD TO EXCELL OPTION ONLY TO ADMIN USERS if ($_SESSION['permission'] == 3 || $_SESSION['permission'] == 4){ $view .='
'; } $view .= '
'; $view .= '
'; if (empty($responses)){ $view .= ' '; } foreach ($responses as $response){ //Translate status INT to STR $status_text = 'status'.$response->status.'_text'; //GetPartnerDetails $partner_data = json_decode($response->accounthierarchy); //Default location $location = getPartnerName($partner_data->location) ?? $not_specified; //Check if productcode is 0 and status if ($response->productcode == 0 && $response->status == 0) {$location = $product_location_raw;} if ($response->productcode == 0 && $response->status == 1) {$location = $product_location_SFG;} if ($response->productcode == 0 && $response->status == 2) {$location = $product_location_FG;} //Check for Section if (isset($partner_data->section)){$section = getPartnerName($partner_data->section) ?? $not_specified;} else {$section = $not_specified;} $picture = glob("./assets/images/products/".$response->productcode.".{jpg,jpeg,png,gif}", GLOB_BRACE); $indicators = overviewIndicators($response->warranty_date,$response->service_date,$response->sw_version,$response->hw_version); $view .= ''; $view .= ' '; } $view .= '
'.$equipment_label1.' '.$equipment_label2.' '.$equipment_label3.' '.$equipment_label4.' '.$general_location.' '.$general_section.' '.$view_asset_actions.'
'.$message_no_assets.'
'.$indicators.' '.$response->serialnumber.' '.$$status_text.' '.$response->productcode.'-'.$response->productname.''; if (!empty($picture)){ $view .=' '; } $view .= ' '.$location.' '.$section.' '.$general_view .'
'; $view.=''; //OUTPUT echo $view; template_footer(); ?>