/** * Display informations about computer (bios...) * * @param type $computers_id */ static function showInfo($item) { global $CFG_GLPI; // Manage locks pictures PluginFusioninventoryLock::showLockIcon('Computer'); $pfInventoryComputerComputer = new PluginFusioninventoryInventoryComputerComputer(); $a_computerextend = current($pfInventoryComputerComputer->find("`computers_id`='" . $item->getID() . "'", "", 1)); if (empty($a_computerextend)) { return; } echo '<table class="tab_glpi" width="100%">'; echo '<tr>'; echo '<th colspan="2">' . __('FusionInventory', 'fusioninventory') . '</th>'; echo '</tr>'; echo '<tr class="tab_bg_1">'; echo '<td>'; echo __('Last inventory', 'fusioninventory'); echo '</td>'; echo '<td>'; echo Html::convDateTime($a_computerextend['last_fusioninventory_update']); echo '</td>'; echo '</tr>'; if ($a_computerextend['remote_addr'] != '') { echo '<tr class="tab_bg_1">'; echo '<td>' . __('Public contact address', 'fusioninventory') . '</td>'; echo '<td>' . $a_computerextend['remote_addr'] . '</td>'; echo '</tr>'; } $pfAgent = new PluginFusioninventoryAgent(); $pfAgent->showInfoForComputer($item->getID()); if ($a_computerextend['bios_date'] != '') { echo '<tr class="tab_bg_1">'; echo '<td>' . __('BIOS date', 'fusioninventory') . '</td>'; echo '<td>' . Html::convDate($a_computerextend['bios_date']) . '</td>'; echo '</tr>'; } if ($a_computerextend['bios_version'] != '') { echo '<tr class="tab_bg_1">'; echo '<td>' . __('BIOS version', 'fusioninventory') . '</td>'; echo '<td>' . $a_computerextend['bios_version'] . '</td>'; echo '</tr>'; } if ($a_computerextend['bios_manufacturers_id'] > 0) { echo '<tr class="tab_bg_1">'; echo '<td>' . __('Manufacturer') . ' :</td>'; echo '<td>'; echo Dropdown::getDropdownName("glpi_manufacturers", $a_computerextend['bios_manufacturers_id']); echo '</td>'; echo '</tr>'; } if ($a_computerextend['plugin_fusioninventory_computerarchs_id'] != '') { echo '<tr class="tab_bg_1">'; echo "<td>" . __('Architecture', 'fusioninventory') . "</td>"; echo '<td>'; echo Dropdown::getDropdownName('glpi_plugin_fusioninventory_computerarchs', $a_computerextend['plugin_fusioninventory_computerarchs_id']); echo '</td>'; echo '</tr>'; } if ($a_computerextend['operatingsystem_installationdate'] != '') { echo '<tr class="tab_bg_1">'; echo "<td>" . __('Operating system') . " - " . __('Installation') . " (" . strtolower(__('Date')) . ")</td>"; echo '<td>' . Html::convDate($a_computerextend['operatingsystem_installationdate']) . '</td>'; echo '</tr>'; } if ($a_computerextend['winowner'] != '') { echo '<tr class="tab_bg_1">'; echo '<td>' . __('Owner', 'fusioninventory') . '</td>'; echo '<td>' . $a_computerextend['winowner'] . '</td>'; echo '</tr>'; } if ($a_computerextend['wincompany'] != '') { echo '<tr class="tab_bg_1">'; echo '<td>' . __('Company', 'fusioninventory') . '</td>'; echo '<td>' . $a_computerextend['wincompany'] . '</td>'; echo '</tr>'; } if ($a_computerextend['oscomment'] != '') { echo '<tr class="tab_bg_1">'; echo "<td>" . __('Comments') . "</td>"; echo '<td>' . $a_computerextend['oscomment'] . '</td>'; echo '</tr>'; } // Display automatic entity transfer if (Session::isMultiEntitiesMode()) { echo '<tr class="tab_bg_1">'; echo '<td>' . __('Automatic entity transfer', 'fusioninventory') . '</td>'; echo '<td>'; $pfEntity = new PluginFusioninventoryEntity(); if ($pfEntity->getValue('transfers_id_auto', $item->fields['entities_id']) == 0) { echo __('No, locked (by entity configuration)', 'fusioninventory'); } else { if ($a_computerextend['is_entitylocked'] == 1) { echo __('No, locked manually', 'fusioninventory'); echo " [ <a href='" . $CFG_GLPI['root_doc'] . "/plugins/fusioninventory/front/computerentitylock.form.php?id=" . $a_computerextend['id'] . "&lock=0'>" . __('Unlock it', 'fusioninventory') . "</a> ]"; } else { echo __('Yes'); echo " [ <a href='" . $CFG_GLPI['root_doc'] . "/plugins/fusioninventory/front/computerentitylock.form.php?id=" . $a_computerextend['id'] . "&lock=1'>" . __('Lock it', 'fusioninventory') . "</a> ]"; } } echo '</td>'; echo '</tr>'; } echo '</table>'; }