static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { $pfCollect_File = new PluginFusioninventoryCollect_File(); $pfCollect_File->showFile($item->getID()); $pfCollect_File->showForm($item->getID()); return TRUE; }
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { $pfRulematchedlog = new self(); if ($tabnum == '0') { if ($item->getID() > 0) { $pfRulematchedlog->showFormAgent($item->getID()); } } else { if ($tabnum == '1') { if ($item->getID() > 0) { $pfRulematchedlog->showForm($item->getID(), $item->getType()); $itemtype = ''; switch (get_class($item)) { case 'Computer': $itemtype = new PluginFusioninventoryInventoryComputerComputer(); break; case 'Printer': $itemtype = new PluginFusioninventoryPrinter(); break; case 'NetworkEquipment': $itemtype = new PluginFusioninventoryNetworkEquipment(); break; } if (is_object($itemtype) && $itemtype->canView()) { $itemtype->displaySerializedInventory($item->getID()); } } } } return TRUE; }
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if ($item->getID() > 0) { $pfBatteries = new self(); $pfBatteries->showForm($item->getID()); } return TRUE; }
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if ($item->getID() > 0) { $pfInventoryComputerStorage = new self(); $pfInventoryComputerStorage->showStorage($item->getID()); } return TRUE; }
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { global $CFG_GLPI; if ($item->getID() > 0) { $pfProfile = new self(); $pfProfile->showForm($item->getID(), $CFG_GLPI['root_doc'] . '/plugins/barcode/front/profile.php'); } return TRUE; }
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if ($item->getID() > -1) { $pmEntity = new PluginMonitoringEntity(); $pmHostconfig = new PluginMonitoringHostconfig(); $pmHostconfig->showForm($item->getID(), "Entity"); $pmEntity->showForm($item->fields['id']); } return true; }
public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { $self = new self(); if ($item->getType() == 'PluginAccountsHash') { $key = self::checkIfAesKeyExists($item->getID()); if ($key) { $self->showAesKey($item->getID()); } if (!$key) { $self->showForm("", array('plugin_accounts_hashes_id' => $item->getID())); } } return true; }
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { return; $profile = new Profile(); $found_profiles = $profile->find("`interface` = 'central'"); $tab_profile = new self(); $found_tab_profiles = $tab_profile->find("`plugin_custom_tabs_id` = " . $item->getID()); echo "<form method='POST' action='tabprofile.form.php' />"; echo "<table class='tab_cadre_fixe'>"; echo "<tr><th colspan='4'>" . __("Visibility") . "</th></tr>"; $odd = 0; foreach ($found_profiles as $profiles_id => $profile_fields) { if ($odd % 2 === 0) { echo "<tr>"; } echo "<td>" . $profile_fields['name'] . "</td>"; echo "<td>"; Dropdown::showYesNo("tab_profile[{$profiles_id}]", 0); echo "</td>"; if ($odd % 2 === 1) { echo "</tr>"; } $odd++; } if ($odd % 2 === 0) { echo "</tr>"; } echo "<tr><td colspan='4'><div class='center'>"; echo "<input type='submit' name='update' value=\"" . _sx('button', 'Post') . "\" class='submit'>"; echo "</div></td></tr>"; echo "</table>"; Html::closeForm(); return true; }
/** * Display tab * * @param CommonGLPI $item * @param integer $withtemplate * * @return varchar name of the tab(s) to display */ function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if ($item->getType() == 'Ticket' && $item->getID() > 0 && PluginEscalationProfile::haveRight("copyticket", 1)) { return "Copie de ticket"; } return ''; }
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if ($tabnum == 2) { echo $item->configureNodesLinks($item->getID()); } return TRUE; }
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if ($item->getID() > 0) { if (get_class($item) == 'PluginFusioninventoryCollect') { if ($item->fields['type'] == 'wmi') { $a_colregs = getAllDatasFromTable('glpi_plugin_fusioninventory_collects_wmis', "`plugin_fusioninventory_collects_id`='" . $item->getID() . "'"); if (count($a_colregs) == 0) { return array(); } $in = array(); foreach ($a_colregs as $id => $data) { $in[] = $id; } if (countElementsInTable('glpi_plugin_fusioninventory_collects_wmis_contents', "`plugin_fusioninventory_collects_wmis_id` IN ('" . implode("','", $in) . "')") > 0) { return array(__('Windows WMI content', 'fusioninventory')); } } } else { if (get_class($item) == 'Computer') { if (countElementsInTable('glpi_plugin_fusioninventory_collects_wmis_contents', "`computers_id`='" . $item->getID() . "'") > 0) { return array(__('Windows WMI content', 'fusioninventory')); } } } } return array(); }
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { // can exists for template if ($item->getType() == 'PluginMonitoringServicescatalog' && $item->getID() > 0) { return self::createTabEntry(self::getTypeName(2), 0); } return ''; }
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if ($item->getID() > -1) { $pmEntity = new PluginFusionInventoryEntity(); $pmEntity->showForm($item->fields['id']); } return true; }
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { $ong = array(); if ($item->getID() > 0) { $ong[] = __('Associated SNMP authentications', 'fusioninventory'); } return $ong; }
static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) { if ($item->getID() > 0) { $pmContact = new PluginMonitoringContact(); $pmContact->showForm(0); } return true; }
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if ($item->getType() == 'Group') { $PluginEscaladeGroup_Group = new PluginEscaladeGroup_Group(); $PluginEscaladeGroup_Group->manageGroup($item->getID()); } return true; }
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { $self = new self(); if ($item->getType() == 'PluginResourcesTask') { $self->showItemFromPlugin($item->getID(), $withtemplate); } return true; }
/** * Display content of tab * * @param CommonGLPI $item * @param integer $tabnum * @param interger $withtemplate * * @return boolean TRUE */ static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if ($item->getType() == 'PluginSurveyticketSurvey') { $psTicketTemplate = new self(); $psTicketTemplate->showTicketTemplate($item->getID()); } return TRUE; }
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { global $CFG_GLPI; $self = new self(); if (in_array($item->getType(), self::getModelClasses(true))) { $self->showForm("", array('items_id' => $item->getID(), 'itemtype' => get_class($item))); } return true; }
public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { $self = new self(); switch ($item->getType()) { case 'PluginAccountsHash': $key = self::checkIfAesKeyExists($item->getID()); if ($key) { $self->showAesKey($item->getID()); } if (!$key) { $self->showForm("", array('plugin_accounts_hashes_id' => $item->getID())); } break; case __CLASS__: $item->showForm($item->getID(), $item->fields); } return true; }
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if (in_array($item->getType(), array('Preference', 'User'))) { $pref = new self(); $user_id = $item->getType() == 'Preference' ? Session::getLoginUserID() : $item->getID(); $pref->showForm($user_id); } return true; }
/** * Display tab for item * * @param CommonGLPI $item * @param int $withtemplate * @return array|string */ function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if (!$withtemplate) { if ($item->getType() == 'PluginShellcommandsCommandGroup') { if ($_SESSION['glpishow_count_on_tabs']) { return self::createTabEntry(PluginShellcommandsShellcommand::getTypeName(2), countElementsInTable($this->getTable(), "`plugin_shellcommands_commandgroups_id` = '" . $item->getID() . "'")); } } else { if ($item->getType() == 'PluginShellcommandsShellcommand' && self::canView()) { if ($_SESSION['glpishow_count_on_tabs']) { return self::createTabEntry(PluginShellcommandsCommandGroup::getTypeName(2), countElementsInTable($this->getTable(), "`plugin_shellcommands_shellcommands_id` = '" . $item->getID() . "'")); } return PluginShellcommandsCommandGroup::getTypeName(2); } } } return ''; }
public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { echo '<table class="tab_cadre_fixe">'; echo '<tr>'; echo '<th colspan="3">' . _n('Destinations', 'Destinations', 2, 'formcreator') . '</th>'; echo '</tr>'; $target_class = new PluginFormcreatorTarget(); $found_targets = $target_class->find('plugin_formcreator_forms_id = ' . $item->getID()); $target_number = count($found_targets); $token = Session::getNewCSRFToken(); $i = 0; foreach ($found_targets as $target) { $i++; echo '<tr class="line' . $i % 2 . '">'; echo '<td onclick="document.location=\'../front/targetticket.form.php?id=' . $target['items_id'] . '\'" style="cursor: pointer">'; echo $target['name']; echo '</td>'; echo '<td align="center" width="32">'; echo '<img src="' . $GLOBALS['CFG_GLPI']['root_doc'] . '/plugins/formcreator/pics/pencil.png" alt="*" title="' . __('Edit') . '" onclick="document.location=\'../front/targetticket.form.php?id=' . $target['items_id'] . '\'" align="absmiddle" style="cursor: pointer" /> '; echo '</td>'; echo '<td align="center" width="32">'; echo '<img src="' . $GLOBALS['CFG_GLPI']['root_doc'] . '/plugins/formcreator/pics/delete.png" alt="*" title="' . __('Delete', 'formcreator') . '" onclick="deleteTarget(' . $item->getID() . ', \'' . $token . '\', ' . $target['id'] . ', \'' . addslashes($target['name']) . '\')" align="absmiddle" style="cursor: pointer" /> '; echo '</td>'; echo '</tr>'; } // Display add target link... echo '<tr class="line' . ($i + 1) % 2 . '" id="add_target_row">'; echo '<td colspan="3">'; echo '<a href="javascript:addTarget(' . $item->getID() . ', \'' . $token . '\');"> <img src="' . $GLOBALS['CFG_GLPI']['root_doc'] . '/pics/menu_add.png" alt="+" align="absmiddle" /> ' . __('Add a destination', 'formcreator') . ' </a>'; echo '</td>'; echo '</tr>'; // OR display add target form echo '<tr class="line' . ($i + 1) % 2 . '" id="add_target_form" style="display: none;">'; echo '<td colspan="3" id="add_target_form_td"></td>'; echo '</tr>'; echo "</table>"; }
/** * @see inc/CommonGLPI::displayTabContentForItem() * @param CommonGLPI $item * @param int $tabnum * @param int $withtemplate * @return bool|true */ static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if ($item->getType() == 'Profile') { $ID = $item->getID(); $prof = new self(); self::addDefaultProfileInfos($ID, array('plugin_ocsinventoryng' => 0, 'plugin_ocsinventoryng_sync' => 0, 'plugin_ocsinventoryng_view' => 0, 'plugin_ocsinventoryng_clean' => 0, 'plugin_ocsinventoryng_rule' => 0)); $prof->showForm($ID); } return true; }
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if (static::canView()) { $nb = 0; switch ($item->getType()) { case 'ProjectTask': if ($_SESSION['glpishow_count_on_tabs']) { $nb = countElementsInTable('glpi_projecttasks_tickets', "`projecttasks_id` = '" . $item->getID() . "'"); } return self::createTabEntry(Ticket::getTypeName(Session::getPluralNumber()), $nb); case 'Ticket': if ($_SESSION['glpishow_count_on_tabs']) { $nb = countElementsInTable('glpi_projecttasks_tickets', "`tickets_id` = '" . $item->getID() . "'"); } return self::createTabEntry(ProjectTask::getTypeName(Session::getPluralNumber()), $nb); } } return ''; }
/** * @see CommonGLPI::getTabNameForItem() **/ function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if (!$withtemplate && $item->getType() == 'Computer' && Session::haveRight("computer", "r")) { if ($_SESSION['glpishow_count_on_tabs']) { return self::createTabEntry(self::getTypeName(2), countElementsInTable('glpi_computervirtualmachines', "computers_id = '" . $item->getID() . "'\n AND `is_deleted`='0'")); } return self::getTypeName(2); } return ''; }
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if (!$withtemplate) { if ($_SESSION['glpishow_count_on_tabs']) { return self::createTabEntry(self::getTypeName(1), countElementsInTable('glpi_logs', "itemtype = '" . $item->getType() . "'\n AND items_id = '" . $item->getID() . "'")); } return self::getTypeName(1); } return ''; }
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if ($item->getType() == 'Profile') { $ID = $item->getID(); $prof = new self(); self::addDefaultProfileInfos($ID, array('plugin_databases' => 0, 'plugin_databases_open_ticket' => 0)); $prof->showForm($ID); } return true; }
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if (in_array($item->getType(), self::getTypes(true)) && Session::haveRight(static::$rightname, READ) && !isset($withtemplate) || empty($withtemplate)) { $suppliername = self::checkManufacturerName($item->getType(), $item->getID()); if ($suppliername) { return PluginManufacturersimportsPreImport::getTypeName(2); } } return ''; }
/** * @since version 0.85 * * @see CommonGLPI::getTabNameForItem() **/ function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if (static::canView()) { $nb = 0; switch ($item->getType()) { case 'Change': if ($_SESSION['glpishow_count_on_tabs']) { $nb = countElementsInTable('glpi_changes_tickets', ['changes_id' => $item->getID()]); } return self::createTabEntry(Ticket::getTypeName(Session::getPluralNumber()), $nb); case 'Ticket': if ($_SESSION['glpishow_count_on_tabs']) { $nb = countElementsInTable('glpi_changes_tickets', ['tickets_id' => $item->getID()]); } return self::createTabEntry(Change::getTypeName(Session::getPluralNumber()), $nb); } } return ''; }