<?PHP include("./../".$SYSD."/check-devicedata.inc.php");

//$devicedatachecktimeT='1513112998';	// **************************TEST
//$devicedatachecktimeT='';		// **************************TEST
//$devicecheckFalse='0';			// **************************TEST

$devicecheckAll=$devicedataR0 - $devicecheckFalse;

if($devicedatachecktimeT == ""){
$devicedataF=1;
$devicedataR1="check-devicedata-index.php";
$devicedataR2=$sData03;
$devicedataR3="";
$devicedataR7=100;
$devicedataR8=$resultInfo02;
$devicedataR9="badgeF";

}else{

if($devicecheckFalse > 0){
$devicedataF=1;
$devicedataR1="check-devicedata-index.php";
$devicedataR2=$sData03;
$devicedataR3="<br><div class='font13 txt-grey3'><i class='fa fa-clock-o'></i> ".$devicedatachecktimeD."</div>";
$devicedataR7=$devicecheckAll / $devicedataR0 * 100;
$devicedataR7=number_format($devicedataR7, 2, '.', '.');
$devicedataR8=$devicecheckAll." / ".$devicedataR0;
//$devicedataR8="100%";
$devicedataR9="badgeF";
}else{
$devicedataF=0;
$devicedataR1="check-devicedata-index.php";
$devicedataR2=$sData03;
$devicedataR3="<br><div class='font13 txt-grey3'><i class='fa fa-clock-o'></i> ".$devicedatachecktimeD."</div>";
$devicedataR7=100 - ($devicecheckFalse / $devicedataR0 * 100);
$devicedataR7=number_format($devicedataR7, 0, '.', '.');
$devicedataR8=$devicedataR7."%";
//$devicedataR8=$devicecheckAll." / ".$devicedataR0;
$devicedataR9="badgeT";
}
}

if($devicedatachecktimeT == ""){
$devicedataR5=1;
$devicedataW=0;
}else{
$devicedataR4=$devicedatachecktimeT + $timePx;
if($devicedataR4 > $timestamp){$devicedataR5=1;$devicedataW=0;}else{$devicedataR5=0;$devicedataW=1;}
}

if($devicedataR5 == "0"){
$devicedataR6="<div class='badge badgeD'>".$resultOld."</div>";
}else{
$devicedataR6="";
}

echo "
<tr class='pointer menu-out2' onclick=\"window.location.href='$devicedataR1';\">
<td class='txtVM'>".$devicedataR2.": ".$devicedataR3." ".$devicedataR6."</td>
<td class='txtVM'>
<div class='progress pg-dash'>
<span class='progress-bar $devicedataR9 pg-animate' style='width:".$devicedataR7."%'>
<span class='pg-text'>".$devicedataR8."</span>
</span>
</div>
</td>
<td class='txtVM txtC blendBadge'><span class='badge $devicedataR9 margin-t3-'>".$devicedataR7."%</span></td>
</tr>
";
?>
