$status = $ip_db->get_status(); switch ($status) { case "FREE": $color = "green"; break; case "RESERVED": $color = "blue"; break; case "ASSIGNED": $color = "red"; break; } if (isset($_GET['action'])) { if ($_GET['action'] == 'calc') { print "<span id='head' style='color:" . $color . ";'>" . $netblock->get_IP() . "</span><br / > "; print "<div class = 'box'>Subnet mask = <span id='sub'>" . $netblock->get_netmask() . "</span></div>"; print "<div class = 'box'>Wildcard = <span id='sub'>" . $netblock->get_wildcard() . "</span></div>"; print "<div class = 'box'>Network = <span id='sub'>" . $netblock->get_network() . "</span></div>"; print "<div class = 'box'>Broadcast = <span id='sub'>" . $netblock->get_broadcast() . "</span></div>"; print "<div class = 'box'>Hostmin = <span id='sub'>" . $netblock->get_hostmin() . "</span></div>"; print "<div class = 'box'>Hostmax = <span id='sub'>" . $netblock->get_hostmax() . "</span></div>"; print "<div class = 'box'>Host Per Net = <span id='sub'>" . $netblock->get_hostPerNet(); } else { if ($_GET['action'] == 'desc') { $name = "NO OWNER"; if ($ip_db->get_owner_name() != "") { $name = $ip_db->get_owner_name(); } $assigned = "NO ASSIGNED TO"; if ($ip_db->get_assigned_to_name() != "") { $assigned = $ip_db->get_assigned_to_name();