"Notifications Disabled Report"), true);
echo "
Disabled Hosts
";
echo report_notifications_disabled_get_host_table($hosts);
echo "
";
echo "Disabled Services
";
echo report_notifications_disabled_get_service_table($services);
}
function report_notifications_disabled_get_host_table($data)
{
$header_row = "";
$header_row .= "| Host | ";
$header_row .= "User | ";
$header_row .= "When | ";
$header_row .= "
";
return "" . $header_row . report_notifications_disabled_get_rows($data) . "
";
}
function report_notifications_disabled_get_service_table($data)
{
$header_row = "";
$header_row .= "| Host | ";
$header_row .= "Service | ";
$header_row .= "User | ";
$header_row .= "When | ";
$header_row .= "
";
return "" . $header_row . report_notifications_disabled_get_rows($data) . "
";
}
function report_notifications_disabled_get_rows($data)
{
$rows = "";
foreach ($data as $row_data) {
$rows .= report_notifications_disabled_get_row($row_data);
}
return $rows;
}
function report_notifications_disabled_get_row($row_data)
{
$row = "";
$row .= "| " . $row_data["host_name"] . " | ";
if (!empty($row_data["service_description"])) {
$row .= "" . $row_data["service_description"] . " | ";
}
$row .= "" . $row_data["user"] . " | ";
$row .= "" . $row_data["when"] . " | ";
return $row;
}