tieneAcceso()){ $return["error"] = "Error! No tienes permisos para realizar esta acción."; }else if(!isset($_POST["id"])){ $return["error"] = "Error! No se recibió la información del plan de estudios."; }else{ $id = filter_input(INPUT_POST, "id", FILTER_SANITIZE_NUMBER_INT);//limpia texto $stmt = $pdo->prepare('Select * from fs_planestudio(NULL, :id, NULL, NULL,NULL, NULL)'); $stmt->bindParam(":id", $id); if(!$stmt->execute()){ $return["error"] = "Ocurrió un error al leer los datos del plan de estudios."; }else{ $rs = $stmt->fetch(); $stmt->closeCursor(); $stmt = null; $return["id"] = $rs["PlanEstudio_id"]; $return["desc"] = $rs["PlanEstudio_desc"]; $return["clave"] = $rs["PlanEstudio_clave"]; $return["carrera"] = $rs["Carrera_id"]; $return["estado"] = $rs["PlanEstudio_activo"]; $return["min"] = $rs["PlanEstudio_minClase"]; $return["sem"] = $rs["PlanEstudio_semestres"]; $return["altas"] = $rs["PlanEstudio_altas"]; $return["nombre"] = $rs["PlanEstudio_nombre"]; } } $return["json"] = json_encode($return); echo json_encode($return); ?>