GLPI

query("SELECT glpi_computers.name, glpi_operatingsystems.name as OS,plugin_fields_astreinteqpcfielddropdowns_id as crit, last_contact, glpi_computers.computertypes_id FROM glpi_computers left join glpi_items_operatingsystems on glpi_computers.id = glpi_items_operatingsystems.items_id left join glpi_operatingsystems on glpi_operatingsystems.id = glpi_items_operatingsystems.operatingsystems_id left join glpi_plugin_fields_computerdatasupps on glpi_plugin_fields_computerdatasupps.items_id = glpi_computers.id LEFT JOIN glpi_plugin_fusioninventory_agents ON computers_id = glpi_computers.id WHERE glpi_computers.entities_id = 6 AND glpi_computers.is_deleted = 0 AND glpi_computers.states_ID in(2,26) AND glpi_computers.computertypes_id in(7,19,6,2) and glpi_computers.name <> ''"); ?> "; echo ""; echo match ($row['computertypes_id']) { 7 => "", 19 => "", 6 => "", 2 => "", default => "", }; echo match ($row['crit']) { 1 => "", 2 => "", 3 => "", default => "", }; if($row['last_contact']){ $fi=date_create($row['last_contact']); $diff=date_diff($fi,date_create(date("Y-m-d"))); if($diff->format("%R%a") > 7){ echo ""; }else{ echo ""; } }else{echo "";} echo ""; } ?>
Name Type Criticity Last F.I Inventory
".$row['name']."ServeurVMPortablePCSilverGoldBronze".$row['last_contact']."".$row['last_contact']."