global $thold, $thold_hosts, $config, $muted_hosts;
if (array_key_exists("name",$host)) {return;}
if ($host['id'] <= 0) {return;}
$icolors = array('red.gif', 'red.gif', 'blue.gif', 'green.gif', 'orange.gif', 'muted.gif');
$icolorsdisplay = array('Unknown', '<font color=red><b>Down</b></font>', 'Recovering', 'Up', 'Threshold Breached', '<font color=red><b>Down</b></font> (Muted)');
$row = $host;
// Loop through each host one by one
$id = $host['id'];
$anchor = $config['url_path'] . "graph_view.php?action=preview&host_id=" . $row['id'];
$name = $row['description'];
$name = iconv("UTF-8", "GB2312//IGNORE", $name);
$status = $row['status'];
$hostname = $row['hostname'];
$ptime = round($row['cur_time'],2);
$d = $row['status_rec_date'];
if ($d == "0000-00-00 00:00:00") $d = "Never";
$avail = round($row['availability'],2);