コード例 #1
0
 static function pdfMain(PluginPdfSimplePDF $pdf, Peripheral $item)
 {
     PluginPdfCommon::mainTitle($pdf, $item);
     PluginPdfCommon::mainLine($pdf, $item, 'name-status');
     PluginPdfCommon::mainLine($pdf, $item, 'location-type');
     PluginPdfCommon::mainLine($pdf, $item, 'tech-manufacturer');
     PluginPdfCommon::mainLine($pdf, $item, 'group-model');
     PluginPdfCommon::mainLine($pdf, $item, 'contactnum-serial');
     PluginPdfCommon::mainLine($pdf, $item, 'contact-otherserial');
     PluginPdfCommon::mainLine($pdf, $item, 'user_management');
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Group') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_groups', $item->fields['groups_id']))));
     $pdf->setColumnsSize(100);
     PluginPdfCommon::mainLine($pdf, $item, 'comment');
     $pdf->displaySpace();
 }
コード例 #2
0
 static function pdfMain(PluginPdfSimplePDF $pdf, NetworkEquipment $item)
 {
     PluginPdfCommon::mainTitle($pdf, $item);
     PluginPdfCommon::mainLine($pdf, $item, 'name-status');
     PluginPdfCommon::mainLine($pdf, $item, 'location-type');
     PluginPdfCommon::mainLine($pdf, $item, 'tech-manufacturer');
     PluginPdfCommon::mainLine($pdf, $item, 'group-model');
     PluginPdfCommon::mainLine($pdf, $item, 'contactnum-serial');
     PluginPdfCommon::mainLine($pdf, $item, 'contact-otherserial');
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('User') . '</i></b>', getUserName($item->fields['users_id'])), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Network') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_networks', $item->fields['networks_id']))));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Group') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_groups', $item->fields['groups_id']))), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Domain') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_domains', $item->fields['domains_id']))));
     $pdf->displayLine(__('The MAC address and the IP of the equipment are included in an aggregated network port'));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), _n('Firmware', 'Firmwares', 1) . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_networkequipmentfirmwares', $item->fields['networkequipmentfirmwares_id']))), '<b><i>' . sprintf(__('%1$s: %2$s'), sprintf(__('%1$s (%2$s)'), __('Memory'), __('Mio')) . '</i></b>', $item->fields['ram']));
     $pdf->setColumnsSize(100);
     PluginPdfCommon::mainLine($pdf, $item, 'comment');
     $pdf->displaySpace();
 }
コード例 #3
0
ファイル: software.class.php プロジェクト: geldarr/hack-space
 static function pdfMain(PluginPdfSimplePDF $pdf, Software $software)
 {
     PluginPdfCommon::mainTitle($pdf, $software);
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Name') . '</i></b>', $software->fields['name']), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Publisher') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_manufacturers', $software->fields['manufacturers_id']))));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Location') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_locations', $software->fields['locations_id']))), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Category') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_softwarecategories', $software->fields['softwarecategories_id']))));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Technician in charge of the hardware') . '</i></b>', getUserName($software->fields['users_id_tech'])), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Associable to a ticket') . '</i></b>', $software->fields['is_helpdesk_visible'] ? __('Yes') : __('No')));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Group in charge of the hardware') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_groups', $software->fields['groups_id_tech']))), '<b><i>' . sprintf(__('%1$s: %2$s'), __('User') . '</i></b>', getUserName($software->fields['users_id'])));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Group') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_groups', $software->fields['groups_id']))));
     $pdf->displayLine('<b><i>' . sprintf(__('Last update on %s'), Html::convDateTime($software->fields['date_mod'])));
     if ($software->fields['softwares_id'] > 0) {
         $col2 = '<b><i> ' . __('from') . ' </i></b> ' . Html::clean(Dropdown::getDropdownName('glpi_softwares', $software->fields['softwares_id']));
     } else {
         $col2 = '';
     }
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Upgrade') . '</i></b>', $software->fields['is_update'] ? __('Yes') : __('No'), $col2));
     $pdf->setColumnsSize(100);
     PluginPdfCommon::mainLine($pdf, $software, 'comment');
     $pdf->displaySpace();
 }
コード例 #4
0
ファイル: computer.class.php プロジェクト: geldarr/hack-space
 static function pdfMain(PluginPdfSimplePDF $pdf, Computer $computer)
 {
     global $DB;
     PluginPdfCommon::mainTitle($pdf, $computer);
     PluginPdfCommon::mainLine($pdf, $computer, 'name-status');
     PluginPdfCommon::mainLine($pdf, $computer, 'location-type');
     PluginPdfCommon::mainLine($pdf, $computer, 'tech-manufacturer');
     PluginPdfCommon::mainLine($pdf, $computer, 'group-model');
     PluginPdfCommon::mainLine($pdf, $computer, 'contactnum-serial');
     PluginPdfCommon::mainLine($pdf, $computer, 'contact-otherserial');
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('User') . '</i></b>', getUserName($computer->fields['users_id'])), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Network') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_networks', $computer->fields['networks_id']))));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Group') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_groups', $computer->fields['groups_id']))), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Service pack') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_operatingsystemservicepacks', $computer->fields['operatingsystemservicepacks_id']))));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Domain') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_domains', $computer->fields['domains_id']))), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Version of the operating system') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_operatingsystemversions', $computer->fields['operatingsystemversions_id']))));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Operating system') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_operatingsystems', $computer->fields['operatingsystems_id']))), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Serial of the operating system') . '</i></b>', $computer->fields['os_license_number']));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Product ID of the operating system') . '</i></b>', $computer->fields['os_licenseid']), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Update source') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_autoupdatesystems', $computer->fields['autoupdatesystems_id']))));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('UUID') . '</i></b>', $computer->fields['uuid']));
     PluginPdfCommon::mainLine($pdf, $computer, 'comment');
     $pdf->displaySpace();
 }
