echo"<span class='text-danger'>".gettext("Connection Error")."</span><br/><span class='btn-link' onclick='checkupdate()'>".gettext("Click to retry")."</span>";
$json=file_get_contents($file_pkg_status);
}elseif($pkg_status["repository"]=="error"){
$pkg_status=json_decode($json,true);
echo"<span class='text-danger'>".gettext("Repository Problem")."</span><br/><span class='btn-link' onclick='checkupdate()'>".gettext("Click to retry")."</span>";
unlink($file_pkg_status);
}elseif($pkg_status["updates"]=="0"){
}
echo"<span class='text-info'>".gettext("Your system is up to date.")."</span><br/><span class='btn-link' onclick='checkupdate()'>Click to check for updates</span>";
if(isset($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")."</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")."</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 for updates</span>";
}else{
echo"<span class='text-danger'>".gettext("There are ").$pkg_status["updates"].gettext(" update(s) available.")."<br/><span class='text-info'><small>(When last checked at: ".$pkg_status["last_check"]." )</small></span>"."</span><br/><a href='/ui/core/firmware/'>".gettext("Click to upgrade")."</a> | <span class='btn-link' onclick='checkupdate()'>Re-check now</span>";
}
}else{
}else{
echo"<span class='btn-link' onclick='checkupdate()'>".gettext("Click to check for updates")."</span>";
echo"<span class='text-info'>".gettext("There are ").$pkg_status["updates"].gettext(" update(s) available.")."</span><br/><a href='/ui/core/firmware/'>".gettext("Click to upgrade")."</a> | <span class='btn-link' onclick='checkupdate()'>Re-check now</span>";