static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     if ($item->getType() == 'Profile') {
         $prof = new self();
         self::addDefaultProfileInfos($item->getField('id'), array('plugin_racks' => 0, 'plugin_racks_model' => 0, 'plugin_racks_open_ticket' => 0));
         $prof->showForm($item->getField('id'));
     }
     return true;
 }
 /**
  * Fonction native GLPI
  * @param CommonGLPI $item
  * @param int $tabnum
  * @param int $withtemplate
  * @return boolean
  */
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Computer' || $item->getType() == 'Monitor') {
         if (Session::haveRightsOr('plugin_reforme_reforme', array(CREATE))) {
             $reforme = new self();
             $ID = $item->getField('id');
             $Name = $item->getField('name');
             // j'affiche le formulaire
             $reforme->showForm($ID, $item->getType());
         }
     }
 }
 /**
  * Fonction native GLPI
  * @param CommonGLPI $item
  * @param int $tabnum
  * @param int $withtemplate
  * @return boolean
  */
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Computer') {
         if (Session::haveRight('plugin_twins_twins', CREATE)) {
             $groupeAD = new self();
             $ID = $item->getField('id');
             $Name = $item->getField('name');
             // j'affiche le formulaire
             $groupeAD->showForm($ID, $Name);
         }
     }
     return true;
 }
Пример #4
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     if ($item->getType() == 'Profile') {
         $ID = $item->getField('id');
         $prof = new self();
         if (!$prof->getFromDBByProfile($item->getField('id'))) {
             $prof->createAccess($item->getField('id'));
         }
         $prof->showForm($item->getField('id'), array('target' => $CFG_GLPI["root_doc"] . "/plugins/mreporting/front/profile.form.php"));
     }
     return true;
 }
 /**
  * Fonction native GLPI
  * @param CommonGLPI $item
  * @param int $tabnum
  * @param int $withtemplate
  * @return boolean
  */
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Computer') {
         $profile = new PluginGroupeadProfileold();
         if ($profile->estAutorise()) {
             $groupeAD = new self();
             $ID = $item->getField('id');
             $Name = $item->getField('name');
             // j'affiche le formulaire
             $groupeAD->showForm($ID, $Name);
         }
     }
     return true;
 }
Пример #6
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Profile') {
         $prof = new self();
         $ID = $item->getField('id');
         $name = $item->getField('name');
         // si le profil n'existe pas dans la base, je l'ajoute
         if (!$prof->GetfromDB($ID)) {
             $prof->createAccess($ID, $name);
         }
         // j'affiche le formulaire
         $prof->showForm($ID);
     }
     return true;
 }
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if ($item->getType() == 'Profile' && $item->getField('interface') != 'helpdesk') {
         return PluginShellcommandsShellcommand::getTypeName(2);
     }
     return '';
 }
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if ($item->getType() == 'Profile' && $item->getField('interface') != 'helpdesk') {
         return PluginEnvironmentDisplay::getTypeName(1);
     }
     return '';
 }
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if ($item->getType() == 'Profile' && $item->getField('interface') != 'helpdesk') {
         return __('More ticket', 'moreticket');
     }
     return '';
 }
Пример #10
0
 /**
  * @see inc/CommonGLPI::getTabNameForItem()
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if ($item->getType() == 'Profile' && $item->getField('interface') != 'helpdesk') {
         return __('OCSNG', 'ocsinventoryng');
     }
     return '';
 }
Пример #11
0
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if ($item->getType() == 'CronTask' && $item->getField('name') == "DomainsAlert") {
         return __('Plugin Setup', 'domains');
     }
     return '';
 }
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if ($item->getType() == 'Profile' && $item->getField('interface') != 'helpdesk') {
         return PluginFinancialreportsFinancialreport::getTypeName();
     }
     return '';
 }
Пример #13
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'PluginResourcesResource') {
         $self = new self();
         $self->showItemHelpdesk($item->getField('id'), 0, $withtemplate);
     }
     return true;
 }
Пример #14
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Supplier') {
         $self = new self();
         $self->showPluginFromSupplier($item->getField('id'));
     }
     return true;
 }
Пример #15
0
 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->getField('id'), 'itemtype' => get_class($item), 'target' => $CFG_GLPI['root_doc'] . "/plugins/racks/front/itemspecification.form.php"));
     }
     return true;
 }
Пример #16
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     if ($item->getType() == 'CronTask') {
         $target = $CFG_GLPI["root_doc"] . "/plugins/additionalalerts/front/ocsalert.form.php";
         self::configCron($target, $item->getField('id'));
     }
     return true;
 }
Пример #17
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'User') {
         $me = new self();
         $ID = $item->getField('id');
         $me->showForm($ID);
     }
     return true;
 }
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Profile') {
         $prof = new self();
         $ID = $item->getField('id');
         // j'affiche le formulaire
         $prof->showForm($ID);
     }
     return true;
 }
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     if ($item->getType() == 'Profile') {
         $ID = $item->getField('id');
         $prof = new self();
         self::addDefaultProfileInfos($ID, array('plugin_additionalalerts' => 0));
         $prof->showForm($ID);
     }
     return true;
 }
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Profile') {
         $profile = new self();
         $ID = $item->getField('id');
         //In case there's no right datainjection for this profile, create it
         self::addDefaultProfileInfos($item->getID(), array('plugin_datainjection_model' => 0));
         $profile->showForm($ID);
     }
     return true;
 }
Пример #21
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     $ID = $item->getField('id');
     if (self::checkifChecklistExist($ID)) {
         self::showFromResources($ID, self::RESOURCES_CHECKLIST_IN, $withtemplate);
         self::showFromResources($ID, self::RESOURCES_CHECKLIST_OUT, $withtemplate);
     } else {
         self::showAddForm($ID);
     }
     return true;
 }
Пример #22
0
 /**
  * @see CommonDBTM::displayTabContentForItem
  */
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     $itemType = $item->getType();
     if (in_array($itemType, self::$supported_types)) {
         $customFieldsItemType = "PluginCustomfields" . $itemType;
         $customFieldsItem = new $customFieldsItemType();
         $ID = $item->getField("id");
         $customFieldsItem->showForm($ID);
     }
     return true;
 }