コード例 #5
0
ファイル: monitor.class.php プロジェクト: geldarr/hack-space
 static function pdfMain(PluginPdfSimplePDF $pdf, Monitor $item)
 {
     PluginPdfCommon::mainTitle($pdf, $item);
     PluginPdfCommon::mainLine($pdf, $item, 'name-status');
     PluginPdfCommon::mainLine($pdf, $item, 'location-type');
     PluginPdfCommon::mainLine($pdf, $item, 'tech-manufacturer');
     PluginPdfCommon::mainLine($pdf, $item, 'group-model');
     PluginPdfCommon::mainLine($pdf, $item, 'contactnum-serial');
     PluginPdfCommon::mainLine($pdf, $item, 'contact-otherserial');
     PluginPdfCommon::mainLine($pdf, $item, 'user-management');
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Group') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_groups', $item->fields['groups_id']))), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Size') . '</i></b>', sprintf(__('%1$s %2$s'), $item->fields['size'], '"')));
     $opts = array('have_micro' => __('Microphone'), 'have_speaker' => __('Speakers'), 'have_subd' => __('Sub-D'), 'have_bnc' => __('BNC'), 'have_dvi' => __('DVI'), 'have_pivot' => __('Pivot'), 'have_hdmi' => __('HDMI'), 'have_displayport' => __('DisplayPort'));
     foreach ($opts as $key => $val) {
         if (!$item->fields[$key]) {
             unset($opts[$key]);
         }
     }
     $pdf->setColumnsSize(100);
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Flags') . '</i></b>', count($opts) ? implode(', ', $opts) : __('None')));
     PluginPdfCommon::mainLine($pdf, $item, 'comment');
     $pdf->displaySpace();
 }
コード例 #6
0
ファイル: printer.class.php プロジェクト: geldarr/hack-space
 static function pdfMain(PluginPdfSimplePDF $pdf, Printer $printer)
 {
     PluginPdfCommon::mainTitle($pdf, $printer);
     PluginPdfCommon::mainLine($pdf, $printer, 'name-status');
     PluginPdfCommon::mainLine($pdf, $printer, 'location-type');
     PluginPdfCommon::mainLine($pdf, $printer, 'tech-manufacturer');
     PluginPdfCommon::mainLine($pdf, $printer, 'group-model');
     PluginPdfCommon::mainLine($pdf, $printer, 'contactnum-serial');
     PluginPdfCommon::mainLine($pdf, $printer, 'contact-otherserial');
     PluginPdfCommon::mainLine($pdf, $printer, 'user-management');
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Group') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_groups', $printer->fields['groups_id']))), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Network') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_networks', $printer->fields['networks_id']))));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Domain') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_domains', $printer->fields['domains_id']))), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Memory') . '</i></b>', $printer->fields['memory_size']));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Initial page counter') . '</i></b>', $printer->fields['init_pages_counter']), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Current counter of pages') . '</i></b>', $printer->fields['last_pages_counter']));
     $opts = array('have_serial' => __('Serial'), 'have_parallel' => __('Parallel'), 'have_usb' => __('USB'), 'have_ethernet' => __('Ethernet'), 'have_wifi' => __('Wifi'));
     foreach ($opts as $key => $val) {
         if (!$printer->fields[$key]) {
             unset($opts[$key]);
         }
     }
     $pdf->setColumnsSize(100);
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), _n('Port', 'Ports', count($opts)) . '</i></b>', count($opts) ? implode(', ', $opts) : __('None')));
     PluginPdfCommon::mainLine($pdf, $printer, 'comment');
     $pdf->displaySpace();
 }
コード例 #7
0
ファイル: phone.class.php プロジェクト: geldarr/hack-space
 static function pdfMain(PluginPdfSimplePDF $pdf, Phone $item)
 {
     PluginPdfCommon::mainTitle($pdf, $item);
     PluginPdfCommon::mainLine($pdf, $item, 'name-status');
     PluginPdfCommon::mainLine($pdf, $item, 'location-type');
     PluginPdfCommon::mainLine($pdf, $item, 'tech-manufacturer');
     PluginPdfCommon::mainLine($pdf, $item, 'group-model');
     PluginPdfCommon::mainLine($pdf, $item, 'contactnum-serial');
     PluginPdfCommon::mainLine($pdf, $item, 'contact-otherserial');
     PluginPdfCommon::mainLine($pdf, $item, 'user-management');
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Group') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_groups', $item->fields['groups_id']))), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Power supply') . '</i></b>', Dropdown::getYesNo($item->fields['phonepowersupplies_id'])));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Brand') . '</i></b>', $item->fields['brand']), '<b><i>' . sprintf(__('%1$s: %2$s'), _x('quantity', 'Number of lines') . '</i></b>', $item->fields['number_line']));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), _n('Firmware', 'Firmwares', 1) . '</i></b>', $item->fields['firmware']));
     $opts = array('have_headset' => __('Headset'), 'have_hp' => __('Speaker'));
     foreach ($opts as $key => $val) {
         if (!$item->fields[$key]) {
             unset($opts[$key]);
         }
     }
     $pdf->setColumnsSize(100);
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Flags') . '</i></b>', count($opts) ? implode(', ', $opts) : __('None')));
     PluginPdfCommon::mainLine($pdf, $item, 'comment');
     $pdf->displaySpace();
 }