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;
 }
Example #2
0
 /**
  * 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() == 'Ticket') {
         $peTicketCopy = new self();
         $peTicketCopy->showForm($item);
     }
     return TRUE;
 }
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getID() > 0) {
         $pfBatteries = new self();
         $pfBatteries->showForm($item->getID());
     }
     return TRUE;
 }
Example #4
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->getID(), 'itemtype' => get_class($item)));
     }
     return true;
 }
Example #5
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)
 {
     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;
 }
Example #7
0
 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;
 }
Example #8
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     if ($item->getType() == 'PluginResourcesResource') {
         $self = new self();
         $self->showForm($item->getField('id'), 0, $withtemplate);
     }
     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;
 }
Example #10
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     if ($item->getType() == 'PluginIdeaboxIdeabox') {
         $self = new self();
         $self->showComments($item);
         $self->showForm("", array('plugin_ideabox_ideaboxes_id' => $item->getField('id'), 'target' => $CFG_GLPI['root_doc'] . "/plugins/ideabox/front/comment.form.php"));
     }
     return true;
 }
 /**
  * @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;
 }
 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;
 }
 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;
 }
 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;
 }
Example #15
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     if ($item->getType() == 'PluginDatabasesDatabase') {
         $self = new self();
         $self->showScripts($item);
         $self->showForm("", array('plugin_databases_databases_id' => $item->getField('id'), 'target' => $CFG_GLPI['root_doc'] . "/plugins/databases/front/script.form.php"));
     }
     return true;
 }
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     if ($item->getType() == 'Profile') {
         $ID = $item->getID();
         $prof = new self();
         self::addDefaultProfileInfos($ID, array('plugin_environment' => 0, 'plugin_environment_appliances' => 0, 'plugin_environment_webapplications' => 0, 'plugin_environment_certificates' => 0, 'plugin_environment_accounts' => 0, 'plugin_environment_domains' => 0, 'plugin_environment_databases' => 0, 'plugin_environment_badges' => 0));
         $prof->showForm($ID);
     }
     return true;
 }
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     if ($item->getType() == 'Profile') {
         $ID = $item->getID();
         $prof = new self();
         self::addDefaultProfileInfos($ID, array('plugin_financialreports' => 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;
 }
Example #19
0
 public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     if ($item->getType() == 'Profile') {
         $ID = $item->getID();
         $prof = new self();
         self::addDefaultProfileInfos($ID, array('plugin_consumables' => 0, 'plugin_consumables_request' => 0, 'plugin_consumables_user' => 0, 'plugin_consumables_group' => 0, 'plugin_consumables_validation' => 0));
         $prof->showForm($ID);
     }
     return true;
 }
Example #20
0
 public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     if ($item->getType() == 'Profile') {
         $ID = $item->getID();
         $prof = new self();
         self::addDefaultProfileInfos($ID, array('plugin_accounts' => 0, 'plugin_accounts_my_groups' => 0, 'plugin_accounts_open_ticket' => 0, 'plugin_accounts_see_all_users' => 0));
         $prof->showForm($ID);
     }
     return true;
 }
Example #21
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;
 }
Example #22
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;
 }
 /**
  * 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());
         }
     }
 }
Example #24
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;
 }
Example #25
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) {
    switch($item->getType()) {
       case 'Profile':
          $profile = new self();
          $profile->showForm($item->getID());
          break;
       case 'PluginGenericobjectType':
          _log($item);
          self::showForItemtype($item);
          break;
    }
    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() == 'PluginFusioninventoryConfig') {
         $pfAgentmodule = new self();
         $pfAgentmodule->showForm();
     } else {
         if ($item->getType() == 'PluginFusioninventoryAgent') {
             $pfAgentmodule = new self();
             $pfAgentmodule->showFormAgentException($item->getID());
         }
     }
     return TRUE;
 }
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Computer') {
         $profile = new PluginTwinsProfileold();
         if ($profile->estAutorise()) {
             $twins = new self();
             $ID = $item->getField('id');
             // j'affiche le formulaire
             $twins->showForm($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') {
         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;
 }
Example #29
0
 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)
 {
     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;
 }