Пример #23
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Computer') {
         $prof = new self();
         $serial = $item->getField('serial');
         // j'affiche le formulaire
         $prof->menu($serial);
     } elseif ($item->getType() == 'Printer') {
         $prof = new self();
         $serial = $item->getField('serial');
         // j'affiche le formulaire
         $prof->menu($serial);
     } elseif ($item->getType() == 'NetworkEquipment') {
         $prof = new self();
         $serial = $item->getField('serial');
         // j'affiche le formulaire
         $prof->menu($serial);
     }
     return true;
 }
Пример #24
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Group') {
         $grp = new self();
         $ID = $item->getField('id');
         if (!$grp->GetfromDB($ID)) {
             $grp->createVip($ID);
         }
         $grp->showForm($ID);
     }
     return true;
 }
 /**
  * @see CommonDBTM::displayTabContentForItem
  */
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $ACTIVE_CUSTOMFIELDS_TYPES;
     $itemType = $item->getType();
     if (in_array($itemType, $ACTIVE_CUSTOMFIELDS_TYPES)) {
         $customFieldsItemType = "PluginCustomfields" . $itemType;
         $customFieldsItem = new $customFieldsItemType();
         $ID = $item->getField("id");
         $customFieldsItem->showForm($ID);
     }
     return true;
 }
Пример #26
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Profile') {
         $prof = new self();
         $ID = $item->getField('id');
         if (!$prof->GetfromDB($ID)) {
             $prof->createAccess($ID);
         }
         $prof->showForm($ID);
     }
     return true;
 }
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     global $CFG_GLPI;
     if ($item->getType() == 'NotificationMailSetting' && $item->getField('id') && $CFG_GLPI["use_mailing"]) {
         return PluginAdditionalalertsAdditionalalert::getTypeName(2);
     } else {
         if ($item->getType() == 'Entity') {
             return PluginAdditionalalertsAdditionalalert::getTypeName(2);
         }
     }
     return '';
 }
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     $self = new self();
     if ($item->getType() == 'PluginRacksRack') {
         switch ($tabnum) {
             case 1:
                 $self->showItemFromPlugin($item->getField('id'), PluginRacksRack::FRONT_FACE);
                 return true;
             case 2:
                 $self->showItemFromPlugin($item->getField('id'), PluginRacksRack::BACK_FACE);
                 return true;
         }
     } else {
         if (in_array($item->getType(), PluginRacksRack::getTypes(true))) {
             self::showForItem($item);
             $self->showform($CFG_GLPI["root_doc"] . "/plugins/racks/front/rack_item.form.php", $item->getField('id'), get_class($item));
         }
     }
     return true;
 }
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     if ($item->getType() == 'User') {
         $ID = $item->getField('id');
     } else {
         if ($item->getType() == 'Preference') {
             $ID = Session::getLoginUserID();
         }
     }
     $self = new self();
     $self->showForm($ID);
     return true;
 }
Пример #30
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     if ($item->getType() == 'PluginResourcesResource') {
         $ID = $item->getField('id');
         self::showReports($ID, $withtemplate);
         if ($item->can($ID, 'w') && !self::checkIfReportsExist($ID)) {
             $self = new self();
             $self->showForm("", array('plugin_resources_resources_id' => $ID, 'target' => $CFG_GLPI['root_doc'] . "/plugins/resources/front/reportconfig.form.php"));
         }
         if ($item->can($ID, 'w') && self::checkIfReportsExist($ID) && !$withtemplate) {
             PluginResourcesResource::showReportForm(array('id' => $ID, 'target' => $CFG_GLPI['root_doc'] . "/plugins/resources/front/resource.form.php"));
         }
     }
     return true;
 }