This is where you connect/disconnect ports, change properties, etc.
"; PRINT "\n"; $query_port = "SELECT * FROM networking_ports WHERE ID = $ID"; $sth_port = $adb->prepare($query_port); if($sth_port) { $res_port = $sth_port->execute(); $result_port = $sth_port->fetchrow_hash(); $ID = $result_port["ID"]; $name = $result_port["name"]; $logical_number = $result_port["logical_number"]; $iface = $result_port["iface"]; $device_on = $result_port["device_on"]; $device_type = $result_port["device_type"]; $ifaddr = $result_port["ifaddr"]; $ifmac = $result_port["ifmac"]; $virtual = $result_port["virtual"]; $wquery = "SELECT * FROM networking_wire WHERE (end1 = $ID OR end2 = $ID)"; $sth2 = $adb->prepare($wquery); if($sth2) { $res2 = $sth2->execute(); $numRows2 = $sth2->rows(); if ($numRows2 > 0) { $wresult = $sth2->fetchrow_hash(); $wID = $wresult["ID"]; $wend1 = $wresult["end1"]; $wend2 = $wresult["end2"]; if ($wend1 == $ID) { $pquery = "SELECT * FROM networking_ports WHERE (ID = $wend2)"; } else { $pquery = "SELECT * FROM networking_ports WHERE (ID = $wend1)"; } $psth = $adb->prepare($pquery); if($psth) { echo "\n"; $res = $psth->execute(); $presult = $psth->fetchrow_hash(); $pID = $presult["ID"]; $pNum = $presult["logical_number"]; $pOn = $presult["device_on"]; $pType = $presult["device_type"]; } else { PRINT "Could not prepare query: ".$psth->errstr."
\n"; } if ($pType == 1) { $nquery = "SELECT ID,name FROM computers WHERE (ID = $pOn)"; } else if ($pType == 2) { $nquery = "SELECT ID,name FROM networking WHERE (ID = $pOn)"; } $nsth = $adb->prepare($nquery); if($nsth) { $nres = $nsth->execute(); $nresult = $nsth->fetchrow_hash(); $nname = $nresult["name"]; $nID = $nresult["ID"]; $found = 1; } else { PRINT "Could not prepare query: ".$nsth->errstr."
\n"; } } } else { PRINT "Could not prepare query: ".$sth2->errstr."
\n"; } include("port.inc"); if ($virtual!=1) { PRINT ""; } PRINT ""; PRINT "
Connection"; if ($pType == 1) { PRINT "Port $pNum on computer $nname | Disconnect."; } else if ($pType == 2) { PRINT "Port $pNum on network device $nname | Disconnect."; } else if ($found != 1) { PRINT "Nothing Connected. Connect"; } PRINT "
"; } else { PRINT "Could not prepare query: ".$sth_port->errstr."
\n"; } ?>
 Proxy settings