".__('Successfully deleted').""; else $result = "

".__('Not deleted. Error deleting data')."

"; $sql = "DELETE FROM tgraph WHERE id_graph = $id"; if ($res=mysql_query($sql)) $result = "

".__('Successfully deleted')."

"; else $result = "

".__('Not deleted. Error deleting data')."

"; echo $result; } else { audit_db ($config['id_user'],$REMOTE_ADDR, "ACL Violation","Trying to delete a graph from access graph builder"); include ("general/noaccess.php"); exit; } } if ($view_graph) { $sql="SELECT * FROM tgraph WHERE id_graph = $id"; $res=mysql_query($sql); if ($graph = mysql_fetch_array($res)){ $id_user = $graph["id_user"]; $private = $graph["private"]; $width = $graph["width"]; $height = $graph["height"]; $zoom = (int) get_parameter ('zoom', 0); if ($zoom > 0) { switch ($zoom) { case 1: $width = 500; $height = 210; break; case 2: $width = 650; $height = 310; break; case 3: $width = 770; $height = 400; break; } } $period = (int) get_parameter ('period'); if (! $period) $period = $graph["period"]; else $period = 3600 * $period; $events = $graph["events"]; $description = $graph["description"]; $stacked = (int) get_parameter ('stacked', -1); if ($stacked == -1) $stacked = $graph["stacked"]; $name = $graph["name"]; if (($graph["private"]==1) && ($graph["id_user"] != $id_user)){ audit_db($config['id_user'],$REMOTE_ADDR, "ACL Violation","Trying to access to a custom graph not allowed"); include ("general/noaccess.php"); exit; } echo "

".__('Reporting')." » "; echo __('Combined image render')."

"; echo ""; echo "
"; print_custom_graph ($id, $height, $width, $period, $stacked); echo "
"; $period_label = human_time_description ($period); echo "
"; echo ""; echo "
"; echo "".__('Period').""; echo ""; print_select (get_custom_graph_periods (), 'period', intval ($period / 3600), '', '', 0, false, false, false); echo ""; $stackeds = array (); $stackeds[0] = __('Graph defined'); $stackeds[0] = __('Area'); $stackeds[1] = __('Stacked area'); $stackeds[2] = __('Line'); $stackeds[3] = __('Stacked line'); print_select ($stackeds, 'stacked', $stacked , '', '', -1, false, false); echo ""; $zooms = array(); $zooms[0] = __('Graph defined'); $zooms[1] = __('Zoom x1'); $zooms[2] = __('Zoom x2'); $zooms[3] = __('Zoom x3'); print_select ($zooms, 'zoom', $zoom , '', '', 0); echo ""; echo ""; echo "
"; echo "
"; } } echo "

" . __('Reporting') . " » "; echo __('Custom graph viewer') . "

"; $graphs = get_user_custom_graphs (); if (! empty ($graphs)) { $table->width = '500px'; $tale->class = 'databox_frame'; $table->align = array (); $table->align[2] = 'center'; $table->head = array (); $table->head[0] = __('Graph name'); $table->head[1] = __('Description'); if (give_acl ($config['id_user'], 0, "AW")) $table->head[2] = __('Delete'); $table->data = array (); foreach ($graphs as $graph) { $data = array (); $data[0] = ''.$graph['name'].''; $data[1] = $graph["description"]; if (give_acl ($config['id_user'], 0, "AW")) { $data[2] = ''; } array_push ($table->data, $data); } print_table ($table); } else { echo "
".__('There are no defined reportings')."
"; } ?>