&host_id=" . $_REQUEST["host_id"];
}
$nav_url = ereg_replace("((\?|&)host_id=[0-9]+|(\?|&)filter=[a-zA-Z0-9]*)", "", $nav_url);
html_graph_start_box(1, true);
html_nav_bar($colors["header_panel"], read_graph_config_option("num_columns"), $_REQUEST["page"], ROWS_PER_PAGE, $total_rows, $nav_url);
if (read_graph_config_option("thumbnail_section_preview") == "on") {
html_graph_thumbnail_area($graphs, "","graph_start=" . get_current_graph_start() . "&graph_end=" . get_current_graph_end());
}else{
html_graph_area($graphs, "", "graph_start=" . get_current_graph_start() . "&graph_end=" . get_current_graph_end());
}
html_graph_end_box();
print "
";
break;
case 'list':
if ((read_config_option("global_auth") == "on") && (empty($current_user["show_list"]))) {
print "YOU DO NOT HAVE RIGHTS FOR LIST VIEW"; exit;
}
/* graph permissions */
if (read_config_option("global_auth") == "on") {
/* get policy information for the sql where clause */
$sql_where = get_graph_permissions_sql($current_user["policy_graphs"], $current_user["policy_hosts"], $current_user["policy_graph_templates"]);
$graphs = db_fetch_assoc("select
graph_templates_graph.local_graph_id,
graph_templates_graph.title_cache,
graph_templates_graph.height,
graph_templates_graph.width
from graph_templates_graph,graph_local
left join host on host.id=graph_local.host_id
left join graph_templates on graph_templates.id=graph_local.graph_template_id
left join user_auth_perms on ((graph_templates_graph.local_graph_id=user_auth_perms.item_id and user_auth_perms.type=1 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ") OR (host.id=user_auth_perms.item_id and user_auth_perms.type=3 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . ") OR (graph_templates.id=user_auth_perms.item_id and user_auth_perms.type=4 and user_auth_perms.user_id=" . $_SESSION["sess_user_id"] . "))
where graph_templates_graph.local_graph_id=graph_local.id
and graph_templates_graph.local_graph_id>0
" . (empty($sql_where) ? "" : "and $sql_where") . "
group by graph_templates_graph.local_graph_id
order by graph_templates_graph.title_cache");
}else{
$graphs = db_fetch_assoc("select
local_graph_id,title_cache,height,width
from graph_templates_graph
where local_graph_id > 0
order by title_cache");
}
print "\n";
break;
}
//print "";print $_SESSION["sess_debug_buffer"];print "
";session_unregister("sess_debug_buffer");
include_once("./include/bottom_footer.php");