echo"Last check at (".$pkg_status["last_check"]."), you were up to date";
if($_REQUEST['getupdatestatus']){
if(file_exists($file_pkg_status)){
if($pkg_status["connection"]=="error"){
echo"<span class='text-danger'>".gettext("Connection Error")."</span><br/><span class='btn-link' onclick='checkupdate()'>".gettext("Click to retry now")."</span>";
}elseif($pkg_status["repository"]=="error"){
echo"<span class='text-danger'>".gettext("Repository Problem")."</span><br/><span class='btn-link' onclick='checkupdate()'>".gettext("Click to retry now")."</span>";
}elseif($pkg_status["updates"]=="0"){
echo"<span class='text-info'>".gettext("At")." <small>".$pkg_status["last_check"]."</small>".gettext(" no updates found.")."<br/><span class='btn-link' onclick='checkupdate()'>Click to check now</span>";
}else{
echo"<span class='text-danger'>A total of ".$pkg_status["updates"]." update(s) are available.</span>";
echo"<span class='text-danger'>".gettext("A total of ").$pkg_status["updates"].gettext(" update(s) are available.")."</span><br/><a href='/system_firmware.php'>".gettext("Click to update")."</a>";
}
}else{
echo"Unknown<span class='btn-link' onclick='checkupdate()'>Click to check now</span>";
echo"<span class='text-danger'>".gettext("Unknown")."</span><br/><span class='btn-link' onclick='checkupdate()'>".gettext("Click to check now")."</span>";