Exemplo n.º 1
0
         $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();
             }
             $location = "NO LOCATION";
             if ($ip_db->get_location_name() != "") {
                 $location = $ip_db->get_location_name();
             }
             print "<span id='head' style='color:" . $color . ";'>" . $netblock->get_IP() . "</span> - " . $ip_db->get_title() . "<br / > ";