function page($title, $no_menu=false, $is_index=false, $onload="", $js="", $script_only=false)
{
- global $path_to_root;
+ global $path_to_root, $page_security;
+
$hide_menu = $no_menu;
include($path_to_root . "/includes/page/header.inc");
page_header($title, $no_menu, $is_index, $onload, $js);
+ check_page_security($page_security);
// error_box();
if($script_only) {
echo '<noscript>';
. "<br>" . _("Please contact your system administrator.")
: _("Please remove \$security_groups and \$security_headings arrays from config.php file!");
- page(_("Access denied"), false);
- display_error($msg);
+ display_error($msg);
end_page();
kill_login();
exit;
if (!$_SESSION["wa_current_user"]->can_access_page($page_security))
{
- // no_menu parameter guess here is ugly hack, but works for now.
- // Better solution is to use global switch for menu, set before
- // session.inc inclusion.
- page(_("Access denied"), strpos($_SERVER['PHP_SELF'], '/view/'));
echo "<center><br><br><br><b>";
echo _("The security settings on your account do not permit you to access this function");
echo "</b>";
echo "<br><br><br><br></center>";
end_page();
- //kill_login();
exit;
}
}
*/
add_access_extensions();
- check_page_security($page_security);
}
// POST vars cleanup needed for direct reuse.
// We quote all values later with db_escape() before db update.