diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 21ddd9d8d8..cfdf2ae2fd 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -497,6 +497,16 @@ $table_other->data[$row][0] = __('Default line thickness for the Visual Console' $table_other->data[$row][1] = html_print_input_text ('vc_line_thickness', $config["vc_line_thickness"], '', 5, 5, true); $row++; +// Enrique (27/01/2017) New feature: Show report info on top of reports +$table_other->data[$row][0] = __('Show report info with description') . + ui_print_help_tip( + __('Custom report description info. It will be applied to all reports and templates by default.'), true); +$table_other->data[$row][1] = html_print_checkbox('custom_report_info', 1, + $config['custom_report_info'], true); +$row++; + +//---------------------------------------------------------------------- + // Juanma (07/05/2014) New feature: Table for custom front page for reports $table_other->data[$row][0] = __('Custom report front page') . ui_print_help_tip( @@ -506,28 +516,6 @@ $table_other->data[$row][1] = html_print_checkbox('custom_report_front', 1, $row++; //---------------------------------------------------------------------- - - - - - - - - - - - - - - - - - - - - - - $dirItems = scandir($config['homedir'] . '/images/custom_logo'); foreach ($dirItems as $entryDir) { if (strstr($entryDir, '.jpg') !== false) { diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index e0c706cd46..2ff6704d53 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -608,7 +608,8 @@ function config_update_config () { $error_update[] = __('Delete interval'); //-------------------------------------------------- - + if (!config_update_value ('custom_report_info', get_parameter('custom_report_info'))) + $error_update[] = __('Custom report info'); // Juanma (06/05/2014) New feature: Custom front page for reports diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index c37d96045f..a8e0d98e4e 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -100,7 +100,40 @@ function reporting_html_header(&$table, $mini, $title, $subtitle, array_push ($table->data, $data); } -function reporting_html_print_report($report, $mini = false) { +function html_do_report_info($report) { + global $config; + + $date_today = date ($config["date_format"]); + + $html = '
' . __('Generated') . ': | ' . $date_today . ' | +|
' . __('Report date') . ': | '; + if (isset($report['period'])) { + $html .= '' . date($config["date_format"], ($report['datetime'] - $report['period'])); + } + else { + $html .= ' | ' . __('Items period before') . ' ' . date($config["date_format"], $report['datetime']) . ' | '; + } + $html .= '
' . __('Description') . ': | ' . io_safe_output($report['description']) . ' | +