• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CommonGLPI类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中CommonGLPI的典型用法代码示例。如果您正苦于以下问题:PHP CommonGLPI类的具体用法?PHP CommonGLPI怎么用?PHP CommonGLPI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了CommonGLPI类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Config') {
         $config = new self();
         $config->showFormExample();
     }
 }
开发者ID:pluginsGLPI,项目名称:example,代码行数:7,代码来源:config.class.php


示例2: displayTabContentForItem

 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;
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:34,代码来源:tabprofile.class.php


示例3: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($tabnum == 2) {
         echo $item->configureNodesLinks($item->getID());
     }
     return TRUE;
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:7,代码来源:weathermap.class.php


示例4: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == __CLASS__) {
         $item->showMergeCandidates();
     }
     return true;
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:7,代码来源:software.class.php


示例5: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Group') {
         self::showForGroup($item);
     }
     return true;
 }
开发者ID:erchbox,项目名称:itilcategorygroups,代码行数:7,代码来源:group_level.class.php


示例6: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == __CLASS__) {
         self::showDoubles($item);
     }
     return true;
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:7,代码来源:fieldunicity.class.php


示例7: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     $pflock = new self();
     if ($item->getType() == 'PluginFusioninventoryConfig') {
         echo "<table width='950'>";
         echo "<tr>";
         echo "<td valign='top' width='33%'>";
         $pflock->showFormItemtype('Computer');
         echo "</td>";
         echo "<td valign='top' width='33%'>";
         $pflock->showFormItemtype('Printer');
         echo "</td>";
         echo "<td valign='top' width='33%'>";
         $pflock->showFormItemtype('NetworkEquipment');
         echo "</td>";
         echo "</tr>";
         echo "</table>";
         return TRUE;
     }
     if ($item->getID() < 1) {
         $pflock->showForm(Toolbox::getItemTypeFormURL('PluginFusioninventoryLock'), $item->getType());
     } else {
         $pflock->showForm(Toolbox::getItemTypeFormURL('PluginFusioninventoryLock') . '?id=' . $item->getID(), $item->getType(), $item->getID());
     }
     return TRUE;
 }
开发者ID:korial29,项目名称:fusioninventory-for-glpi,代码行数:26,代码来源:lock.class.php


示例8: displayTabContentForItem

 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;
 }
开发者ID:korial29,项目名称:fusioninventory-for-glpi,代码行数:7,代码来源:collect_file.class.php


示例9: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item instanceof CommonTreeDropdown) {
         $item->showChildren();
     }
     return true;
 }
开发者ID:korial29,项目名称:glpi,代码行数:7,代码来源:commontreedropdown.class.php


示例10: displayTabContentForItem

   static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) {

      if ($item->getType()=='Computer') {
         if (self::canView()) {
            // Show list filtered on item, sorted on component ascending ...
            Search::manageGetValues(PluginMonitoringUnavailability::getTypeName());
            Search::showList(PluginMonitoringUnavailability::getTypeName(), array(
               'field' => array(22), 'searchtype' => array('equals'), 'contains' => array($item->getID()),
               'sort' => 3, 'order' => 'DESC'
               ));
            return true;
         }
      } else if ($item->getType()=='NetworkEquipment') {
         if (self::canView()) {
            // Show list filtered on item, sorted on component ascending ...
            Search::manageGetValues(PluginMonitoringUnavailability::getTypeName());
            Search::showList(PluginMonitoringUnavailability::getTypeName(), array(
               'field' => array(23), 'searchtype' => array('equals'), 'contains' => array($item->getID()),
               'sort' => 3, 'order' => 'DESC'
               ));
            return true;
         }
      }

      return true;
   }
开发者ID:euqip,项目名称:glpi-smartcities,代码行数:26,代码来源:unavailability.class.php


示例11: getTabNameForItem

 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if ($item->getType() == 'Profile') {
         return "WinAdminPassword";
     }
     return '';
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:7,代码来源:profile.class.php


示例12: getTabNameForItem

 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();
 }
开发者ID:korial29,项目名称:fusioninventory-for-glpi,代码行数:27,代码来源:collect_wmi_content.class.php


示例13: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $DB;
     if ($item->getType() == 'PluginFusioninventoryTask') {
         $item->showJobLogs();
     }
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:7,代码来源:taskjobstate.class.php


示例14: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == __CLASS__) {
         switch ($tabnum) {
             case 1:
                 // all
                 Planning::showSelectionForm($_POST['type'], $_POST['date'], 'my', 0, $_POST["limititemtype"]);
                 Planning::showPlanning($_SESSION['glpiID'], $_POST["gID"], $_POST["date"], $_POST["type"], $_POST["limititemtype"]);
                 break;
             case 2:
                 Planning::showSelectionForm($_POST['type'], $_POST['date'], 'mygroups', 0, $_POST["limititemtype"]);
                 Planning::showPlanning($_SESSION['glpiID'], 'mine', $_POST["date"], $_POST["type"], $_POST["limititemtype"]);
                 break;
             case 3:
                 Planning::showSelectionForm($_POST['type'], $_POST['date'], 'users', $_POST["uID"], $_POST["limititemtype"]);
                 Planning::showPlanning($_POST['uID'], 0, $_POST["date"], $_POST["type"], $_POST["limititemtype"]);
                 break;
             case 4:
                 Planning::showSelectionForm($_POST['type'], $_POST['date'], 'groups', $_POST["gID"], $_POST["limititemtype"]);
                 Planning::showPlanning(0, $_POST['gID'], $_POST["date"], $_POST["type"], $_POST["limititemtype"]);
                 break;
         }
     }
     return true;
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:25,代码来源:planning.class.php


示例15: getTabNameForItem

 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     $ong = array();
     if ($item->getID() > 0) {
         $ong[] = __('Associated SNMP authentications', 'fusioninventory');
     }
     return $ong;
 }
开发者ID:korial29,项目名称:fusioninventory-for-glpi,代码行数:8,代码来源:iprange_configsecurity.class.php


示例16: displayTabContentForItem

 /**
  * Display tab's content for each users
  *
  * @static
  * @param CommonGLPI $item
  * @param int $tabnum
  * @param int $withtemplate
  * @return bool|true
  */
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     $config = new PluginMoreticketConfig();
     if ($item->getType() == 'Ticket' && $item->fields['status'] == Ticket::CLOSED && $config->closeInformations()) {
         self::showForTicket($item);
     }
     return true;
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:17,代码来源:closeticket.class.php


示例17: displayTabContentForItem

 /**
  * 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;
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:17,代码来源:tickettemplate.class.php


示例18: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     if ($item->getType() == 'Supplier') {
         PluginWebapplicationsWebapplication_Item::showForSupplier($item);
     }
     return true;
 }
开发者ID:wittwerch,项目名称:webapplications,代码行数:8,代码来源:webapplication.class.php


示例19: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Supplier') {
         $self = new self();
         $self->showPluginFromSupplier($item->getField('id'));
     }
     return true;
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:8,代码来源:database.class.php


示例20: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getID() > -1) {
         $pmEntity = new PluginFusionInventoryEntity();
         $pmEntity->showForm($item->fields['id']);
     }
     return true;
 }
开发者ID:korial29,项目名称:fusioninventory-for-glpi,代码行数:8,代码来源:entity.class.php



注:本文中的CommonGLPI类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CommonModel类代码示例发布时间:2022-05-20
下一篇:
PHP CommonFunctions类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap