";
}
if($diff->format("%R%a") == "-0"){$LastGood = "NEVER";}else{$LastGood = $row['LastKnownGood']." (".$diff->format("%R%a")."J)";}
echo "| ".$row['Name']." | ";
echo "".$row['LastBackup']." ".$row['TimeStamp']." | ";
echo "".$row['LastResult']." | ";
echo "".$LastGood." | ";
echo "".$row['LastSize']." | ";
echo "".$row['Owner']." | ";
echo "".$row['Policy']." | ";
echo "
";
}
// Backup OK
$outdated = 0;
$answers = Invoke_infra("SELECT * FROM VMs_Backup where Owner like 'DUN-VMH%' and name not like 'WS%' and owner not like '%WKG%' and owner not like '%VMH-WM%' and Exclusion ='' and LastResult = 'OK' order by name");
foreach ($answers as $row) {
$date1 = date_create($row['LastKnownGood']); $diff = date_diff($date1, date_create(date("Y-m-d")));
if(date('w') >= 2 && date('w') <= 6 ){
if ($diff->format("%R%a") >= 2){
echo "