Auto commit: 2026-02-15T18:33:48.271Z

This commit is contained in:
Flatlogic Bot 2026-02-15 18:33:48 +00:00
parent efcde372a8
commit 6f5e1bf0c1

View File

@ -662,12 +662,12 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489";
<div class="form-row">
<div class="form-group">
<label for="user-name">NOMBRE</label>
<input type="text" id="user-name" placeholder="Tu nombre...">
<input type="text" id="user-name" placeholder="Tu nombre..." oninput="this.style.borderColor='rgba(255, 255, 255, 0.2)'">
</div>
<div class="form-group">
<label for="user-phone">MOVIL</label>
<input type="tel" id="user-phone" placeholder="Tu número..." onchange="savePhone(this.value)">
<input type="tel" id="user-phone" placeholder="Tu número..." oninput="this.style.borderColor='rgba(255, 255, 255, 0.2)'" onchange="savePhone(this.value)">
</div>
</div>
@ -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/<?= str_replace('+', '', $whatsapp_number) ?>?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;
}