0) { $authorized = db_fetch_cell("SELECT COUNT(*) FROM ( SELECT realm_id FROM user_auth_realm AS uar WHERE uar.user_id=" . $_SESSION['sess_user_id'] . " AND uar.realm_id=$realm_id UNION SELECT realm_id FROM user_auth_group_realm AS uagr INNER JOIN user_auth_group_members AS uagm ON uagr.group_id=uagm.group_id INNER JOIN user_auth_group AS uag ON uag.id=uagr.group_id WHERE uag.enabled='on' AND uagm.user_id=" . $_SESSION['sess_user_id'] . " AND uagr.realm_id=$realm_id ) AS authorized"); }else{ $authroized = false; } if ($realm_id != -1 && !$authorized) { if (isset($_SERVER['HTTP_REFERER'])) { $goBack = "[Return | Login Again]"; }else{ $goBack = "[Login Again]"; } print "\n"; print "\n"; print "\n"; print "\tCacti\n"; print "\t\n"; print "\t\n"; print "\t\n"; print "\t\n"; print "\t\n"; print "\t\n"; print "\t\n"; print "\t\n"; print "\t\n"; print "\n"; print "\n"; print "\n"; print "\t
\n"; print "\t\t\n"; print "\t\t\t\n"; print "\t\t\t\t\n"; print "\t\t\t\n"; print "\t\t\t\t\n"; print "\t\t\t\n"; print $goBack . "\n"; print "\t\t\t\n"; print "\t\t
Your are not permitted to access this section of Cacti.
\n"; print "\t\t\t\tIf you feel that you need access to this particular seciton,
\n"; print "\t\t\t\tplease contact your Cacti administrator, or.
\n"; print "\t
\n"; print "\n"; print "\n"; exit; } } }