mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2013-05-21 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php, include/functions.php: improved the source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8180 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
ac4d5799d8
commit
3ed70944e4
@ -1,3 +1,8 @@
|
||||
2013-05-21 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_reporting.php, include/functions.php: improved
|
||||
the source code style.
|
||||
|
||||
2013-05-21 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_modules.php: fixed false error when update the
|
||||
|
@ -498,7 +498,8 @@ function human_time_description_raw ($seconds, $exactly = false, $units = 'large
|
||||
$returnTime .= "$mins $minutesString ";
|
||||
}
|
||||
else {
|
||||
$returnTime = sprintf("%02d",$hours).':'.sprintf("%02d",$mins);
|
||||
$returnTime = sprintf("%02d",$hours) . ':' .
|
||||
sprintf("%02d",$mins);
|
||||
}
|
||||
}
|
||||
|
||||
@ -507,7 +508,9 @@ function human_time_description_raw ($seconds, $exactly = false, $units = 'large
|
||||
$returnTime .= "$seconds $secondsString ";
|
||||
}
|
||||
else {
|
||||
$returnTime = sprintf("%02d",$hours).':'.sprintf("%02d",$mins).':'.sprintf("%02d",$seconds);
|
||||
$returnTime = sprintf("%02d",$hours) . ':' .
|
||||
sprintf("%02d",$mins) . ':' .
|
||||
sprintf("%02d",$seconds);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5626,10 +5626,6 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||
$nmodules = 0;
|
||||
foreach ($modules_by_name as $module) {
|
||||
$nmodules++;
|
||||
// Don't use pagination
|
||||
/*if($nmodules > $block) { //Will show only the (block) first modules
|
||||
continue;
|
||||
}*/
|
||||
|
||||
$file_name = string2image(ui_print_truncate_text($module['name'], 'module_small', false, true, false, '...'), false, false, 6, 270, '#90B165', 'FFF', 4, 0);
|
||||
$table_data .= '<th width="22px">' . html_print_image($file_name, true, array('title' => $module['name']))."</th>";
|
||||
@ -5936,8 +5932,11 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||
modules_get_status($id_agent_module, $module_status['estado'], $module_status['datos'], $status, $title);
|
||||
$data[9] = ui_print_status_image($status, $title, true);
|
||||
|
||||
$sql_tag = "SELECT name FROM ttag WHERE id_tag IN (
|
||||
SELECT id_tag FROM ttag_module
|
||||
$sql_tag = "SELECT name
|
||||
FROM ttag
|
||||
WHERE id_tag IN (
|
||||
SELECT id_tag
|
||||
FROM ttag_module
|
||||
WHERE id_agente_modulo = $id_agent_module)";
|
||||
$tags = db_get_all_rows_sql($sql_tag);
|
||||
if ($tags === false)
|
||||
@ -6088,8 +6087,11 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||
modules_get_status($id_agent_module, $module_status['estado'], $module_status['datos'], $status, $title);
|
||||
$data[9] = ui_print_status_image($status, $title, true);
|
||||
|
||||
$sql_tag = "SELECT name FROM ttag WHERE id_tag IN (
|
||||
SELECT id_tag FROM ttag_module
|
||||
$sql_tag = "SELECT name
|
||||
FROM ttag
|
||||
WHERE id_tag IN (
|
||||
SELECT id_tag
|
||||
FROM ttag_module
|
||||
WHERE id_agente_modulo = $id_agent_module)";
|
||||
$tags = db_get_all_rows_sql($sql_tag);
|
||||
if ($tags === false)
|
||||
@ -6126,7 +6128,9 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||
$start_date = $end_date - $period;
|
||||
|
||||
// Get item filters
|
||||
$filter = db_get_row_sql("SELECT * FROM tnetflow_filter WHERE id_sg = '" . (int)$content['text'] . "'", false, true);
|
||||
$filter = db_get_row_sql("SELECT *
|
||||
FROM tnetflow_filter
|
||||
WHERE id_sg = '" . (int)$content['text'] . "'", false, true);
|
||||
if ($description == '') {
|
||||
$description = $filter['id_name'];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user