if (isset($_POST['updateInfo']) && $_SESSION['access'] >= 50) { $layer = $services->get_service_layer(); if ($layer == 2) { $services = new Layer2_service($_GET['ID']); } else { $services = new Layer3_service($_GET['ID']); } updateService($services); } else { if (isset($_POST['updateModal']) && $_SESSION['access'] >= 50) { $services = new Layer2_service_port($_POST['interfaceID']); updateModal($services); } else { if (isset($_POST['addPort']) && $_SESSION['access'] >= 50) { $servicePort = new Layer2_service_port(); addPort($servicePort, $services); } else { displayService($services); } } } } else { if ($_GET['action'] == editServiceType && $_SESSION['access'] >= 50 || $_GET['action'] == showServiceType) { //get the new service type corresponding to the ID $serviceType = new ServiceType($_GET['ID']); if (isset($_POST['updateInfo'])) { updateServiceType($serviceType); } else { displayServiceType($serviceType); } } else {
if (isset($_POST['portID'])) { $ports = new ControlPort($_POST['portID']); } //checks to see if this is a valid ID or not if ($devices->get_device_id() == "") { $deviceForm->error("Warning: Failed to load. Reason: " . $devices->get_error(), $_GET['ID']); } //if this is an update then update the device or port if (isset($_POST['updateInfo']) && $_SESSION['access'] >= 50) { updateDevice($devices); } else { if (isset($_POST['updatePort'])) { updatePort($ports, $id); } else { if (isset($_POST['addPort']) && $_SESSION['access'] >= 50) { addPort($id); } else { displayDevice($devices); } } } } else { if ($_GET['action'] == "list_device_types") { displayDeviceTypes(); } else { if ($_GET['action'] == "show_device_type") { DisplayDeviceType(); } else { if ($_GET['action'] == "edit_device_type") { EditDeviceType(); } else {
my_profile_update($mysqli, $email, $FIO, $password); break; case "port_allShow": port_allShow($mysqli); break; case "deletePort": deletePort($mysqli); break; case "updatePort": updatePort($mysqli); break; case "updatePortModal": updatePortModal($mysqli); break; case "addPort": addPort($mysqli); break; case "vesselType_allShow": vesselType_allShow($mysqli); break; case "updateTypeVessel": updateTypeVessel($mysqli); break; case "updateTypeVesselModal": updateTypeVesselModal($mysqli); break; case "deleteTypeVessel": deleteTypeVessel($mysqli); break; case "addTypeVessel": addTypeVessel($mysqli);