diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..7a84916 --- /dev/null +++ b/.htaccess @@ -0,0 +1,30 @@ +# Huésped Manager - protección básica (compatible con Apache y LiteSpeed) +Options -Indexes + +# Archivos que nunca deben descargarse + + + Require all denied + + + Order allow,deny + Deny from all + + + + + RewriteEngine On + # Código antiguo, ejemplos y pruebas de librerías: no accesibles por URL + RewriteRule ^(phpexcel|modulo/sendgrid/lib|modulo/sendgrid/vendor|modulo/sendgrid/sendgrid-php\.php|modulo/mailer/PHPMailer|modulo/mailer/PHPMailer-master)(/|$) - [F,L] + + + + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" + Header always set Referrer-Policy "same-origin" + # Solo se permite cámara (fotos de huéspedes) desde el propio sitio + Header always set Permissions-Policy "camera=(self), microphone=(), geolocation=()" + # Obliga HTTPS en visitas futuras (solo se envía cuando la conexión ya es HTTPS) + Header always set Strict-Transport-Security "max-age=31536000" env=HTTPS + Header always unset X-Powered-By + diff --git a/adicionar.php b/adicionar.php index b08ca3d..da1906a 100644 --- a/adicionar.php +++ b/adicionar.php @@ -1,6 +1,6 @@ - + diff --git a/autorizados_vis.php b/autorizados_vis.php index 950b332..bd769dc 100644 --- a/autorizados_vis.php +++ b/autorizados_vis.php @@ -1,5 +1,5 @@ - diff --git a/caja.php b/caja.php index ad2d6a9..b0b1bd1 100644 --- a/caja.php +++ b/caja.php @@ -1,5 +1,5 @@ -=\''.$caja_1.'\' and id_consecutivo <=\''.$caja_2.'\' '); diff --git a/chat.php b/chat.php index e79645a..f87e87f 100644 --- a/chat.php +++ b/chat.php @@ -1,5 +1,5 @@ -DATOS DE HUESPEDES
- + diff --git a/check_in.php b/check_in.php index 93af726..1cc4dcb 100644 --- a/check_in.php +++ b/check_in.php @@ -1,5 +1,5 @@ -"> - +
diff --git a/check_reserva_empleado.php b/check_reserva_empleado.php index 9a764e2..8fd069b 100644 --- a/check_reserva_empleado.php +++ b/check_reserva_empleado.php @@ -1,5 +1,5 @@ -DATOS DE HUESPEDES - +
diff --git a/check_reserva_vis.php b/check_reserva_vis.php index 434d558..81b4fbb 100644 --- a/check_reserva_vis.php +++ b/check_reserva_vis.php @@ -1,5 +1,5 @@ -DATOS DE HUESPEDES - +
diff --git a/checkin.php b/checkin.php index 4f5b3ca..f5a0a1d 100644 --- a/checkin.php +++ b/checkin.php @@ -1,5 +1,5 @@ - + @@ -982,7 +982,7 @@ $eventSelect.on("change", function (e) { - + diff --git a/checkin_huespedes.php b/checkin_huespedes.php index e858fe5..7ce1d82 100644 --- a/checkin_huespedes.php +++ b/checkin_huespedes.php @@ -1,5 +1,5 @@ - 0) { $sql ="UPDATE usuario_area Set nombres='$nombres', apellidos='$apellidos', apellidos='$apellidos', codigo_nucleo='$codigo_nucleo', user_apto='$user_apto', estado= 1 Where idocupante='$ide'"; - $query = mysqli_query($conexion, $sql) or die ('Operación NO efectuada: '.mysqli_error($conexion)); + $query = mysqli_query($conexion, $sql) or die ('Operación NO efectuada: '.hm_error_sql($conexion)); $response['status'] = 300; $response['message'] = "este ID ya existe, fue actualizado".$codigo_nucleo; @@ -252,7 +252,7 @@ $numero_registro = $_POST['display_registro']; $query_insert ="INSERT INTO usuario_area(idocupante, code_reserva, nombres, apellidos, estado, edad, codigo_nucleo, user_apto)VALUES ('$ide', '$datime_space','$nombres','$apellidos', 1, '$edad', '$codigo_nucleo', '$user_apto');"; if (!$result_insert = mysqli_query($conexion, $query_insert)) { - exit(mysqli_error()); + exit(hm_error_sql()); // registro falló $response['status'] = 100; $response['message'] = "registro falló"; @@ -270,14 +270,14 @@ $numero_registro = $_POST['display_registro']; //-------INSERCION EN TABLA FACTURADOS---------------------//// $result_facturados="INSERT INTO facturados(id, consecutivo, nombre_uno, nombre_dos, apellido_uno, apellido_dos, fecha_checkin, hora_checkin, fecha_checkout, hora_checkout, sesion) VALUES ('$num_id', '$consecutivo', '$nom1', '$nom2', '$ape1', '$ape2', '$fecha_checkin', '$hora_checkin', '$fecha_checkout', '$hora_checkout', '$sesion');"; - $query_facturados = mysqli_query($conexion, $result_facturados) or die ('Operación NO efectuada: '.mysqli_error()); + $query_facturados = mysqli_query($conexion, $result_facturados) or die ('Operación NO efectuada: '.hm_error_sql()); //echo 'Huéspedes Registrados!.'; }//fin else //asignación de id, manilla y num registro $manilla_check = 1; $update_manilla ="UPDATE manilla_control set id_hp_manilla='$num_id', manilla_check = '$manilla_check', manilla_asignada='$num_manilla', fecha_inside='$fecha_hoy', hora_inside='$hora_actual', sesion_in='$sesion', num_reg_asocio = '$numero_registro' where num_manilla_control = '$num_manilla'"; - $query = mysqli_query($conexion, $update_manilla) or die ('Operación NO efectuada: '.mysqli_error()); + $query = mysqli_query($conexion, $update_manilla) or die ('Operación NO efectuada: '.hm_error_sql()); @@ -287,7 +287,7 @@ $numero_registro = $_POST['display_registro']; //Inserción de huesped sin imagen $sql="INSERT INTO huesped(id, tipoid, origen, pais, ciudad, nombre_uno, nombre_dos, apellido_uno, apellido_dos,fdn, edad, tipo, genero, direccion, telefono, email, bloqueado, contacto, imagen, huella, fecha_reg, hora_reg, sesion) VALUES ('$num_id', '$tipo_id', '$origen', '$pais', '$ciudad', '$nom1', '$nom2', '$ape1', '$ape2', '$fdnaci_2', '$ed', '$tipo', '$gen', '$dir', '$tel', '$email', '$bloq', '$contac', '$img', '$huella', '$fecha_registro', '$hora_reg', '$sesion');"; - $query = mysqli_query($conexion, $sql) or die('Error: ' . mysqli_error($conexion)); + $query = mysqli_query($conexion, $sql) or die('Error: ' . hm_error_sql($conexion)); $result_folio = mysqli_query($conexion, 'SELECT * FROM reserva WHERE id_consecutivo=\''.$consecutivo.'\''); $row_folio = mysqli_fetch_array($result_folio); @@ -301,7 +301,7 @@ $numero_registro = $_POST['display_registro']; //inserción a tabla checkin los datos de huesped $result__="INSERT INTO checkin(id, consecutivo, nombre_uno, nombre_dos, apellido_uno, apellido_dos, fecha_checkin, hora_checkin, fecha_checkout, hora_checkout, sesion, num_manilla, ocupacion) VALUES ('$num_id', '$consecutivo', '$nom1', '$nom2', '$ape1', '$ape2', '$fecha_checkin', '$hora_checkin', '$fecha_checkout', '$hora_checkout', '$sesion', '$num_manilla', '$tipoc_h');"; - $query_2 = mysqli_query($conexion, $result__) or die ('Operación NO efectuada: '.mysqli_error()); + $query_2 = mysqli_query($conexion, $result__) or die ('Operación NO efectuada: '.hm_error_sql()); //echo 'Huéspedes Registrados!.'; @@ -318,13 +318,13 @@ $numero_registro = $_POST['display_registro']; /*ingreso a plataforma de reservas de áreas comunes*/ $query_search_id = 'SELECT * FROM usuario_area where idocupante=\''.$ide.'\''; if (!$result_ide = mysqli_query($conexion, $query_search_id)) { - exit(mysqli_error($conexion)); + exit(hm_error_sql($conexion)); } if(mysqli_num_rows($result_ide) > 0) { $sql ="UPDATE usuario_area Set nombres='$nombres', apellidos='$apellidos', apellidos='$apellidos', codigo_nucleo='$codigo_nucleo', user_apto='$user_apto', estado= 1 Where idocupante='$ide'"; - $query = mysqli_query($conexion, $sql) or die ('Operación NO efectuada: '.mysqli_error($conexion)); + $query = mysqli_query($conexion, $sql) or die ('Operación NO efectuada: '.hm_error_sql($conexion)); $response['status'] = 300; $response['message'] = "este ID ya existe, fue actualizado".$codigo_nucleo; @@ -334,7 +334,7 @@ $numero_registro = $_POST['display_registro']; $query_insert ="INSERT INTO usuario_area(idocupante, code_reserva, nombres, apellidos, estado, edad, codigo_nucleo, user_apto)VALUES ('$ide', '$datime_space','$nombres','$apellidos', 1, '$edad', '$codigo_nucleo', '$user_apto');"; if (!$result_insert = mysqli_query($conexion, $query_insert)) { - exit(mysqli_error()); + exit(hm_error_sql()); // registro falló $response['status'] = 100; $response['message'] = "registro falló"; @@ -352,7 +352,7 @@ $numero_registro = $_POST['display_registro']; //-------INSERCION EN TABLA FACTURADOS---------------------//// $result_facturados = "INSERT INTO facturados(id, consecutivo, nombre_uno, nombre_dos, apellido_uno, apellido_dos, fecha_checkin, hora_checkin, fecha_checkout, hora_checkout, sesion) VALUES ('$num_id', '$consecutivo', '$nom1', '$nom2', '$ape1', '$ape2', '$fecha_checkin', '$hora_checkin', '$fecha_checkout', '$hora_checkout', '$sesion');"; - $query_facturados = mysqli_query($conexion, $result_facturados) or die ('Operación NO efectuada: '.mysqli_error()); + $query_facturados = mysqli_query($conexion, $result_facturados) or die ('Operación NO efectuada: '.hm_error_sql()); @@ -360,7 +360,7 @@ $numero_registro = $_POST['display_registro']; $manilla_check = 1; $update_manilla ="UPDATE manilla_control set id_hp_manilla='$num_id', manilla_check = '$manilla_check', manilla_asignada='$num_manilla', fecha_inside='$fecha_hoy', hora_inside='$hora_actual', sesion_in='$sesion', num_reg_asocio = '$numero_registro' where num_manilla_control = '$num_manilla'"; - $query = mysqli_query($conexion, $update_manilla) or die ('Operación NO efectuada: '.mysqli_error()); + $query = mysqli_query($conexion, $update_manilla) or die ('Operación NO efectuada: '.hm_error_sql()); }//fin else diff --git a/checkin_update.php b/checkin_update.php index 140ef13..ca72aad 100644 --- a/checkin_update.php +++ b/checkin_update.php @@ -1,5 +1,5 @@ - 0) // // Update checkin details $query ="UPDATE reserva Set num_apto='$numero_apto', cantidad_h='$cantidad_h', carro='$carro', tipo_ocu='$tipo_ocu', instancia_d='$inst', fecha_ing='$fecha_ing', fecha_sal='$checkout', hora_sal='$hora_checkout', parqueadero='$parqueadero', sesion='$sesion' Where id_consecutivo ='$consecutivo'"; if (!$result = mysqli_query($conexion, $query)) { - exit(mysqli_error()); + exit(hm_error_sql()); } if ($carro == 'SI'){ @@ -73,7 +73,7 @@ if(mysqli_num_rows(@$result) > 0) // $mensaje_alerta = "RESERVA ENTRANTE PARA :".$n_apto.", NOCHES :".$inst.", OBS : ".$cantidad_h." ".$tipo_ocu; $sql_alerta_p="INSERT INTO alerta(tipo_alerta, estado, mensaje_alerta) VALUES ('$tipo_alerta', '$estado', '$mensaje_alerta');"; - $query_alerta_p = mysqli_query($conexion, $sql_alerta_p) or die ('Operación NO efectuada: '.mysqli_error()); + $query_alerta_p = mysqli_query($conexion, $sql_alerta_p) or die ('Operación NO efectuada: '.hm_error_sql()); } else{ } @@ -102,7 +102,7 @@ if(mysqli_num_rows(@$result) > 0) // // Update checkin details $query ="UPDATE reserva Set num_apto='$numero_apto', cantidad_h='$cantidad_h', carro='$carro', tipo_ocu='$tipo_ocu', instancia_d='$inst', fecha_ing='$fecha_ing', fecha_sal='$checkout', hora_sal='$hora_checkout', parqueadero='$parqueadero', sesion='$sesion' Where id_consecutivo ='$consecutivo'"; if (!$result = mysqli_query($conexion, $query)) { - exit(mysqli_error()); + exit(hm_error_sql()); } if ($carro == 'SI'){ @@ -111,7 +111,7 @@ if(mysqli_num_rows(@$result) > 0) // $mensaje_alerta = "RESERVA ENTRANTE PARA :".$n_apto.", NOCHES :".$inst.", OBS : ".$cantidad_h." ".$tipo_ocu; $sql_alerta_p="INSERT INTO alerta(tipo_alerta, estado, mensaje_alerta) VALUES ('$tipo_alerta', '$estado', '$mensaje_alerta');"; - $query_alerta_p = mysqli_query($conexion, $sql_alerta_p) or die ('Operación NO efectuada: '.mysqli_error()); + $query_alerta_p = mysqli_query($conexion, $sql_alerta_p) or die ('Operación NO efectuada: '.hm_error_sql()); } else{ } @@ -153,7 +153,7 @@ if(mysqli_num_rows(@$result) > 0) // // Update checkin details $query ="UPDATE reserva Set num_apto='$numero_apto', cantidad_h='$cantidad_h', carro='$carro', tipo_ocu='$tipo_ocu', instancia_d='$inst', fecha_ing='$fecha_ing', fecha_sal='$checkout', hora_sal='$hora_checkout', parqueadero='$parqueadero', sesion='$sesion' Where id_consecutivo ='$consecutivo'"; if (!$result = mysqli_query($conexion, $query)) { - exit(mysqli_error()); + exit(hm_error_sql()); } if ($carro == 'SI'){ @@ -162,7 +162,7 @@ if(mysqli_num_rows(@$result) > 0) // $mensaje_alerta = "RESERVA ENTRANTE PARA :".$n_apto.", NOCHES :".$inst.", OBS : ".$cantidad_h." ".$tipo_ocu; $sql_alerta_p="INSERT INTO alerta(tipo_alerta, estado, mensaje_alerta) VALUES ('$tipo_alerta', '$estado', '$mensaje_alerta');"; - $query_alerta_p = mysqli_query($conexion, $sql_alerta_p) or die ('Operación NO efectuada: '.mysqli_error()); + $query_alerta_p = mysqli_query($conexion, $sql_alerta_p) or die ('Operación NO efectuada: '.hm_error_sql()); } else{ } diff --git a/checkout.php b/checkout.php index eaadffc..fcb8306 100644 --- a/checkout.php +++ b/checkout.php @@ -1,6 +1,6 @@ - + + Require all denied + + + Order allow,deny + Deny from all + diff --git a/conexion/conect.php b/conexion/conect.php index e28035b..92d163a 100644 --- a/conexion/conect.php +++ b/conexion/conect.php @@ -1,4 +1,6 @@ \ No newline at end of file diff --git a/config.php b/config.php index 04a9293..44e23d1 100644 --- a/config.php +++ b/config.php @@ -1,5 +1,5 @@ - - + diff --git a/edit_huesped.php b/edit_huesped.php index 48711c9..9cdcefb 100644 --- a/edit_huesped.php +++ b/edit_huesped.php @@ -1,5 +1,5 @@ - $email->addContent("text/html", $body); - $sendgrid = new \SendGrid('SG.VkOOOZ…[REDACTADA]'); + $sendgrid = new \SendGrid(hm_sendgrid_key()); $array_emails_log = implode(",", $array_emails); try { @@ -558,14 +558,14 @@ $body = " $response_mail = str_replace("'", "", $response->headers()[0]) . " " . str_replace("'", "", $response->headers()[1]) . " " . str_replace("'", "", $response->headers()[2]) . " " . str_replace("'", "", $response->headers()[3]) . " " . str_replace("'", "", $response->headers()[4]) . " " . str_replace("'", "", $response->headers()[5]) . " " . str_replace("'", "", $response->headers()[6]) . " " . str_replace("'", "", $response->headers()[7]) . " " . str_replace("'", "", $response->headers()[8]) . " " . str_replace("'", "", $response->headers()[9]) . " " . str_replace("'", "", $response->headers()[10]) . " " . str_replace("'", "", $response->headers()[11]) . " " . str_replace("'", "", $response->headers()[12]) . " " . str_replace("'", "", $response->headers()[13]) . " " . str_replace("'", "", $response->headers()[14]) . " " . str_replace("'", "", $response->headers()[15]) . " " . str_replace("'", "", $response->headers()[16]); $result_history_emials="INSERT INTO history_emails(area, accion, correos, identificacion, respuesta_server) VALUES ('paquetes', 'entrega', '$array_emails_log', '$array_emails[0]', '$response_mail');"; - $query_emails_send = mysqli_query($conexion, $result_history_emials) or die ('Operación NO efectuada: '.mysqli_error()); + $query_emails_send = mysqli_query($conexion, $result_history_emials) or die ('Operación NO efectuada: '.hm_error_sql()); } catch (Exception $e) { // echo 'Caught exception:
'.  $e->getMessage(). "
\n"; $response = implode(";", $e->getMessage()); $result_history_emials="INSERT INTO history_emails(area, accion, correos, identificacion, respuesta_server) VALUES ('Paquetes', 'entrega', '$array_emails_log', '$array_emails[0]', '$response');"; - $query_emails_send = mysqli_query($conexion, $result_history_emials) or die ('Operación NO efectuada: '.mysqli_error()); + $query_emails_send = mysqli_query($conexion, $result_history_emials) or die ('Operación NO efectuada: '.hm_error_sql()); } } diff --git a/fact_parqueo.php b/fact_parqueo.php index b391f31..0f49192 100644 --- a/fact_parqueo.php +++ b/fact_parqueo.php @@ -1,6 +1,6 @@ - + - + diff --git a/factura_global_items.php b/factura_global_items.php index 775b68f..e3cfb70 100644 --- a/factura_global_items.php +++ b/factura_global_items.php @@ -1,6 +1,6 @@ - + - + diff --git a/factura_visita.php b/factura_visita.php index ad77585..29e779d 100644 --- a/factura_visita.php +++ b/factura_visita.php @@ -1,5 +1,5 @@ - 0) { @@ -67,7 +67,7 @@ if(isset($_POST['send_idtabla'])) /*búsqueda de manilla en checkin*/ $query_find = "SELECT id_tabla, num_manilla FROM checkin WHERE num_manilla = '$num_manilla'"; if (!$result_find = mysqli_query($conexion, $query_find)) { - exit(mysqli_error()); + exit(hm_error_sql()); } if(mysqli_num_rows($result_find) > 0){ $response['status'] = "100"; diff --git a/footer.php b/footer.php index ecdabf1..6dd2fa7 100644 --- a/footer.php +++ b/footer.php @@ -1,4 +1,4 @@ -

Reserva del Mar II. | 2026 - HM Desing: admin@softmanagersolutions.com

diff --git a/h_encasa.php b/h_encasa.php index d64ef80..81c473a 100644 --- a/h_encasa.php +++ b/h_encasa.php @@ -1,5 +1,5 @@ - - + @@ -109,7 +109,7 @@ session_start(); - + diff --git a/ingreso_paquete.php b/ingreso_paquete.php index 0a42774..6490518 100644 --- a/ingreso_paquete.php +++ b/ingreso_paquete.php @@ -1,6 +1,6 @@ - + - + diff --git a/insert_reservas.php b/insert_reservas.php index d161a21..ecfd421 100644 --- a/insert_reservas.php +++ b/insert_reservas.php @@ -1,5 +1,5 @@ - 0) { @@ -112,7 +112,7 @@ if (!$result = mysqli_query($conexion, $query)) { /*insercion de reserva*/ $sql="INSERT INTO reserva(identificacion, nombre_reserva, num_apto, capacidad_apto, cantidad_h, carro, tipo_ocu, instancia_d, fecha_ing, hora_ing, fecha_sal, hora_sal, parqueadero, sesion, sesion_firma) VALUES ('$identificacion', '$nombre_reserva', '$n_apto', '$capacidad_apto', '$cantidad_h', '$carro', '$tipo_ocu', '$inst', '$f_ingreso', '$hora_actual', '$nuevafecha', '$h_salida', '$parqueadero', '$sesion', '$sesion_firma');"; - $query = mysqli_query($conexion, $sql) or die ('Operación NO efectuada: '.mysqli_error($conexion)); + $query = mysqli_query($conexion, $sql) or die ('Operación NO efectuada: '.hm_error_sql($conexion)); // Ultimo consecutivo insertado en la tabla reservas $last_id = mysqli_insert_id($conexion); @@ -128,7 +128,7 @@ if (!$result = mysqli_query($conexion, $query)) { $iva = 0.19; $result="INSERT INTO factura(Id_factura, folio_factura, sesion, tipo, iva) VALUES ('$id_factura', '$last_id', '$sesion', '$tipo_facturado', '$iva');"; - $query_2 = mysqli_query($conexion, $result) or die ('Operación NO efectuada: '.mysqli_error()); + $query_2 = mysqli_query($conexion, $result) or die ('Operación NO efectuada: '.hm_error_sql()); $last_id_fact = mysqli_insert_id($conexion); @@ -143,7 +143,7 @@ if (!$result = mysqli_query($conexion, $query)) { $query_update ="UPDATE checkin_online set checkin_rsv= 1 Where consecutivo ='$consecutivo'"; if (!$result_update = mysqli_query($conexion, $query_update)) { - exit(mysqli_error($conexion)); + exit(hm_error_sql($conexion)); } //Cantidad de huéspedes a insertar @@ -234,19 +234,19 @@ if (!$result = mysqli_query($conexion, $query)) { //actualizacion de datos de huéspedes registrados anteriormente $sql ="UPDATE huesped Set id='$num_id', tipoid='$tipo_id', origen='$origen', pais='$pais', ciudad='$ciudad', nombre_uno='$nom1', nombre_dos='$nom2', apellido_uno='$ape1', apellido_dos='$ape2', fdn='$fdnaci_2', edad='$ed', tipo='$tipo', genero='$gen', direccion='$dir', telefono='$tel', email='$email', bloqueado='$bloq', contacto='$contac', imagen='$img', huella='$huella', fecha_reg='$fecha_registro', hora_reg='$hora_actual', sesion='$sesion' Where id='$num_id'"; - $query = mysqli_query($conexion, $sql) or die ('Operación NO efectuada: '.mysqli_error()); + $query = mysqli_query($conexion, $sql) or die ('Operación NO efectuada: '.hm_error_sql()); }else{ //Inserción de huesped sin imagen $sql="INSERT INTO huesped(id, tipoid, origen, pais, ciudad, nombre_uno, nombre_dos, apellido_uno, apellido_dos,fdn, edad, tipo, genero, direccion, telefono, email, bloqueado, contacto, imagen, huella, fecha_reg, hora_reg, sesion) VALUES ('$num_id', '$tipo_id', '$origen', '$pais', '$ciudad', '$nom1', '$nom2', '$ape1', '$ape2', '$fdnaci_2', '$ed', '$tipo', '$gen', '$dir', '$tel', '$email', '$bloq', '$contac', '$img', '$huella', '$fecha_registro', '$hora_reg', '$sesion');"; - $query = mysqli_query($conexion, $sql) or die('Error: ' . mysqli_error($conexion)); + $query = mysqli_query($conexion, $sql) or die('Error: ' . hm_error_sql($conexion)); } $result__="INSERT INTO checkin(id, consecutivo, nombre_uno, nombre_dos, apellido_uno, apellido_dos, fecha_checkin, hora_checkin, fecha_checkout, hora_checkout, sesion, num_manilla) VALUES ('$num_id', '$last_id', '$nom1', '$nom2', '$ape1', '$ape2', '$fecha_checkin', '$hora_checkin', '$fecha_checkout', '$hora_checkout', '$sesion', '$num_manilla');"; - $query_2 = mysqli_query($conexion, $result__) or die ('Operación NO efectuada: '.mysqli_error($conexion)); + $query_2 = mysqli_query($conexion, $result__) or die ('Operación NO efectuada: '.hm_error_sql($conexion)); @@ -254,7 +254,7 @@ if (!$result = mysqli_query($conexion, $query)) { $estado_chk = 1; //actualizando reserva $sql_update_chk ="UPDATE checkin_online Set checkin_rsv='$estado_chk' Where id_tabla ='$id_tabla_chk_online'"; - $query_update_chk = mysqli_query($conexion, $sql_update_chk) or die ('Comunicarse con Administrador del Sistema_: '.mysqli_error()); + $query_update_chk = mysqli_query($conexion, $sql_update_chk) or die ('Comunicarse con Administrador del Sistema_: '.hm_error_sql()); }//end for @@ -262,7 +262,7 @@ if (!$result = mysqli_query($conexion, $query)) { $estado_rsv = 2; //actualizando reserva $sql ="UPDATE reserva_online set estado_rsv='$estado_rsv', id_admin='$last_id' Where id_consecutivo ='$consecutivo'"; - $query = mysqli_query($conexion, $sql) or die ('Comunicarse con Administrador del Sistema_: '.mysqli_error()); + $query = mysqli_query($conexion, $sql) or die ('Comunicarse con Administrador del Sistema_: '.hm_error_sql()); $response = array("data" => "1", "data_name" => $array_name, "data_ide" => $array_ide, "data_ape" => $array_ape, "data_edad" => $array_edad, "data_cod_nucleo" => $array_cod_nucleo, "user_apto" => $array_apto); echo json_encode($response); @@ -299,7 +299,7 @@ if (!$result = mysqli_query($conexion, $query)) { /*insercion de reserva*/ $sql="INSERT INTO reserva(identificacion, nombre_reserva, num_apto, capacidad_apto, cantidad_h, carro, tipo_ocu, instancia_d, fecha_ing, hora_ing, fecha_sal, hora_sal, parqueadero, sesion, sesion_firma) VALUES ('$identificacion', '$nombre_reserva', '$n_apto', '$capacidad_apto', '$cantidad_h', '$carro', '$tipo_ocu', '$inst', '$f_ingreso', '$hora_actual', '$nuevafecha', '$h_salida', '$parqueadero', '$sesion', '$sesion_firma');"; - $query = mysqli_query($conexion, $sql) or die ('Operación NO efectuada: '.mysqli_error($conexion)); + $query = mysqli_query($conexion, $sql) or die ('Operación NO efectuada: '.hm_error_sql($conexion)); /** Generación de último consecutivo*/ $last_id = mysqli_insert_id($conexion); @@ -314,7 +314,7 @@ if (!$result = mysqli_query($conexion, $query)) { $iva = 0.19; $result="INSERT INTO factura(Id_factura, folio_factura, sesion, tipo, iva) VALUES ('$id_factura', '$last_id', '$sesion', '$tipo_facturado', '$iva');"; - $query_2 = mysqli_query($conexion, $result) or die ('Operación NO efectuada: '.mysqli_error()); + $query_2 = mysqli_query($conexion, $result) or die ('Operación NO efectuada: '.hm_error_sql()); $last_id_fact = mysqli_insert_id($conexion); @@ -413,19 +413,19 @@ if (!$result = mysqli_query($conexion, $query)) { //actualizacion de datos de huéspedes registrados anteriormente $sql ="UPDATE huesped Set id='$num_id', tipoid='$tipo_id', origen='$origen', pais='$pais', ciudad='$ciudad', nombre_uno='$nom1', nombre_dos='$nom2', apellido_uno='$ape1', apellido_dos='$ape2', fdn='$fdnaci_2', edad='$ed', tipo='$tipo', genero='$gen', direccion='$dir', telefono='$tel', email='$email', bloqueado='$bloq', contacto='$contac', imagen='$img', huella='$huella', fecha_reg='$fecha_registro', hora_reg='$hora_actual', sesion='$sesion' Where id='$num_id'"; - $query = mysqli_query($conexion, $sql) or die ('Operación NO efectuada: '.mysqli_error()); + $query = mysqli_query($conexion, $sql) or die ('Operación NO efectuada: '.hm_error_sql()); }else{ //Inserción de huesped sin imagen $sql="INSERT INTO huesped(id, tipoid, origen, pais, ciudad, nombre_uno, nombre_dos, apellido_uno, apellido_dos,fdn, edad, tipo, genero, direccion, telefono, email, bloqueado, contacto, imagen, huella, fecha_reg, hora_reg, sesion) VALUES ('$num_id', '$tipo_id', '$origen', '$pais', '$ciudad', '$nom1', '$nom2', '$ape1', '$ape2', '$fdnaci_2', '$ed', '$tipo', '$gen', '$dir', '$tel', '$email', '$bloq', '$contac', '$img', '$huella', '$fecha_registro', '$hora_reg', '$sesion');"; - $query = mysqli_query($conexion, $sql) or die('Error: ' . mysqli_error($conexion)); + $query = mysqli_query($conexion, $sql) or die('Error: ' . hm_error_sql($conexion)); } $result__="INSERT INTO checkin(id, consecutivo, nombre_uno, nombre_dos, apellido_uno, apellido_dos, fecha_checkin, hora_checkin, fecha_checkout, hora_checkout, sesion, num_manilla) VALUES ('$num_id', '$last_id', '$nom1', '$nom2', '$ape1', '$ape2', '$fecha_checkin', '$hora_checkin', '$fecha_checkout', '$hora_checkout', '$sesion', '$num_manilla');"; - $query_2 = mysqli_query($conexion, $result__) or die ('Operación NO efectuada: '.mysqli_error()); + $query_2 = mysqli_query($conexion, $result__) or die ('Operación NO efectuada: '.hm_error_sql()); @@ -433,7 +433,7 @@ if (!$result = mysqli_query($conexion, $query)) { $estado_chk = 1; //actualizando reserva $sql_update_chk ="UPDATE checkin_online Set checkin_rsv='$estado_chk' Where id_tabla ='$id_tabla_chk_online'"; - $query_update_chk = mysqli_query($conexion, $sql_update_chk) or die ('Comunicarse con Administrador del Sistema_: '.mysqli_error()); + $query_update_chk = mysqli_query($conexion, $sql_update_chk) or die ('Comunicarse con Administrador del Sistema_: '.hm_error_sql()); }//end for @@ -442,7 +442,7 @@ if (!$result = mysqli_query($conexion, $query)) { //actualizando la reserva con el numero de registro asignado $query_update ="UPDATE reserva_online set estado_rsv= 2, id_admin='$last_id' Where id_consecutivo ='$consecutivo'"; if (!$result_update = mysqli_query($conexion, $query_update)) { - exit(mysqli_error($conexion)); + exit(hm_error_sql($conexion)); } $response = array("data" => "1", "data_name" => $array_name, "data_ide" => $array_ide, "data_ape" => $array_ape, "data_edad" => $array_edad, "data_cod_nucleo" => $array_cod_nucleo, "user_apto" => $array_apto); diff --git a/insert_reservas_add.php b/insert_reservas_add.php index 20d6218..33c3671 100644 --- a/insert_reservas_add.php +++ b/insert_reservas_add.php @@ -1,5 +1,5 @@ -isSMTP(); $mail->Host = 'mail.huespedmanager.com'; // Host de conexión SMTP $mail->SMTPAuth = true; - $mail->Username = 'morrosioconfirmacion@huespedmanager.com'; // Usuario SMTP - $mail->Password = '[REDACTADA]'; // Password SMTP + $mail->Username = hm_smtp('morrosio')['username']; // Usuario SMTP + $mail->Password = hm_smtp('morrosio')['password']; // Password SMTP $mail->SMTPSecure = 'tls'; // Activar seguridad TLS $mail->Port = 587; // Puerto SMTP diff --git a/insert_reservas_vis.php b/insert_reservas_vis.php index c9e81f3..91ced4a 100644 --- a/insert_reservas_vis.php +++ b/insert_reservas_vis.php @@ -1,4 +1,4 @@ -isSMTP(); $mail->Host = 'mail.huespedmanager.com'; // Host de conexión SMTP $mail->SMTPAuth = true; - $mail->Username = 'morrosioconfirmacion@huespedmanager.com'; // Usuario SMTP - $mail->Password = '[REDACTADA]'; // Password SMTP + $mail->Username = hm_smtp('morrosio')['username']; // Usuario SMTP + $mail->Password = hm_smtp('morrosio')['password']; // Password SMTP $mail->SMTPSecure = 'tls'; // Activar seguridad TLS $mail->Port = 587; // Puerto SMTP diff --git a/insert_user.php b/insert_user.php index d477965..5c1bd1d 100644 --- a/insert_user.php +++ b/insert_user.php @@ -1,6 +1,6 @@ - 0) { $sql ="UPDATE usuario Set nombres='$nombres', apellidos='$apellidos', apellidos='$apellidos', codigo_nucleo='$codigo_nucleo', user_apto='$user_apto', estado= 1 Where idocupante='$ide'"; - $query = mysqli_query($con, $sql) or die ('Operación NO efectuada: '.mysqli_error()); + $query = mysqli_query($con, $sql) or die ('Operación NO efectuada: '.hm_error_sql()); $response['status'] = 300; $response['message'] = "este ID ya existe, fue actualizado".$codigo_nucleo; @@ -34,7 +34,7 @@ $query_search_id = 'SELECT * FROM usuario where idocupante=\''.$ide.'\''; $query_insert ="INSERT INTO usuario(idocupante, code_reserva, nombres, apellidos, estado, edad, codigo_nucleo, user_apto)VALUES ('$ide', '$datime_space','$nombres','$apellidos', 1, '$edad', '$codigo_nucleo', '$user_apto');"; if (!$result_insert = mysqli_query($con, $query_insert)) { - exit(mysqli_error()); + exit(hm_error_sql()); // registro falló $response['status'] = 100; $response['message'] = "registro falló"; diff --git a/listado_mapfre.php b/listado_mapfre.php index 5314120..15802e8 100644 --- a/listado_mapfre.php +++ b/listado_mapfre.php @@ -1,5 +1,5 @@ - --> + + diff --git a/manillaxapto.php b/manillaxapto.php index 6dd0899..c6c77ea 100644 --- a/manillaxapto.php +++ b/manillaxapto.php @@ -1,5 +1,5 @@ -
  • - ' name='caja_1' required style="height: 30px"> + ' name='caja_1' required style="height: 30px">
  • - ' name='caja_2' required style="height: 30px"> + ' name='caja_2' required style="height: 30px">
  • diff --git a/manillaxcolor.php b/manillaxcolor.php index 55ffcf0..c0fb1da 100644 --- a/manillaxcolor.php +++ b/manillaxcolor.php @@ -1,6 +1,6 @@ - + - Reporte de manillas - <?php if(isset($_GET['color'])){echo $_GET['color'];}else{ echo "";} ?> + Reporte de manillas - <?php if(isset($_GET['color'])){echo hm_e(hm_raw('GET','color'));}else{ echo "";} ?> @@ -199,12 +199,12 @@ include("timezone.php");
  • - ' name='caja_1' required="required"> + ' name='caja_1' required="required">
  • - ' name='caja_2' required="required"> + ' name='caja_2' required="required">
  • @@ -332,7 +332,7 @@ include("timezone.php");
  • - + @@ -398,7 +398,7 @@ include("timezone.php"); - + diff --git a/mensajes.php b/mensajes.php index e9f203f..ab97c91 100644 --- a/mensajes.php +++ b/mensajes.php @@ -1,4 +1,4 @@ -