function protect($level, $owner = -1) { if (accesslevel($owner) < $level) { run("access_denied"); // run("display:bottomofpage"); exit; } }
function protect($level, $owner = -1) { global $CFG; //error_log($level); //error_log($owner); if (accesslevel($owner) < $level) { echo '<a href="' . $CFG->wwwroot . '">' . __gettext("Access Denied") . '</a>'; exit; } }
function protect($level, $owner = -1) { if (accesslevel($owner) < $level) { run("access_denied"); exit; } }