$mangaID = http_request("Manga", "i", 0); $idperro = http_request("Perro", "i", 0); $mode = http_request("Mode", "i", 0); if ($operation === null) { throw new Exception("Call to resultadosFunction without 'Operation' requested"); } if ($mangaID == 0) { throw new Exception("Call to resultadosFunction without 'Manga' provided"); } $resultados = new Resultados("resultadosFunctions", $pruebaID, $mangaID); $am = new AuthManager("resultadosFunctions"); switch ($operation) { // no insert as done by mean of procesa_inscripcion case "update": $am->access(PERMS_ASSISTANT); $result = $resultados->update($idperro); break; case "delete": $am->access(PERMS_OPERATOR); $result = $resultados->delete($idperro); break; case "select": $result = $resultados->select($idperro); break; case "reset": $am->access(PERMS_OPERATOR); $result = $resultados->reset(); break; case "getPendientes": $result = $resultados->getPendientes($mode); break;