当前位置: 首页>>代码示例>>PHP>>正文


PHP CommonGLPI::displayUserForm方法代码示例

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


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

示例1: displayTabContentForItem

 /**
  * Display a list of all forms on the configuration page
  *
  * @param  CommonGLPI $item         Instance of a CommonGLPI Item (The Config Item)
  * @param  integer    $tabnum       Number of the current tab
  * @param  integer    $withtemplate
  *
  * @see CommonDBTM::displayTabContentForItem
  *
  * @return null                     Nothing, just display the list
  */
 public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     $uri = strrchr($_SERVER['HTTP_REFERER'], '/');
     if (strpos($uri, '?')) {
         $uri = substr($uri, 0, strpos($uri, '?'));
     }
     $uri = trim($uri, '/');
     switch ($uri) {
         case "form.form.php":
             echo '<div style="text-align: left">';
             $item->displayUserForm($item);
             echo '</div>';
             break;
     }
 }
开发者ID:jcr0ch4,项目名称:formcreator,代码行数:26,代码来源:form.class.php

示例2: displayTabContentForItem

 /**
  * Display a list of all forms on the configuration page
  *
  * @param  CommonGLPI $item         Instance of a CommonGLPI Item (The Config Item)
  * @param  integer    $tabnum       Number of the current tab
  * @param  integer    $withtemplate
  *
  * @see CommonDBTM::displayTabContentForItem
  *
  * @return null                     Nothing, just display the list
  */
 public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $DB;
     //[CRI]
     if ($item->getType() == 'PluginFormcreatorForm') {
         $uri = strrchr($_SERVER['HTTP_REFERER'], '/');
         if (strpos($uri, '?')) {
             $uri = substr($uri, 0, strpos($uri, '?'));
         }
         $uri = trim($uri, '/');
         switch ($uri) {
             case "form.form.php":
                 echo '<div style="text-align: left">';
                 $item->displayUserForm($item);
                 echo '</div>';
                 break;
         }
     }
     //[CRI]
     if ($item->getType() == 'Ticket') {
         $ticketid = $item->getID();
         $formid = 0;
         $query = "SELECT * FROM glpi_plugin_formcreator_forms_items where itemtype='" . $item->getType() . "' and items_id = " . $ticketid . "";
         //echo $query;
         $result = $DB->query($query);
         if ($data = $DB->fetch_assoc($result)) {
             $formid = $data['plugin_formcreator_forms_id'];
         }
         PluginFormcreatorInstruccion::showInstrucciontecnica($item, $formid, "PluginFormcreatorForm");
     }
     return true;
 }
开发者ID:OscarLoayzaB,项目名称:formcreator,代码行数:43,代码来源:form.class.php


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