/**
    * 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) {

      switch ($item->getType()) {
         case 'Central' :
            $pmDisplay = new PluginMonitoringDisplay();
            $pmComponentscatalog = new PluginMonitoringComponentscatalog();
            // $pmDisplay->showCounters("Componentscatalog");
            $pmComponentscatalog->showChecks();
            return true;

      }
      if ($item->getID() > 0) {
         switch($tabnum) {

            case 1:
               $pmComponentscatalog_Component = new PluginMonitoringComponentscatalog_Component();
               $pmComponentscatalog_Component->showComponents($item->getID());
               break;

            case 2 :
               $pmComponentscatalog_Host = new PluginMonitoringComponentscatalog_Host();
               $pmComponentscatalog_Host->showHosts($item->getID(), 1);
               break;

            case 3 :
               $pmComponentscatalog_rule = new PluginMonitoringComponentscatalog_rule();
               $pmComponentscatalog_rule->showRules($item->getID());
               break;

            case 4 :
               $pmComponentscatalog_Host = new PluginMonitoringComponentscatalog_Host();
               $pmComponentscatalog_Host->showHosts($item->getID(), 0);
               break;

            case 5 :
               $pmContact_Item = new PluginMonitoringContact_Item();
               $pmContact_Item->showContacts("PluginMonitoringComponentscatalog", $item->getID());
               break;

            case 6:
               $pmUnavailability = new PluginMonitoringUnavailability();
               $pmUnavailability->displayComponentscatalog($item->getID());
               break;

            case 7:
               $pmPluginMonitoringComponentscatalog = new PluginMonitoringComponentscatalog();
               $pmPluginMonitoringComponentscatalog->showSimpleReport($item->getID());
               break;

            case 8:
               $pmPluginMonitoringComponentscatalog = new PluginMonitoringComponentscatalog();
               $pmPluginMonitoringComponentscatalog->showSyntheseReport($item->getID());
               break;


            default :

         }

      }
      return true;
   }
    switch ($_POST['glpi_tab']) {
        case -1:
            break;
        case 1:
            $pmComponentscatalog_Component = new PluginMonitoringComponentscatalog_Component();
            $pmComponentscatalog_Component->showComponents($_POST['id']);
            break;
        case 2:
            $pmComponentscatalog_Host = new PluginMonitoringComponentscatalog_Host();
            $pmComponentscatalog_Host->showHosts($_POST['id'], 1);
            break;
        case 3:
            $pmComponentscatalog_rule = new PluginMonitoringComponentscatalog_rule();
            $pmComponentscatalog_rule->showRules($_POST['id']);
            break;
        case 4:
            $pmComponentscatalog_Host = new PluginMonitoringComponentscatalog_Host();
            $pmComponentscatalog_Host->showHosts($_POST['id'], 0);
            break;
        case 5:
            $pmContact_Item = new PluginMonitoringContact_Item();
            $pmContact_Item->showContacts("PluginMonitoringComponentscatalog", $_POST['id']);
            break;
        case 6:
            $pmUnavaibility = new PluginMonitoringUnavaibility();
            $pmUnavaibility->displayComponentscatalog($_POST['id']);
            break;
        default:
    }
}
ajaxFooter();