2010-08-31 09:27:22 +02:00
|
|
|
<?php
|
|
|
|
|
2023-06-08 13:19:01 +02:00
|
|
|
// Pandora FMS - https://pandorafms.com
|
2010-08-31 09:27:22 +02:00
|
|
|
// ==================================================
|
2023-06-08 11:53:13 +02:00
|
|
|
// Copyright (c) 2005-2023 Pandora FMS
|
2023-06-08 13:19:01 +02:00
|
|
|
// Please see https://pandorafms.com/community/ for full contribution list
|
2010-08-31 09:27:22 +02:00
|
|
|
// This program is free software; you can redistribute it and/or
|
2011-03-23 Raul Mateos <raulofpandora@gmail.com>
* extensions/ssh_console.php, extensions/vnc_view.php,
extensions/update_manager.php, extensions/users_connected.php,
extensions/extension_uploader.php, extensions/insert_data.php,
extensions/module_groups.php, extensions/plugin_registration.php,
extensions/agent_modules.php, extensions/resource_registration.php,
extensions/resource_exportation.php, extensions/dbmanager.php,
extensions/pandora_logs.php, general/*.php, ajax.php,
operation/search_*.php, operation/menu.php, operation/extensions.php,
godmode/menu.php, godmode/extensions.php, godmode/admin_access_logs.php:
CReverted unwanted license changes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4126 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-23 17:13:28 +01:00
|
|
|
// modify it under the terms of the GNU General Public License
|
2011-03-17 Raul Mateos <raulofpandora@gmail.com>
* extensions/dbmanager.php, extensions/pandora_logs.php, general/*.php,
index.php, ajax.php, operation/search_*.php, operation/menu.php,
operation/extensions.php, godmode/menu.php, godmode/extensions.php,
admin_access_logs.php: Cleaned code and updated page disclaimers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4108 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-17 23:01:01 +01:00
|
|
|
// as published by the Free Software Foundation; version 2
|
2010-08-31 09:27:22 +02:00
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2011-03-17 Raul Mateos <raulofpandora@gmail.com>
* extensions/dbmanager.php, extensions/pandora_logs.php, general/*.php,
index.php, ajax.php, operation/search_*.php, operation/menu.php,
operation/extensions.php, godmode/menu.php, godmode/extensions.php,
admin_access_logs.php: Cleaned code and updated page disclaimers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4108 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-17 23:01:01 +01:00
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2010-08-31 09:27:22 +02:00
|
|
|
// GNU General Public License for more details.
|
|
|
|
global $config;
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
require_once 'include/functions_reports.php';
|
2010-08-31 09:27:22 +02:00
|
|
|
|
2021-04-21 09:41:25 +02:00
|
|
|
|
2010-08-31 09:27:22 +02:00
|
|
|
$linkReport = false;
|
2019-01-30 16:18:44 +01:00
|
|
|
$searchReports = check_acl($config['id_user'], 0, 'RR');
|
2010-08-31 09:27:22 +02:00
|
|
|
|
2021-05-13 13:33:45 +02:00
|
|
|
$linkReport = true;
|
2010-08-31 09:27:22 +02:00
|
|
|
|
2013-04-10 09:57:54 +02:00
|
|
|
if ($reports === false || !$searchReports) {
|
2019-01-30 16:18:44 +01:00
|
|
|
echo "<br><div class='nf'>".__('Zero results found')."</div>\n";
|
|
|
|
} else {
|
2022-02-07 13:48:25 +01:00
|
|
|
$table = new stdClass();
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->cellpadding = 4;
|
|
|
|
$table->cellspacing = 4;
|
|
|
|
$table->width = '98%';
|
|
|
|
$table->class = 'databox';
|
|
|
|
|
2021-04-21 09:41:25 +02:00
|
|
|
$table->head = [];
|
|
|
|
$table->align = [];
|
|
|
|
$table->headstyle = [];
|
|
|
|
$table->style = [];
|
|
|
|
|
|
|
|
$table->align[2] = 'left';
|
|
|
|
$table->align[3] = 'left';
|
|
|
|
$table->align[4] = 'left';
|
|
|
|
$table->data = [];
|
|
|
|
$table->head[0] = __('Report name');
|
|
|
|
$table->head[1] = __('Description');
|
|
|
|
$table->head[2] = __('HTML');
|
|
|
|
$table->head[3] = __('XML');
|
|
|
|
$table->size[0] = '50%';
|
|
|
|
$table->size[1] = '20%';
|
2022-01-19 11:36:54 +01:00
|
|
|
$table->headstyle[0] = 'text-align: left';
|
|
|
|
$table->headstyle[1] = 'text-align: left';
|
2021-04-21 09:41:25 +02:00
|
|
|
$table->size[2] = '2%';
|
|
|
|
$table->headstyle[2] = 'min-width: 35px;text-align: left;';
|
|
|
|
$table->size[3] = '2%';
|
|
|
|
$table->headstyle[3] = 'min-width: 35px;text-align: left;';
|
|
|
|
$table->size[4] = '2%';
|
|
|
|
$table->headstyle[4] = 'min-width: 35px;text-align: left;';
|
|
|
|
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->head = [];
|
|
|
|
$table->head[0] = __('Report name');
|
|
|
|
$table->head[1] = __('Description');
|
|
|
|
$table->head[2] = __('HTML');
|
|
|
|
$table->head[3] = __('XML');
|
2019-06-03 10:46:52 +02:00
|
|
|
enterprise_hook('load_custom_reporting_1', [$table]);
|
2019-01-30 16:18:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
$table->data = [];
|
|
|
|
foreach ($reports as $report) {
|
|
|
|
if ($linkReport) {
|
|
|
|
$reportstring = "<a href='?sec=reporting&sec2=godmode/reporting/reporting_builder&action=edit&id_report=".$report['id_report']."' title='".__('Edit')."'>".$report['name'].'</a>';
|
|
|
|
} else {
|
|
|
|
$reportstring = $report['name'];
|
|
|
|
}
|
|
|
|
|
|
|
|
$data = [
|
|
|
|
$reportstring,
|
|
|
|
$report['description'],
|
|
|
|
'<a href="index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id='.$report['id_report'].'">'.html_print_image('images/reporting.png', true).'</a>',
|
2021-04-21 09:41:25 +02:00
|
|
|
'<a href="ajax.php?page=operation/reporting/reporting_xml&id='.$report['id_report'].'">'.html_print_image('images/xml.png', true).'</a>',
|
2019-01-30 16:18:44 +01:00
|
|
|
];
|
|
|
|
enterprise_hook('load_custom_reporting_2');
|
|
|
|
|
|
|
|
array_push($table->data, $data);
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '<br />';
|
|
|
|
ui_pagination($totalReports);
|
|
|
|
html_print_table($table);
|
|
|
|
unset($table);
|
|
|
|
ui_pagination($totalReports);
|
2010-08-31 09:27:22 +02:00
|
|
|
}
|