");
if(isset($_GET["select"]))
{
table_td($row["host"],"");
}
table_td($row["description"],"");
echo "";
if($row["status"] == 2)
{
echo "";
}
iif_echo(!isset($row["lastclock"]),
" - ",
date("d M H:i:s",$row["lastclock"]));
echo " | ";
if(isset($row["lastvalue"]))
{
iif_echo($row["value_type"] == 0,
"".convert_units($row["lastvalue"],$row["units"])." | ",
"".nbsp(htmlspecialchars(substr($row["lastvalue"],0,20)." ..."))." | ");
}
else
{
table_td("-","align=center");
}
if( isset($row["lastvalue"]) && isset($row["prevvalue"]) &&
($row["value_type"] == 0) && ($row["lastvalue"]-$row["prevvalue"] != 0) )
{
// echo ""; echo $row["lastvalue"]-$row["prevvalue"]; echo " | ";
// sprintf("%+0.2f"); does not work
if($row["lastvalue"]-$row["prevvalue"]<0)
{
$str=convert_units($row["lastvalue"]-$row["prevvalue"],$row["units"]);
$str=nbsp($str);
table_td($str,"");
}
else
{
$str="+".convert_units($row["lastvalue"]-$row["prevvalue"],$row["units"]);
$str=nbsp($str);
table_td($str,"");
// printf("+%0.2f | ",$row["lastvalue"]-$row["prevvalue"]);
}
}
else
{
echo "- | ";
}
iif_echo($row["value_type"]==0,
"".S_GRAPH." | ",
"".S_HISTORY." | ");
echo "
";
cr();
}
table_end();
show_table_header_end();
}
else
{
table_nodata();
}
?>