include("../include/irm.inc"); AuthCheck("5"); if("$entry"=="new") { if(!$logical_number) { $logical_number=1; } if ($virtual == "yes") { $virtual = 1; $logical_number=0; $iface="";} else { $virtual = 0; } $ifmac=ereg_replace('[- ]',':', $ifmac); $query = "INSERT INTO networking_ports VALUES (NULL, $device, $device_type, '$iface', '$ifaddr', '$ifmac', '$logical_number', '$name', '$virtual', 0)"; $count = $adb->dbh_do($query); logevent($device, "networking", 4, "port", "Port added by $IRMName"); if ($device_type == 1) { header("Location: $USERPREFIX/servers/info.php?ID=$device"); } else { header("Location: $USERPREFIX/networking/info.php?ID=$device"); } } commonHeader("IRM Networking - Add Port"); PRINT "Fill out this simple form to add a port to the device