本文整理汇总了PHP中Html::clean方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::clean方法的具体用法?PHP Html::clean怎么用?PHP Html::clean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Html
的用法示例。
在下文中一共展示了Html::clean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getName
/**
* @see CommonDBTM::getName()
**/
function getName($options = array())
{
if ($rule = getItemForItemtype(static::$itemtype)) {
return Html::clean($rule->getMinimalCriteriaText($this->fields));
}
return NOT_AVAILABLE;
}
示例2: pdfForItem
static function pdfForItem(PluginPdfSimplePDF $pdf, CommonDBTM $item)
{
global $DB, $CFG_GLPIG;
if (!Session::haveRight("contract", "r")) {
return false;
}
$type = $item->getType();
$ID = $item->getField('id');
$con = new Contract();
$query = "SELECT *\n FROM `glpi_contracts_items`\n WHERE `glpi_contracts_items`.`items_id` = '" . $ID . "'\n AND `glpi_contracts_items`.`itemtype` = '" . $type . "'";
$result = $DB->query($query);
$number = $DB->numrows($result);
$i = $j = 0;
$pdf->setColumnsSize(100);
if ($number > 0) {
$pdf->displayTitle('<b>' . _N('Associated contract', 'Associated contracts', 2) . '</b>');
$pdf->setColumnsSize(19, 19, 19, 16, 11, 16);
$pdf->displayTitle(__('Name'), _x('phone', 'Number'), __('Contract type'), __('Supplier'), __('Start date'), __('Initial contract period'));
$i++;
while ($j < $number) {
$cID = $DB->result($result, $j, "contracts_id");
$assocID = $DB->result($result, $j, "id");
if ($con->getFromDB($cID)) {
$pdf->displayLine(empty($con->fields["name"]) ? "(" . $con->fields["id"] . ")" : $con->fields["name"], $con->fields["num"], Html::clean(Dropdown::getDropdownName("glpi_contracttypes", $con->fields["contracttypes_id"])), str_replace("<br>", " ", $con->getSuppliersNames()), Html::convDate($con->fields["begin_date"]), sprintf(_n('%d month', '%d months', $con->fields["duration"]), $con->fields["duration"]));
}
$j++;
}
} else {
$pdf->displayTitle("<b>" . __('No item found') . "</b>");
}
$pdf->displaySpace();
}
示例3: pdfMain
static function pdfMain(PluginPdfSimplePDF $pdf, SoftwareLicense $license, $main = true, $cpt = true)
{
global $DB;
$ID = $license->getField('id');
$pdf->setColumnsSize(100);
$entity = '';
if (Session::isMultiEntitiesMode() && !$main) {
$entity = ' (' . Html::clean(Dropdown::getDropdownName('glpi_entities', $license->fields['entities_id'])) . ')';
}
$pdf->displayTitle('<b><i>' . sprintf(__('%1$s: %2$s'), __('ID') . "</i>", $ID . "</b>" . $entity));
$pdf->setColumnsSize(50, 50);
$pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), Software::getTypeName(1) . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_softwares', $license->fields['softwares_id']))), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Type') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_softwarelicensetypes', $license->fields['softwarelicensetypes_id']))));
$pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Name') . '</i></b>', $license->fields['name']), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Serial number') . '</i></b>', $license->fields['serial']));
$pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Purchase version') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_softwareversions', $license->fields['softwareversions_id_buy']))), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Inventory number') . '</i></b>', $license->fields['otherserial']));
$pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Version in use') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_softwareversions', $license->fields['softwareversions_id_use']))), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Expiration') . '</i></b>', Html::convDate($license->fields['expire'])));
$col2 = '';
if ($cpt) {
$col2 = '<b><i>' . sprintf(__('%1$s: %2$s'), __('Affected computers') . '</i></b>', Computer_SoftwareLicense::countForLicense($ID));
}
$pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), _x('quantity', 'Number') . '</i></b>', $license->fields['number'] > 0 ? $license->fields['number'] : __('Unlimited')), $col2);
$pdf->setColumnsSize(100);
PluginPdfCommon::mainLine($pdf, $license, 'comment');
if ($main) {
$pdf->displaySpace();
}
}
示例4: pdfMain
static function pdfMain(PluginPdfSimplePDF $pdf, KnowbaseItem $item)
{
global $DB;
$ID = $item->getField('id');
if (!Session::haveRight('knowbase', 'r') || !Session::haveRight('faq', 'r')) {
return false;
}
$knowbaseitemcategories_id = $item->getField('knowbaseitemcategories_id');
$fullcategoryname = Html::clean(getTreeValueCompleteName("glpi_knowbaseitemcategories", $knowbaseitemcategories_id));
$question = Html::clean(Toolbox::unclean_cross_side_scripting_deep(html_entity_decode($item->getField('name'), ENT_QUOTES, "UTF-8")));
$answer = Html::clean(Toolbox::unclean_cross_side_scripting_deep(html_entity_decode($item->getField('answer'), ENT_QUOTES, "UTF-8")));
$pdf->setColumnsSize(100);
if (Toolbox::strlen($fullcategoryname) > 0) {
$pdf->displayTitle('<b>' . __('Category name') . '</b>');
$pdf->displayLine($fullcategoryname);
}
if (Toolbox::strlen($question) > 0) {
$pdf->displayTitle('<b>' . __('Subject') . '</b>');
$pdf->displayText('', $question, 5);
} else {
$pdf->displayTitle('<b>' . __('No question found', 'pdf') . '</b>');
}
if (Toolbox::strlen($answer) > 0) {
$pdf->displayTitle('<b>' . __('Content') . '</b>');
$pdf->displayText('', $answer, 5);
} else {
$pdf->displayTitle('<b>' . __('No answer found') . '</b>');
}
$pdf->setColumnsSize(50, 15, 15, 10, 10);
$pdf->displayTitle(__('Writer'), __('Creation date'), __('Last update'), __('FAQ'), _n('View', 'Views', 2));
$pdf->displayLine(getUserName($item->fields["users_id"]), Html::convDateTime($item->fields["date"]), Html::convDateTime($item->fields["date_mod"]), Dropdown::getYesNo($item->fields["is_faq"]), $item->fields["view"]);
$pdf->displaySpace();
}
示例5: superadmin
function superadmin($login)
{
global $conf;
foreach ($conf['admin']['logins'] as $admin) {
if (Html::clean($login) == $admin) {
return TRUE;
}
}
return FALSE;
}
示例6: pdfForTicket
static function pdfForTicket(PluginPdfSimplePDF $pdf, Ticket $job, $private)
{
global $CFG_GLPI, $DB;
$ID = $job->getField('id');
//////////////Tasks///////////
$RESTRICT = "";
if (!$private) {
// Don't show private'
$RESTRICT = " AND `is_private` = '0' ";
} else {
if (!Session::haveRight("show_full_ticket", "1")) {
// No right, only show connected user private one
$RESTRICT = " AND (`is_private` = '0'\n OR `users_id` ='" . Session::getLoginUserID() . "' ) ";
}
}
$query = "SELECT *\n FROM `glpi_tickettasks`\n WHERE `tickets_id` = '{$ID}'\n {$RESTRICT}\n ORDER BY `date` DESC";
$result = $DB->query($query);
if (!$DB->numrows($result)) {
$pdf->setColumnsSize(100);
$pdf->displayLine(__('No task found.'));
} else {
$pdf->displayTitle("<b>" . TicketTask::getTypeName($DB->numrows($result) . "</b>"));
$pdf->setColumnsSize(20, 20, 20, 20, 20);
$pdf->displayTitle("<b><i>" . __('Type') . "</i></b>", "<b><i>" . __('Date') . "</i></b>", "<b><i>" . __('Duration') . "</i></b>", "<b><i>" . __('Writer') . "</i></b>", "<b><i>" . __('Planning') . "</i></b>");
while ($data = $DB->fetch_array($result)) {
$actiontime = Html::timestampToString($data['actiontime'], false);
$planification = '';
if (empty($data['begin'])) {
if (isset($data["state"])) {
$planification = Planning::getState($data["state"]) . "<br>";
}
$planification .= _e('None');
} else {
if (isset($data["state"])) {
$planification = sprintf(__('%1$s: %2$s'), _x('item', 'State'), Planning::getState($data["state"]));
}
$planificiation = sprintf(__('%1$s - %2$s'), $planification, Html::convDateTime($data["begin"]) . " -> " . Html::convDateTime($data["end"]));
$planificiation = sprintf(__('%1$s - %2$s'), $planification, sprintf(__('%1$s %2$s'), __('By'), getUserName($data["users_id_tech"])));
}
if ($data['taskcategories_id']) {
$lib = Dropdown::getDropdownName('glpi_taskcategories', $data['taskcategories_id']);
} else {
$lib = '';
}
if ($data['is_private']) {
$lib = sprintf(__('%1$s (%2$s)'), $lib, __('Private'));
}
toolbox::logdebug("lib", $data);
$pdf->displayLine(Html::clean($lib), Html::convDateTime($data["date"]), Html::timestampToString($data["actiontime"], 0), Html::clean(getUserName($data["users_id"])), Html::clean($planification), 1);
$pdf->displayText("<b><i>" . sprintf(__('%1$s: %2$s'), __('Description') . "</i></b>", Html::clean($data["content"]), 1));
}
}
$pdf->displaySpace();
}
示例7: pdfMain
static function pdfMain(PluginPdfSimplePDF $pdf, SoftwareVersion $version)
{
global $DB;
$ID = $version->getField('id');
$pdf->setColumnsSize(100);
$pdf->displayTitle('<b><i>' . sprintf(__('%1$s: %2$s'), __('ID') . "</i>", $ID . "</b>"));
$pdf->setColumnsSize(50, 50);
$pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Name') . '</i></b>', $version->fields['name']), '<b><i>' . sprintf(__('%1$s: %2$s'), _n('Software', 'Software', 2) . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_softwares', $version->fields['softwares_id']))));
$pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Status') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_states', $version->fields['states_id']))), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Operating system') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_operatingsystems', $version->fields['operatingsystems_id']))));
$pdf->setColumnsSize(100);
PluginPdfCommon::mainLine($pdf, $version, 'comment');
$pdf->displaySpace();
}
示例8: pdfMain
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();
}
示例9: pdfForComputer
static function pdfForComputer(PluginPdfSimplePDF $pdf, Computer $item)
{
global $DB;
$ID = $item->getField('id');
// From ComputerVirtualMachine::showForComputer()
$virtualmachines = getAllDatasFromTable('glpi_computervirtualmachines', "`computers_id` = '{$ID}'");
$pdf->setColumnsSize(100);
if (count($virtualmachines)) {
$pdf->displayTitle("<b>" . __('List of virtual machines') . "</b>");
$pdf->setColumnsSize(20, 8, 8, 8, 25, 8, 8, 15);
$pdf->setColumnsAlign('left', 'center', 'center', 'center', 'left', 'right', 'right', 'left');
$typ = explode(' ', __('Virtualization system'));
$sys = explode(' ', __('Virtualization model'));
$sta = explode(' ', __('State of the virtual machine'));
$pdf->displayTitle(__('Name'), $typ[0], $sys[0], $sta[0], __('UUID'), __('CPU'), __('Mio'), __('Machine'));
foreach ($virtualmachines as $virtualmachine) {
$name = '';
if ($link_computer = ComputerVirtualMachine::findVirtualMachine($virtualmachine)) {
$computer = new Computer();
if ($computer->getFromDB($link_computer)) {
$name = $computer->getName();
}
}
$pdf->displayLine($virtualmachine['name'], Html::clean(Dropdown::getDropdownName('glpi_virtualmachinetypes', $virtualmachine['virtualmachinetypes_id'])), Html::clean(Dropdown::getDropdownName('glpi_virtualmachinesystems', $virtualmachine['virtualmachinesystems_id'])), Html::clean(Dropdown::getDropdownName('glpi_virtualmachinestates', $virtualmachine['virtualmachinestates_id'])), $virtualmachine['uuid'], $virtualmachine['vcpu'], Html::clean(Html::formatNumber($virtualmachine['ram'], false, 0)), $name);
}
} else {
$pdf->displayTitle("<b>" . __('No virtual machine associated with the computer') . "</b>");
}
// From ComputerVirtualMachine::showForVirtualMachine()
if ($item->fields['uuid']) {
$where = "`uuid`" . ComputerVirtualMachine::getUUIDRestrictRequest($item->fields['uuid']);
$hosts = getAllDatasFromTable('glpi_computervirtualmachines', $where);
if (count($hosts)) {
$pdf->setColumnsSize(100);
$pdf->displayTitle("<b>" . __('List of host machines') . "</b>");
$pdf->setColumnsSize(26, 37, 37);
$pdf->displayTitle(__('Name'), __('Operating system'), __('Entity'));
$computer = new Computer();
foreach ($hosts as $host) {
if ($computer->getFromDB($host['computers_id'])) {
$pdf->displayLine($computer->getName(), Html::clean(Dropdown::getDropdownName('glpi_operatingsystems', $computer->getField('operatingsystems_id'))), Html::clean(Dropdown::getDropdownName('glpi_entities', $computer->getEntityID())));
}
}
}
}
$pdf->displaySpace();
}
示例10: pdfMain
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();
}
示例11: pdfForGroup
static function pdfForGroup(PluginPdfSimplePDF $pdf, Group $group, $tree)
{
global $DB, $CFG_GLPI;
$used = array();
$ids = array();
// Retrieve member list
$entityrestrict = Group_User::getDataForGroup($group, $used, $ids, '', $tree);
$title = "<b>" . sprintf(__('%1$s (%2$s)'), _n('User', 'Users', 2) . "</b>", __('D=Dynamic'));
$number = count($used);
if ($number > $_SESSION['glpilist_limit']) {
$title = sprintf(__('%1$s (%2$s)'), $title, $_SESSION['glpilist_limit'] . "/" . $number);
} else {
$title = sprintf(__('%1$s (%2$s)'), $title, $number);
}
$pdf->setColumnsSize(100);
$pdf->displayTitle($title);
if ($number) {
$user = new User();
$group = new Group();
if ($tree) {
$pdf->setColumnsSize(35, 45, 10, 10);
$pdf->displayTitle(User::getTypeName(1), Group::getTypeName(1), __('Manager'), __('Delegatee'));
} else {
$pdf->setColumnsSize(60, 20, 20);
$pdf->displayTitle(User::getTypeName(1), __('Manager'), __('Delegatee'));
}
for ($i = 0; $i < $number && $i < $_SESSION['glpilist_limit']; $i++) {
$data = $used[$i];
$name = Html::clean(getUserName($data["id"]));
if ($data["is_dynamic"]) {
$name = sprintf(__('%1$s (%2$s)'), $name, '<b>' . __('D') . '</b>');
}
if ($tree) {
$group->getFromDB($data["groups_id"]);
$pdf->displayLine($name, $group->getName(), Dropdown::getYesNo($data['is_manager']), Dropdown::getYesNo($data['is_userdelegate']));
} else {
$pdf->displayLine($name, Dropdown::getYesNo($data['is_manager']), Dropdown::getYesNo($data['is_userdelegate']));
}
}
} else {
$pdf->setColumnsAlign('center');
$pdf->displayLine(__('No item found'));
}
$pdf->displaySpace();
}
示例12: getDatasForTemplate
function getDatasForTemplate($event, $options = array())
{
$this->datas['##badge.entity##'] = Dropdown::getDropdownName('glpi_entities', $options['entities_id']);
$this->datas['##lang.badge.entity##'] = __('Entity');
$this->datas['##badge.action##'] = $event == "ExpiredBadges" ? __('Badges at the end of the validity', 'badges') : __('Badges which expires', 'badges');
$this->datas['##lang.badge.name##'] = __('Name');
$this->datas['##lang.badge.dateexpiration##'] = __('Date of end of validity', 'badges');
$this->datas['##lang.badge.serial##'] = __('Serial number');
$this->datas['##lang.badge.users##'] = __('Allotted to', 'badges');
foreach ($options['badges'] as $id => $badge) {
$tmp = array();
$tmp['##badge.name##'] = $badge['name'];
$tmp['##badge.serial##'] = $badge['serial'];
$tmp['##badge.users##'] = Html::clean(getUserName($badge["users_id"]));
$tmp['##badge.dateexpiration##'] = Html::convDate($badge['date_expiration']);
$this->datas['badges'][] = $tmp;
}
}
示例13: pdfMain
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();
}
示例14: pdfForComputer
static function pdfForComputer(PluginPdfSimplePDF $pdf, Computer $item)
{
global $DB;
$ID = $item->getField('id');
$query = "SELECT `glpi_filesystems`.`name` AS fsname, `glpi_computerdisks`.*\n FROM `glpi_computerdisks`\n LEFT JOIN `glpi_filesystems`\n ON (`glpi_computerdisks`.`filesystems_id` = `glpi_filesystems`.`id`)\n WHERE (`computers_id` = '" . $ID . "')";
$result = $DB->query($query);
$pdf->setColumnsSize(100);
if ($DB->numrows($result) > 0) {
$pdf->displayTitle("<b>" . _n('Volume', 'Volumes', 2) . "</b>");
$pdf->setColumnsSize(22, 23, 22, 11, 11, 11);
$pdf->displayTitle('<b>' . __('Name'), __('Partition'), _('Mount point'), __('Type'), __('Global size'), __('Free size') . '</b>');
$pdf->setColumnsAlign('left', 'left', 'left', 'center', 'right', 'right');
while ($data = $DB->fetch_assoc($result)) {
$pdf->displayLine('<b>' . Toolbox::decodeFromUtf8(empty($data['name']) ? $data['ID'] : $data['name'], "windows-1252") . '</b>', $data['device'], $data['mountpoint'], Html::clean(Dropdown::getDropdownName('glpi_filesystems', $data["filesystems_id"])), sprintf(__('%s Mio'), Html::clean(Html::formatNumber($data['totalsize'], false, 0))), sprintf(__('%s Mio'), Html::clean(Html::formatNumber($data['freesize'], false, 0))));
}
} else {
$pdf->displayTitle("<b>" . __('No volume found', 'pdf') . "</b>");
}
$pdf->displaySpace();
}
示例15: pdfForItem
static function pdfForItem(PluginPdfSimplePDF $pdf, CommonDBTM $item)
{
// Get the Full history for the item (really a good idea ?, should we limit this)
$changes = Log::getHistoryData($item);
$pdf->setColumnsSize(100);
if (count($changes) > 0) {
$pdf->displayTitle("<b>" . __('Historical') . "</b>");
$pdf->setColumnsSize(14, 15, 20, 51);
$pdf->displayTitle('<b><i>' . __('ID'), __('Date'), __('User'), __('Field'), _x('name', 'Update') . '</i></b>');
foreach ($changes as $data) {
if ($data['display_history']) {
$pdf->displayLine($data['id'], $data['date_mod'], $data['user_name'], $data['field'], Html::clean($data['change']));
}
}
// Each log
} else {
$pdf->displayTitle("<b>" . __('No historical') . "</b>");
}
$pdf->displaySpace();
}