$regreso = 1; include 'formacapturarmeds.html.php'; exit; } //cierre de if($_POST['accion'] == 'volvercoms') if (isset($_POST['regreso']) and $_POST['regreso'] === '2') { formularioParametros('nom002', $_POST['id'], intval($_POST['cantidad']), $_POST['idparametro'], json_decode($_POST['valores'], TRUE), json_decode($_POST['parametros'], TRUE), json_decode($_POST['adicionales'], TRUE), 1); } formularioParametros('nom002', $_POST['id'], $cantidad, "", "", "", "", 1); } else { //cierre de if($cantidad === 1) if (isset($_POST['regreso']) and $_POST['regreso'] === '2') { $mcompuestas = json_decode($_POST['mcompuestas'], TRUE); formularioMediciones('nom002', $id, $cantidad, $mcompuestas, 1); } else { formularioMediciones('nom002', $id, $cantidad, "", 1); } } exit; //formularioMediciones($_POST['id'], $_POST['cantidad'], ''); } /**************************************************************************************************/ /* Acción default */ /**************************************************************************************************/ $id = $_SESSION['parametros']['id']; $muestreoid = $_SESSION['parametros']['muestreoid']; $cantidad = $_SESSION['parametros']['cantidad']; $valores = $_SESSION['parametros']['valores']; $metodos = $_SESSION['parametros']['metodos']; $parametros = $_SESSION['parametros']['parametros']; $adicionales = $_SESSION['parametros']['adicionales'];
formularioMediciones('nom003', $id, $_POST['muestreoid'], $cantidad, $mcompuestas, 1); } else { try { $sql = 'SELECT muestreosaguatbl.id as "muestreoid" FROM muestreosaguatbl WHERE generalaguaidfk = :id'; $s = $pdo->prepare($sql); $s->bindValue(':id', $_POST['id']); $s->execute(); $linea = $s->fetch(); } catch (PDOException $e) { $mensaje = 'Hubo un error extrayendo la información de reconocimiento inicial.'; include $_SERVER['DOCUMENT_ROOT'] . '/reportes/includes/error.html.php'; exit; } formularioMediciones('nom003', $id, $linea["muestreoid"], $cantidad, "", 1); } } /* Else cantidad != 1 */ exit; } /**************************************************************************************************/ /* Formulario de parametros de una medicion una orden de trabajo */ /**************************************************************************************************/ if (isset($_POST['accion']) and $_POST['accion'] == 'parametros') { fijarAccionUrl('parametros'); if (isset($_POST['regreso']) and $_POST['regreso'] === '2') { formularioParametros('nom003', $_POST['id'], $_POST['muestreoid'], $_POST['cantidad'], $_POST['idparametro'], json_decode($_POST['valores'], TRUE), json_decode($_POST['parametros'], TRUE), json_decode($_POST['adicionales'], TRUE), $_POST['regreso'], $_POST['accionparam']); } else { $cantidad = 1; if ($_POST['tipomedicion'] === '4') {