';
if (isset($stats['policies'])) {
$summary .= count($stats['policies']) . " x " .
html_print_image($hack_metaconsole . 'images/policies.png',true) . ' '.
__('Policies') . "
";
}
if (isset($stats['groups'])) {
// TODO: GET STATUS OF THE GROUPS AND ADD IT TO SUMMARY
$summary .= count($stats['groups']) . " x " .
html_print_image($hack_metaconsole . 'images/group.png',true) . ' ' .
__('Groups') . "
";
}
if (isset($stats['agents'])) {
if ($metaconsole) {
include_once ('include/functions_reporting.php');
$servers = db_get_all_rows_sql ("SELECT *
FROM tmetaconsole_setup");
if ($servers === false)
$servers = array();
$total_agents = 0;
foreach ($servers as $server) {
// If connection was good then retrieve all data server
if (metaconsole_load_external_db ($server)) {
$connection = true;
}
else {
$connection = false;
}
if ($connection)
$data = reporting_get_group_stats();
metaconsole_restore_db();
$total_agents += $data["total_agents"];
}
$total_agents = format_numeric($total_agents);
$summary .= $total_agents .
" x " . html_print_image($hack_metaconsole . 'images/bricks.png',true) .
' ' . __('Agents') . "
";
}
else {
$summary .= count($stats['agents']) .
" x " . html_print_image($hack_metaconsole . 'images/bricks.png',true) .
' ' . __('Agents') . "
";
}
}
if (isset($stats['modules'])) {
// TODO: GET STATUS OF THE MODULES AND ADD IT TO SUMMARY
$summary .= count($stats['modules'])." x ".html_print_image('images/brick.png',true).' '.__('Modules')."
";
}
echo '