/**
  * Show for PDF an webapplications
  *
  * @param $pdf object for the output
  * @param $ID of the webapplications
  **/
 function show_PDF($pdf)
 {
     global $LANG, $DB;
     $pdf->setColumnsSize(50, 50);
     $col1 = '<b>' . __('ID') . ' ' . $this->fields['id'] . '</b>';
     if (isset($this->fields["date_mod"])) {
         $col2 = printf(__('Last update on %s'), Html::convDateTime($this->fields["date_mod"]));
     } else {
         $col2 = '';
     }
     $pdf->displayTitle($col1, $col2);
     $pdf->displayLine('<b><i>' . __('Name') . ':</i></b> ' . $this->fields['name'], '<b><i>' . PluginWebapplicationsWebapplicationType::getTypeName(1) . ' :</i></b> ' . Html::clean(Dropdown::getDropdownName('glpi_plugin_webapplications_webapplicationtypes', $this->fields['plugin_webapplications_webapplicationtypes_id'])));
     $pdf->displayLine('<b><i>' . __('Technician in charge of the hardware') . ':</i></b> ' . getUserName($this->fields['users_id_tech']), '<b><i>' . __('Group in charge of the hardware') . ':</i></b> ' . Html::clean(Dropdown::getDropdownName('glpi_groups', $this->fields['groups_id_tech'])));
     $pdf->displayLine('<b><i>' . __('Location') . ':</i></b> ' . Html::clean(Dropdown::getDropdownName('glpi_locations', $this->fields['locations_id'])), '<b><i>' . PluginWebapplicationsWebapplicationServerType::getTypeName(1) . ':</i></b> ' . Html::clean(Dropdown::getDropdownName('glpi_plugin_webapplications_webapplicationservertypes', $this->fields["plugin_webapplications_webapplicationservertypes_id"])));
     $pdf->displayLine('<b><i>' . PluginWebapplicationsWebapplicationTechnic::getTypeName(1) . ' :</i></b> ' . Html::clean(Dropdown::getDropdownName('glpi_plugin_webapplications_webapplicationtechnics', $this->fields['plugin_webapplications_webapplicationtechnics_id'])), '<b><i>' . __('Version') . ':</i></b> ' . $this->fields['version']);
     $pdf->displayLine('<b><i>' . __('Supplier') . ':</i></b> ' . Html::clean(Dropdown::getDropdownName('glpi_suppliers', $this->fields['suppliers_id'])), '<b><i>' . __('Editor', 'webapplications') . ':</i></b> ' . Html::clean(Dropdown::getDropdownName('glpi_manufacturers', $this->fields["manufacturers_id"])));
     $pdf->displayLine('<b><i>' . __('URL') . ':</i></b> ' . $this->fields['address'], '');
     $pdf->setColumnsSize(100);
     $pdf->displayText('<b><i>' . __('Comments') . ':</i></b>', $this->fields['comment']);
     $pdf->displaySpace();
 }
Exemplo n.º 2
0
function plugin_webapplications_getDropdown()
{
    $plugin = new Plugin();
    if ($plugin->isActivated("webapplications")) {
        return array('PluginWebapplicationsWebapplicationType' => PluginWebapplicationsWebapplicationType::getTypeName(2), 'PluginWebapplicationsWebapplicationServerType' => PluginWebapplicationsWebapplicationServerType::getTypeName(2), 'PluginWebapplicationsWebapplicationTechnic' => PluginWebapplicationsWebapplicationTechnic::getTypeName(2));
    }
    return array();
}