Added pagination in custom graphics. Ticket .

(cherry picked from commit 00b17f5eda)
This commit is contained in:
Daniel Maya 2016-06-30 08:46:52 +02:00
parent 6ee0cf2320
commit a770d51c73
1 changed files with 11 additions and 6 deletions
pandora_console/godmode/reporting

View File

@ -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();
@ -160,7 +163,9 @@ if (!empty ($graphs)) {
}
$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] = '<a href="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id='.
@ -187,7 +192,7 @@ if (!empty ($graphs)) {
}
if (!empty($graphs)){
if (!empty($result_graphs)){
echo "<form method='post' style='' action='index.php?sec=reporting&sec2=godmode/reporting/graphs'>";
html_print_input_hidden('multiple_delete', 1);
html_print_table ($table);
@ -205,7 +210,7 @@ if (!empty ($graphs)) {
echo "</form>";
}
echo "</div>";
ui_pagination (count($graphs));
}
else {
require_once ($config['homedir'] . "/general/firts_task/custom_graphs.php");