static function getMenuContent() { global $CFG_GLPI; $menu = array(); $menu['title'] = self::getMenuName(); $menu['page'] = "/plugins/webapplications/front/webapplication.php"; $menu['links']['search'] = PluginWebapplicationsWebapplication::getSearchURL(false); if (PluginWebapplicationsWebapplication::canCreate()) { $menu['links']['add'] = PluginWebapplicationsWebapplication::getFormURL(false); } return $menu; }
-------------------------------------------------------------------------- */ include '../../../inc/includes.php'; if (!isset($_GET["id"])) { $_GET["id"] = ""; } if (!isset($_GET["withtemplate"])) { $_GET["withtemplate"] = ""; } $web = new PluginWebapplicationsWebapplication(); $web_item = new PluginWebapplicationsWebapplication_Item(); if (isset($_POST["add"])) { $web->check(-1, CREATE, $_POST); $newID = $web->add($_POST); if ($_SESSION['glpibackcreated']) { Html::redirect($web->getFormURL() . "?id=" . $newID); } Html::back(); } else { if (isset($_POST["delete"])) { $web->check($_POST['id'], DELETE); $web->delete($_POST); $web->redirectToList(); } else { if (isset($_POST["restore"])) { $web->check($_POST['id'], PURGE); $web->restore($_POST); $web->redirectToList(); } else { if (isset($_POST["purge"])) { $web->check($_POST['id'], PURGE);