</table>\n"; } if (isset($_SESSION["sess_view_tree_id"])) { if (read_config_option("auth_method") != 0) { /* take tree permissions into account here, if the user does not have permission give an "access denied" message */ $access_denied = !(is_tree_allowed($_SESSION["sess_view_tree_id"])); if ($access_denied == true) { print "<strong><font size='+1' color='FF0000'>ACCESS DENIED</font></strong>"; exit; } } if (read_graph_config_option("default_tree_view_mode") == "1") { grow_graph_tree($_SESSION["sess_view_tree_id"], (!empty($start_branch) ? $start_branch : 0), isset($_SESSION["sess_user_id"]) ? $_SESSION["sess_user_id"] : 0, $tree_parameters); }elseif (read_graph_config_option("default_tree_view_mode") == "2") { grow_right_pane_tree((isset($_GET["tree_id"]) ? $_GET["tree_id"] : 0), (isset($_GET["leaf_id"]) ? $_GET["leaf_id"] : 0), (isset($_GET["host_group_data"]) ? urldecode($_GET["host_group_data"]) : 0)); } } print "<br><br>"; break; case 'preview': define("ROWS_PER_PAGE", read_graph_config_option("preview_graphs_per_page")); /* ================= input validation ================= */ input_validate_input_number(get_request_var_request("host_id"));
validate_tree_vars(); if (read_config_option('auth_method') != 0 && empty($current_user['show_tree'])) { print "<strong><font size='+1' color='FF0000'>YOU DO NOT HAVE RIGHTS FOR TREE VIEW</font></strong>"; exit; } if (!isset($_REQUEST['tree_id']) && isset($_SESSION['dhtml_tree'])) { unset($_SESSION['dhtml_tree']); } $tree_dropdown_html = draw_tree_dropdown(isset($_REQUEST['tree_id']) ? $_REQUEST['tree_id'] : '0'); /* don't even print the table if there is not >1 tree */ if (!empty($tree_dropdown_html) && read_graph_config_option('default_tree_view_mode') == '1') { print "\n\t\t<table width='100%' style='background-color: #f5f5f5; border: 1px solid #bbbbbb;' align='center' cellpadding='3'>\n\t\t\t<tr>\n\t\t\t\t{$tree_dropdown_html}\n\t\t\t</tr>\n\t\t</table>\n"; } if (read_graph_config_option('default_tree_view_mode') == '1') { $tree_parameters = array(); grow_graph_tree($_SESSION['sess_view_tree_id'], !empty($start_branch) ? $start_branch : 0, isset($_SESSION['sess_user_id']) ? $_SESSION['sess_user_id'] : 0, $tree_parameters); } include_once './include/bottom_footer.php'; break; case 'tree_content': validate_tree_vars(); if (read_config_option('auth_method') != 0 && empty($current_user['show_tree'])) { print "<strong><font size='+1' color='FF0000'>YOU DO NOT HAVE RIGHTS FOR TREE VIEW</font></strong>"; exit; } ?> <script type="text/javascript" > $(document).ready(function() { $(".graphimage").zoom({inputfieldStartTime : 'date1', inputfieldEndTime : 'date2', serverTimeOffset : <?php print date('Z'); ?>