Пример #1
0
                }
            }
        }
    }
}
$notvalidoptions = array('_glpi_tab', '_itemtype', 'sort', 'order', 'withtemplate');
$options = $_GET;
foreach ($notvalidoptions as $key) {
    if (isset($options[$key])) {
        unset($options[$key]);
    }
}
if (isset($options['locked'])) {
    ObjectLock::setReadOnlyProfile();
}
CommonGLPI::displayStandardTab($item, $_GET['_glpi_tab'], $_GET["withtemplate"], $options);
if (isset($_GET['full_page_tab'])) {
    echo "<div class='center' id='debugajax'>";
    echo "<a href='" . htmlentities($_SERVER['REQUEST_URI']) . "' class='vsubmit'>Reload</a>";
    echo "</div>";
    // I think that we should display this warning, because tabs are not prepare
    // for being used full space ...
    if (!isset($_SESSION['glpi_warned_about_full_page_tab'])) {
        // Debug string : not really need translation.
        $msg = 'WARNING: full page tabs are only for debug/validation purpose !\\n';
        $msg .= 'Actions on this page may have undefined result.';
        echo "<script type='text/javascript' >\n";
        echo "alert('{$msg}')";
        echo "</script>";
        $_SESSION['glpi_warned_about_full_page_tab'] = true;
    }
        $i++;
        if ($_POST['glpi_tab'] == $i) {
            $pfTaskjob->showForm($taskjob_id);
            echo "<br/>";
            $pfTaskjoblog->showHistory($taskjob_id);
            $taskjob_id_next = $taskjob_id;
            for ($j = 2; $j > 1; $j++) {
                $a_taskjobreties = $pfTaskjob->find("`rescheduled_taskjob_id`='" . $taskjob_id_next . "' ", "", 1);
                if (!empty($a_taskjobreties)) {
                    foreach ($a_taskjobreties as $taskjob_id_next => $datas2) {
                        $pfTaskjob->showForm($taskjob_id_next);
                        $pfTaskjoblog->showHistory($taskjob_id_next);
                    }
                } else {
                    $j = 0;
                }
            }
        }
    }
}
// New taskjob
$i++;
if ($_POST['glpi_tab'] == $i) {
    $pfTaskjob->showForm(0);
}
$item = new $_REQUEST['itemtype']();
if ($item instanceof CommonDBTM && $item->isNewItem() && (!isset($_REQUEST["id"]) || !$item->can($_REQUEST["id"], 'r'))) {
    exit;
}
CommonGLPI::displayStandardTab($item, $_REQUEST['glpi_tab'], '');
Html::ajaxFooter();
Пример #3
0
}
if (!isset($_POST["sort"])) {
    $_POST["sort"] = "";
}
if (!isset($_POST["order"])) {
    $_POST["order"] = "";
}
if (!isset($_POST["withtemplate"])) {
    $_POST["withtemplate"] = "";
}
if ($item = getItemForItemtype($_POST['itemtype'])) {
    if ($item instanceof CommonDBTM && $item->isNewItem() && (!isset($_POST["id"]) || !$item->can($_POST["id"], 'r'))) {
        exit;
    }
}
CommonGLPI::displayStandardTab($item, $_POST['glpi_tab'], $_POST["withtemplate"]);
if (isset($_POST['full_page_tab'])) {
    echo "<div class='center' id='debugajax'>";
    Html::showSimpleForm($_SERVER['REQUEST_URI'], 'full_page_tab', 'Reload this tab', $_POST);
    echo "</div>";
    Html::footer();
    // I think that we should display this warning, because tabs are not prepare
    // for being used full space ...
    if (!isset($_SESSION['glpi_warned_about_full_page_tab'])) {
        // Debug string : not really need translation.
        $msg = 'WARNING: full page tabs are only for debug/validation purpose !\\n';
        $msg .= 'Actions on this page may have undefined result.';
        echo "<script type='text/javascript' >\n";
        echo "alert('{$msg}')";
        echo "</script>";
        $_SESSION['glpi_warned_about_full_page_tab'] = true;