From a770d51c73f4a4f66f40bd30947bbe224177ab0a Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 30 Jun 2016 08:46:52 +0200 Subject: [PATCH] Added pagination in custom graphics. Ticket #3886. (cherry picked from commit 00b17f5eda429bd8f4fd2f1e12813c65cf2fbf41) --- pandora_console/godmode/reporting/graphs.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/reporting/graphs.php b/pandora_console/godmode/reporting/graphs.php index 001c6b2827..0ceeb9558c 100644 --- a/pandora_console/godmode/reporting/graphs.php +++ b/pandora_console/godmode/reporting/graphs.php @@ -135,6 +135,9 @@ if ($multiple_delete) { $graphs = custom_graphs_get_user ($config['id_user'], false, true, "RR"); +$offset = (int) get_parameter ("offset"); + +ui_pagination (count($graphs)); if (!empty ($graphs)) { $table = new stdClass(); @@ -159,8 +162,10 @@ if (!empty ($graphs)) { $table->size[4] = '90px'; } $table->data = array (); - - foreach ($graphs as $graph) { + + $result_graphs = array_slice($graphs, $offset, $config['block_size']); + + foreach ($result_graphs as $graph) { $data = array (); $data[0] = '"; html_print_input_hidden('multiple_delete', 1); html_print_table ($table); @@ -205,7 +210,7 @@ if (!empty ($graphs)) { echo ""; } echo ""; - + ui_pagination (count($graphs)); } else { require_once ($config['homedir'] . "/general/firts_task/custom_graphs.php");