當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。