本文整理汇总了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;
}