prepare($query); if($sth) { $res = $sth->execute(); $result = $sth->fetchrow_hash(); $back = $result["device_on"]; $back_t = $result["device_type"]; } else { PRINT "Could not prepare query: ".$sth->errstr."
\n"; } $query = "DELETE FROM networking_ports WHERE (ID = $ID)"; $result = $adb->dbh_do($query); $query = "DELETE FROM networking_wire WHERE (end1 = $ID OR end2 = $ID)"; $result = $adb->dbh_do($query); $query = "DELETE FROM ports_monitor WHERE (port_id = $ID)"; $result = $adb->dbh_do($query); logevent($back, "networking", 4, "port", "Port $ID removed by $IRMName"); if ($back_t == 1) { header("Location: $USERPREFIX/servers/info.php?ID=$back"); } else { header("Location: $USERPREFIX/networking/info.php?ID=$back"); } ?>