<?PHP
$file = $_config['server_feed'] . 'serverstats.php?callback=serverstat&type=xml';
$data = file_get_contents($_rootdir.'backend.php?'.$file);
$feed = simplexml_load_string($data);
?>
<style>
#stats {
margin: 2px;
background-color:#000;
padding-left: 15px;
}
#stats label {
float: left;
width: 70px;
color: rgb(152, 207, 154);
}
.label2 {
padding-left: 15px;
float: left;
color: rgb(152, 207, 154);
}
</style>
<div id="servstats" align="left">
<?PHP
$c = 1;
$i = 1;
foreach ($feed->children() as $x => $s) {
if ($x == 'service') {
echo '<table width="100%">';
foreach ($s as $s1 => $s2) {
if ($s2->user == 0) {
echo '<tr style="background-color:#000;">
<td width="130" height="20" style="background-color:#000;"><div class="label2">'. $s2->desc. '</div></td>
<td width="39" align="left" height="20"><small>Wait</small></td>
</tr>';
} else {
echo '<tr style="background-color:#000;">
<td width="100" height="20" ><div class="label2">'. $s2->desc. '</div></td>
<td width="39" align="left" height="20">
<div style="position: relative; top: 4px; left: 0pt; width: 39px; background-image: url(includes/empty.jpg);"><img src="includes/spacer.gif" height="8"></div>
<div style="position: relative; top: -4px; left: 0pt; width: '.$s2->user.'%; background-image: url(includes/full.jpg); background-repeat: no-repeat;"><img src="includes/spacer.gif" height="8"></div>
</td>
</tr>';
}
}
echo '</table>';
} else {
foreach ($s as $s1 => $s2) {
echo '<div id="stats"><label>'. $s1. '</label> : <b>'.$s2.'</b></div>';
}
}
}
?>
</div>