Beispiel #1
0
        $_POST["locations_id"] = $_GET["locations_id"];
    }
    if (!isset($_POST["download"])) {
        $_POST["download"] = $_GET["download"];
    }
    $types = PluginPositionsPosition::getTypes();
    if (!isset($_POST["itemtype"])) {
        $_POST["itemtype"] = $types;
    }
    $locations_id = $_POST["locations_id"];
    $id = $_GET["positions_id"];
    $itemtype = $_POST['itemtype'];
    $menuoff = 1;
    $download = $_POST['download'];
}
$plugin = new Plugin();
if (isset($_GET['from_treeview']) && $plugin->isActivated("treeview")) {
    Html::header(PluginPositionsPosition::getTypeName(), '', "plugins", "positions");
} else {
    Html::popHeader(PluginPositionsPosition::getTypeName(), $_SERVER['PHP_SELF']);
}
if (isset($locations_id) && !empty($locations_id)) {
    $target = $_SERVER['PHP_SELF'] . "?id=" . $id;
    $options = array('id' => $id, 'locations_id' => $locations_id, 'itemtype' => $itemtype, 'target' => $target, 'menuoff' => $menuoff, 'download' => $download);
    PluginPositionsPosition::showMap($options);
} else {
    echo "<div class='center'><br><br>";
    echo "<img src='" . $CFG_GLPI["root_doc"] . "/pics/warning.png' alt='warning'><br><br>";
    echo "<span class='b'>" . __('The selected object is not located on a map', 'positions') . "</span></div>";
}
Html::popFooter();