Location: PHPKode > projects > web-cp - Web Hosting Control Panel > webcp/web/reseller/serverstatus.phps
<? // Get system data
$monit = getstat('monitor');
$ram = getstat('ram');
$swap = getstat('swap');
$cpu = getstat('cpu');
$uptime = getstat('uptime');
?>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0" class="tblbg">
	<tr>
		<td>
		<table border="0" cellspacing="1">
			<tr>
				<td colspan="2" class="tbltop">&nbsp;<?=$T[$cp][$url];?>&nbsp;</td>
			</tr>
			<tr>
				<td class="row1"><b>&nbsp;<?=$T['Web Server'];?>&nbsp;</b></td>
				<td class="row2">&nbsp;
					<? 
						if ($T[$monit['httpd']] == $T['up'])
							echo "<img src=\"icon/up.gif\" border=\"0\" width=\"16\" height=\"16\" alt=\"".$T['up']."\">";
						else
							echo "<img src=\"icon/down.gif\" border=\"0\" width=\"16\" height=\"16\" alt=\"".$T['down']."\">";
					?>
					&nbsp;</td>
			</tr>
			<? if ($cfg['mailserver'] != 'none') { ?>
			<tr>
				<td class="row1"><b>&nbsp;<?=$T['Outgoing Mail Server'];?>&nbsp;</b></td>
				<td class="row2">&nbsp;
					<? 
						if ($T[$monit[$cfg['mailserver']]] == $T['up'])
							echo "<img src=\"icon/up.gif\" border=\"0\" width=\"16\" height=\"16\" alt=\"".$T['up']."\">";
						else
							echo "<img src=\"icon/down.gif\" border=\"0\" width=\"16\" height=\"16\" alt=\"".$T['down']."\">";
					?>
					&nbsp;</td>
			</tr>
			<tr>
				<td class="row1"><b>&nbsp;<?=$T['Incoming Mail Server'];?>&nbsp;</b></td>
				<td class="row2">&nbsp;
				<? 
					if ($T[$monit['pop3']] == $T['up'])
						echo "<img src=\"icon/up.gif\" border=\"0\" width=\"16\" height=\"16\" alt=\"".$T['up']."\">";
					else
						echo "<img src=\"icon/down.gif\" border=\"0\" width=\"16\" height=\"16\" alt=\"".$T['down']."\">";
				?>
				&nbsp;</td>
			</tr>
			<? } ?>
			<? if ($cfg['ftpserver'] != 'none') { ?>
			<tr>
				<td class="row1"><b>&nbsp;<?=$T['FTP Server'];?>&nbsp;</b></td>
				<td class="row2">&nbsp;
					<? 
						if ($T[$monit[$cfg['ftpserver']]] == $T['up'])
							echo "<img src=\"icon/up.gif\" border=\"0\" width=\"16\" height=\"16\" alt=\"".$T['up']."\">";
						else
							echo "<img src=\"icon/down.gif\" border=\"0\" width=\"16\" height=\"16\" alt=\"".$T['down']."\">";
					?>
				&nbsp;</td>
			</tr>
			<? } ?>
			<tr>
				<td class="row1"><b>&nbsp;<?=$T['Memory Usage'];?>&nbsp;</b></td>
				<td class="row2">&nbsp;<?=$ram['used']."/".$ram['total'];?> RAM, <?=$swap['used']."/".$swap['total'];?> Swap&nbsp;</td>
			</tr>
			<tr>
				<td class="row1"><b>&nbsp;<?=$T['Processor Usage'];?>&nbsp;</b></td>
				<td class="row2">&nbsp;<?=$cpu['cpu'];?>&nbsp;</td>
			</tr>
			<tr>
				<td class="row1"><b>&nbsp;<?=$T['Uptime'];?>&nbsp;</b></td>
				<td class="row2">&nbsp;<?=$cpu['uptime'];?>&nbsp;</td>
			</tr>
		</table>
		</td>
	</tr>
</table>
</div>

Return current item: web-cp - Web Hosting Control Panel