Location: PHPKode > scripts > php ireport > phpireport v1.0 alpha revision 25/phpireport/networks.php
<?
$page_title = "Networks";

$page_content = $page_content ."
				<table>
					<tr>
						<th>network</th>
						<th>state</th>
					</tr>";
$all_networks = get_all_networks();

//print_r($all_networks);

for ($i = 0; $i <= count($all_networks)-1; $i++) {

if($all_networks[$i]['state']=='online'){$state='<font color="green">ONLINE</font>';}else{$state='<font color="red">OFFLINE</font>';}

    $page_content = $page_content ."
					<tr>
						<td>".strtoupper($all_networks[$i]['name'])."</td>
						<td>".$state."</td>
					</tr>";
}					
	
$page_content = $page_content ."
				</table>  
	";
?>
Return current item: php ireport