Beispiel #1
0
                            $pos->check($_POST['id'], 'w');
                            $pos->delete($_POST, 1);
                            Html::back();
                            //from coordinates ou map
                        } else {
                            if (isset($_POST["deletepos"])) {
                                $pos->check($_POST['id'], 'w');
                                $pos->delete($_POST, 1);
                                Html::redirect($CFG_GLPI["root_doc"] . "/plugins/positions/front/map.php?locations_id=" . $_POST["locations_id"]);
                            } else {
                                if (isset($_POST["addLocation"])) {
                                    $pos->checkGlobal("r");
                                    Html::header(PluginPositionsPosition::getTypeName(), '', "plugins", "positions");
                                    $map = PluginPositionsPosition::getDocument($_POST["locations_id"]);
                                    $options = array("document_id" => $map, "locations_id" => $_POST["locations_id"]);
                                    PluginPositionsPosition::showMapCreateLocation($options);
                                    Html::footer();
                                } else {
                                    $pos->checkGlobal("r");
                                    Html::header(PluginPositionsPosition::getTypeName(), '', "plugins", "positions");
                                    $pos->showForm($_GET["id"]);
                                    Html::footer();
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}