function uptime() { $(function() {'; $id = 0; $sTable =' Status Name Host Type Location Uptime Load RAM HDD '; foreach($servers as $result) { if(isset($result['break'])) { $sTable .= '' . $result['name'] . ''; } else { $sJavascript .= '$.getJSON("pull/index.php?url='.$id.'",function(result){ $("#online'.$id.'").html(result.online); $("#uptime'.$id.'").html(result.uptime); $("#load'.$id.'").html(result.load); $("#memory'.$id.'").html(result.memory); $("#hdd'.$id.'").html(result.hdd); });'; $sTable .= '
Down
'.$result["name"].' '.$result["host"].' '.$result["type"].' '.$result["location"].' n/a n/a
n/a
n/a
'; } $id++; } $sTable .= ''; $sJavascript .= '}); } uptime(); setInterval(uptime, '.$refresh.'); '; include($index); ?>