Fixed a problem with the logout when the php session has ended.
| | |
| | | public function check_module_permissions($module) { |
| | | // Check if the current user has the permissions to access this module |
| | | if(!stristr($_SESSION["s"]["user"]["modules"],$module)) { |
| | | header("Location: ../index.php"); |
| | | echo "LOGIN_REDIRECT:/index.php"; |
| | | //header("Location: ../index.php"); |
| | | exit; |
| | | } |
| | | } |
| | |
| | | loadContent(parts[1]); |
| | | //redirect = parts[1]; |
| | | //window.setTimeout('loadContent(redirect)', 1000); |
| | | } else if (o.responseText.indexOf('LOGIN_REDIRECT:') > -1) { |
| | | // Go to the login page |
| | | document.location.href = 'index.php'; |
| | | } else { |
| | | document.getElementById('pageContent').innerHTML = o.responseText; |
| | | } |