Session::changeProfile($_POST['newprofile']); if ($_SESSION["glpiactiveprofile"]["interface"] == "helpdesk") { if ($_SESSION['glpiactiveprofile']['create_ticket_on_login']) { Html::redirect($CFG_GLPI['root_doc'] . "/front/helpdesk.public.php?create_ticket=1"); } else { Html::redirect($CFG_GLPI['root_doc'] . "/front/helpdesk.public.php"); } } Html::redirect($_SERVER['PHP_SELF']); } Html::redirect(preg_replace("/entities_id.*/", "", $_SERVER['HTTP_REFERER'])); } // Manage entity change if (isset($_GET["active_entity"])) { if (!isset($_GET["is_recursive"])) { $_GET["is_recursive"] = 0; } if (Session::changeActiveEntities($_GET["active_entity"], $_GET["is_recursive"])) { if ($_GET["active_entity"] == $_SESSION["glpiactive_entity"] && isset($_SERVER['HTTP_REFERER'])) { Html::redirect(preg_replace("/entities_id.*/", "", $_SERVER['HTTP_REFERER'])); } } } Html::header(Central::getTypeName(1), $_SERVER['PHP_SELF']); // Redirect management if (isset($_GET["redirect"])) { Toolbox::manageRedirect($_GET["redirect"]); } $central = new Central(); $central->show(); Html::footer();
Session::changeProfile($_POST['newprofile']); if ($_SESSION["glpiactiveprofile"]["interface"] == "helpdesk") { if ($_SESSION['glpiactiveprofile']['create_ticket_on_login']) { Html::redirect($CFG_GLPI['root_doc'] . "/front/helpdesk.public.php?create_ticket=1"); } else { Html::redirect($CFG_GLPI['root_doc'] . "/front/helpdesk.public.php"); } } Html::redirect($_SERVER['PHP_SELF']); } Html::redirect(preg_replace("/entities_id.*/", "", $_SERVER['HTTP_REFERER'])); } // Manage entity change if (isset($_GET["active_entity"])) { if (!isset($_GET["is_recursive"])) { $_GET["is_recursive"] = 0; } if (Session::changeActiveEntities($_GET["active_entity"], $_GET["is_recursive"])) { if ($_GET["active_entity"] == $_SESSION["glpiactive_entity"] && isset($_SERVER['HTTP_REFERER'])) { Html::redirect(preg_replace("/entities_id.*/", "", $_SERVER['HTTP_REFERER'])); } } } Html::header(Central::getTypeName(1), $_SERVER['PHP_SELF']); // Redirect management if (isset($_GET["redirect"])) { Toolbox::manageRedirect($_GET["redirect"]); } $central = new Central(); $central->display(); Html::footer();
You should have received a copy of the GNU General Public License along with GLPI; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -------------------------------------------------------------------------- */ // ---------------------------------------------------------------------- // Original Author of file: // Purpose of file: // ---------------------------------------------------------------------- define('GLPI_ROOT', '..'); include GLPI_ROOT . "/inc/includes.php"; header("Content-Type: text/html; charset=UTF-8"); header_nocache(); checkCentralAccess(); $central = new Central(); if (!isset($_REQUEST['glpi_tab'])) { exit; } switch ($_REQUEST['glpi_tab']) { case 2: $central->showGroupView(); break; case 3: $central->showGlobalView(); break; case -1: // all $central->showMyView(); echo "<br>"; $central->showGroupView();