if ($_REQUEST["format"] == "SetSystems") { echo json_encode($hydro->SetSystems($_REQUEST["hydro"], $_REQUEST["pump_1"], $_REQUEST["pump_2"], $_REQUEST["cam"])); } else { if ($_REQUEST["format"] == "SetSettings") { echo json_encode($hydro->SetSettings($_REQUEST["start"], $_REQUEST["end"], $_REQUEST["water_full"], $_REQUEST["water_empty"], $_REQUEST["water_high"], $_REQUEST["water_low"], $_REQUEST["air_high"], $_REQUEST["air_low"])); //Delete } else { if ($_REQUEST["format"] == "DeleteUser") { echo json_encode($hydro->DeleteUser($_REQUEST["id"])); //Get Data } else { if ($_REQUEST["format"] == "GetPumps") { echo json_encode($hydro->GetPumps()); } else { if ($_REQUEST["format"] == "GetCameraIP") { echo json_encode($hydro->GetCameraIP()); } else { if ($_REQUEST["format"] == "GetSystemInfo") { echo json_encode($hydro->GetSystemInfo()); } else { if ($_REQUEST["format"] == "GetSettings") { echo json_encode($hydro->GetSettings()); } } } } } } } } }