Auto commit: 2026-02-15T16:31:03.045Z

This commit is contained in:
Flatlogic Bot 2026-02-15 16:31:03 +00:00
parent 35db921f6e
commit 80912e66c8
4 changed files with 105 additions and 0 deletions

View File

@ -12,6 +12,10 @@ $db = db();
$stmt = $db->query("SELECT COUNT(*) FROM visitor_logs WHERE last_activity > DATE_SUB(NOW(), INTERVAL 10 MINUTE)");
$active_users = $stmt->fetchColumn();
// Get active users with phone numbers
$stmt = $db->query("SELECT phone_number, country, last_activity FROM visitor_logs WHERE last_activity > DATE_SUB(NOW(), INTERVAL 10 MINUTE) AND phone_number IS NOT NULL AND phone_number != '' ORDER BY last_activity DESC");
$active_phones = $stmt->fetchAll();
// Get country distribution for active users
$stmt = $db->query("SELECT country, country_code, lat, lon, COUNT(*) as count FROM visitor_logs WHERE last_activity > DATE_SUB(NOW(), INTERVAL 10 MINUTE) GROUP BY country_code");
$locations = $stmt->fetchAll();
@ -49,6 +53,25 @@ $locations = $stmt->fetchAll();
<p class="text-secondary">En los últimos 10 minutos</p>
</div>
<div class="card p-4 mt-4">
<h5>Móviles Conectados</h5>
<ul class="list-group list-group-flush bg-transparent">
<?php if (empty($active_phones)): ?>
<li class="list-group-item bg-transparent text-secondary border-secondary">No hay móviles registrados</li>
<?php else: ?>
<?php foreach ($active_phones as $phone): ?>
<li class="list-group-item bg-transparent text-white border-secondary d-flex justify-content-between align-items-center">
<div>
<span class="fw-bold"><?= htmlspecialchars($phone['phone_number']) ?></span><br>
<small class="text-secondary"><?= htmlspecialchars($phone['country']) ?></small>
</div>
<span class="badge bg-success">Online</span>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div>
<div class="card p-4 mt-4">
<h5>Distribución por País</h5>
<ul class="list-group list-group-flush bg-transparent">

19
api/save_phone.php Normal file
View File

@ -0,0 +1,19 @@
<?php
declare(strict_types=1);
require_once __DIR__ . '/../db/config.php';
if (session_status() === PHP_SESSION_NONE) {
session_start();
}
$phone = $_POST['phone'] ?? '';
$session_id = session_id();
if (!empty($phone) && !empty($session_id)) {
$db = db();
$stmt = $db->prepare("UPDATE visitor_logs SET phone_number = ? WHERE session_id = ? ORDER BY id DESC LIMIT 1");
$stmt->execute([$phone, $session_id]);
echo json_encode(['success' => true]);
} else {
echo json_encode(['success' => false, 'error' => 'Invalid data']);
}

View File

@ -0,0 +1 @@
ALTER TABLE visitor_logs ADD COLUMN phone_number VARCHAR(20) DEFAULT NULL;

View File

@ -71,6 +71,41 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489";
background: var(--bg-overlay);
}
/* Animated Mic Background Elements */
.bg-elements {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 0;
overflow: hidden;
}
.floating-mic {
position: absolute;
font-size: 2rem;
opacity: 0.2;
color: var(--primary-color);
animation: float-around 20s infinite linear;
filter: drop-shadow(0 0 10px currentColor);
}
@keyframes float-around {
0% { transform: translate(0, 0) rotate(0deg); color: #38bdf8; }
25% { transform: translate(100px, 100px) rotate(90deg); color: #00e676; }
50% { transform: translate(200px, 0) rotate(180deg); color: #facc15; }
75% { transform: translate(100px, -100px) rotate(270deg); color: #f472b6; }
100% { transform: translate(0, 0) rotate(360deg); color: #38bdf8; }
}
.floating-mic:nth-child(1) { top: 10%; left: 10%; animation-duration: 25s; }
.floating-mic:nth-child(2) { top: 20%; left: 80%; animation-duration: 30s; animation-delay: -5s; }
.floating-mic:nth-child(3) { top: 70%; left: 15%; animation-duration: 22s; animation-delay: -10s; }
.floating-mic:nth-child(4) { top: 80%; left: 75%; animation-duration: 35s; animation-delay: -15s; }
.floating-mic:nth-child(5) { top: 40%; left: 40%; animation-duration: 28s; animation-delay: -2s; }
.app-container {
display: flex;
width: 100%;
@ -463,6 +498,13 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489";
</head>
<body>
<div class="background"></div>
<div class="bg-elements">
<i class="bi bi-mic-fill floating-mic"></i>
<i class="bi bi-mic-fill floating-mic"></i>
<i class="bi bi-mic-fill floating-mic"></i>
<i class="bi bi-mic-fill floating-mic"></i>
<i class="bi bi-mic-fill floating-mic"></i>
</div>
<div class="app-container">
<!-- Left Section: Player -->
@ -497,6 +539,9 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489";
<label for="user-name">NOMBRE</label>
<input type="text" id="user-name" placeholder="Tu nombre...">
<label for="user-phone">MOVIL</label>
<input type="tel" id="user-phone" placeholder="Tu número..." onchange="savePhone(this.value)">
<label for="user-message">MENSAJE</label>
<textarea id="user-message" placeholder="¿Qué quieres escuchar?"></textarea>
@ -504,6 +549,14 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489";
<i class="bi bi-whatsapp"></i> WHATSAPP
</button>
</div>
<!-- Espacio para Código QR -->
<div class="payment-section">
<div class="qr-placeholder">
<i class="bi bi-qr-code-scan"></i>
<span>TU CÓDIGO QR AQUÍ</span>
</div>
</div>
</div>
</div>
@ -651,6 +704,15 @@ $facebook_link = "https://www.facebook.com/profile.php?id=61587890927489";
audio.volume = val;
}
function savePhone(phone) {
const formData = new FormData();
formData.append('phone', phone);
fetch('api/save_phone.php', {
method: 'POST',
body: formData
});
}
function sendToWhatsApp() {
window.open('<?= $whatsapp_link ?>', '_blank');
}