getPermission(); } else { // default permission $return['permission'] = 0; } // hide sidebar + topbar in case of login/register if ( $page == 'login' || $page == 'register' || $page == 'logout' || $page == 'forgot_password' || $page == 'reset_password' ) { $return['no_visible_elements'] = 'TRUE'; } else { $return['no_visible_elements'] = 'FALSE'; } // handle error page if ( $page == 'error' ) { $return['permission'] = 0; $return['no_visible_elements'] = 'FALSE'; } // call to load hooks for the active plugins $hook_content = Plugincache :: loadHooks(); foreach( $hook_content as $key => $value ) { $return[$key] = $value; } // load the template with the variables in the $return array helpers :: loadTemplate( $page , $return ); } catch (SystemExit $e) { /* do nothing */ }