CANNOT FIND USER!"; exit; }else{ $show_tree_view = $user[ShowTree]; } }else{ /* if auth is turned off; obviously they have rights */ $show_tree_view = "on"; } if (! isset($action)) { $action = 'tree'; } switch ($action) { case 'tree': if ($show_tree_view != "on") { print "YOU DO NOT HAVE RIGHTS FOR TREE VIEW"; exit; } include_once ('include/form.php'); include_once ('include/tree_view_functions.php'); DrawMatrixTableBegin("97%"); if (!(isset($tree_id))) { $tree_id = 0; } /* if cacti's builtin authentication is turned on then make sure to take graph permissions into account here. if a user does not have rights to a particular graph; do not show it. they will get an access denied message if they try and view the graph directly. */ if ($config["global_auth"]["value"] == "on") { /* take tree permissions into account here, if the user does not have permission give an "access denied" message */ $user = db_fetch_row("select UserID from auth_graph_hierarchy where hierarchyid=$tree_id and userid=" . GetCurrentUserID($HTTP_SESSION_VARS['user_id'],$config["guest_user"]["value"])); if ($config["graph_policy"]["auth"] == "1") { if (sizeof($user) > 0) { $access_denied = true; } }elseif ($config["graph_policy"]["auth"] == "2") { if (sizeof($user) == 0) { $access_denied = true; } } if ($access_denied == true) { print "ACCESS DENIED"; exit; } } print ''; print "[root] - $tree_name

"; print ''; grow_graph_tree($tree_id, $start_branch, $user_id, $tree_parameters); print ''; break; } include_once ("include/bottom_footer.php");