static public redirect ( $dest ) : nothing | ||
$dest | string: Redirection destination | |
return | nothing |
static function redirect($dest)
{
$toadd = '';
$dest = addslashes($dest);
if (!strpos($dest, "?")) {
$toadd = '?tokonq=' . Toolbox::getRandomString(5);
}
echo "<script language=javascript>\n NomNav = navigator.appName;\n if (NomNav=='Konqueror') {\n window.location='" . $dest . $toadd . "';\n } else {\n window.location='" . $dest . "';\n }\n </script>";
exit;
}
function checkRight($itemtype, $right) { global $CFG_GLPI; if (!Session::haveRight($itemtype, $right)) { // Check for session timeout if (!isset($_SESSION['glpiID'])) { Html::redirect($CFG_GLPI['root_doc'] . '/index.php'); exit; } Html::displayRightError(); } }