本文整理匯總了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;
}
}
示例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;
}