Exemple #1
0
    $devices = new Device($_GET['ID']);
    $id = $devices->get_device_id();
    //if this is a port we're editting get that ID instead
    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 {
Exemple #2
0
     my_profile($mysqli);
     break;
 case "my_profile_update":
     $email = $_POST['email'];
     $FIO = $_POST['FIO'];
     $password = $_POST['password'];
     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);