From 6f5e1bf0c113a9f8c1079203f80aa0e142c64585 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sun, 15 Feb 2026 18:33:48 +0000 Subject: [PATCH] Auto commit: 2026-02-15T18:33:48.271Z --- index.php | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/index.php b/index.php index a01fcc6..913490d 100644 --- a/index.php +++ b/index.php @@ -662,12 +662,12 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489";
- +
- +
@@ -897,17 +897,34 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489"; const message = document.getElementById('user-message').value.trim(); const phoneRegex = /^\+?[0-9]{7,15}$/; - if (!name || !phone) { - alert('Por favor, ingresa tu nombre y número de móvil para continuar.'); + if (name.length < 3) { + alert('Por favor, ingresa un nombre válido (mínimo 3 caracteres).'); + document.getElementById('user-name').style.borderColor = '#ff4444'; + return; + } + + if (!phone) { + alert('Por favor, ingresa tu número de móvil para continuar.'); + document.getElementById('user-phone').style.borderColor = '#ff4444'; return; } if (!phoneRegex.test(phone.replace(/\s/g, ''))) { alert('Por favor, ingresa un número de móvil válido (ej: +5359177041).'); + document.getElementById('user-phone').style.borderColor = '#ff4444'; return; } - const text = `Hola, soy ${name} (${phone}). Quiero escuchar: ${message}`; + const now = new Date(); + const dateTime = now.toLocaleDateString() + ' ' + now.toLocaleTimeString(); + const refId = Math.floor(1000 + Math.random() * 9000); + + const text = `*PETICIÓN RADIO* (Ref: #${refId})\n\n` + + `*Nombre:* ${name}\n` + + `*Móvil:* ${phone}\n` + + `*Fecha:* ${dateTime}\n\n` + + `*Mensaje:* ${message || 'Sin mensaje específico'}`; + const url = `https://wa.me/?text=${encodeURIComponent(text)}`; window.open(url, '_blank'); } @@ -956,13 +973,21 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489"; const message = chatMsg.value.trim(); const phoneRegex = /^\+?[0-9]{7,15}$/; - if (!user || !phone) { - alert('Por favor, regístrate con tu nombre y móvil arriba para poder chatear.'); + if (user.length < 3) { + alert('Por favor, ingresa un nombre válido arriba (mínimo 3 caracteres).'); + userNameInput.style.borderColor = '#ff4444'; + return; + } + + if (!phone) { + alert('Por favor, regístrate con tu móvil arriba para poder chatear.'); + userPhoneInput.style.borderColor = '#ff4444'; return; } if (!phoneRegex.test(phone.replace(/\s/g, ''))) { alert('Por favor, ingresa un número de móvil válido arriba.'); + userPhoneInput.style.borderColor = '#ff4444'; return; }