Autosave: 20260215-182541

This commit is contained in:
Flatlogic Bot 2026-02-15 18:25:41 +00:00
parent eb92bd9033
commit 6f66b76f14
2 changed files with 2 additions and 108 deletions

View File

@ -20,19 +20,6 @@ $active_phones = $stmt->fetchAll();
$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();
// Handle Video Password Update
if (isset($_POST['update_video_pass'])) {
$new_pass = trim($_POST['video_pass']);
$stmt = $db->prepare("INSERT INTO settings (setting_key, setting_value) VALUES ('video_room_password', ?) ON DUPLICATE KEY UPDATE setting_value = ?");
$stmt->execute([$new_pass, $new_pass]);
$success_msg = "Contraseña de la sala de video actualizada.";
}
// Get current video password
$stmt = $db->prepare("SELECT setting_value FROM settings WHERE setting_key = 'video_room_password'");
$stmt->execute();
$current_video_pass = $stmt->fetchColumn() ?: "lili123";
?>
<!DOCTYPE html>
<html lang="es">
@ -60,30 +47,6 @@ $current_video_pass = $stmt->fetchColumn() ?: "lili123";
</div>
</div>
<?php if (isset($success_msg)): ?>
<div class="alert alert-success bg-success text-white border-0 mb-4"><?= $success_msg ?></div>
<?php endif; ?>
<div class="row mb-4">
<div class="col-md-12">
<div class="card p-4">
<h5 class="mb-3"><i class="bi bi-camera-video-fill text-primary"></i> Control de Sala de Video</h5>
<form method="POST" class="row g-3">
<div class="col-auto">
<label class="form-label">Contraseña actual para los usuarios:</label>
<input type="text" name="video_pass" class="form-control bg-dark text-white border-secondary" value="<?= htmlspecialchars($current_video_pass) ?>" required>
</div>
<div class="col-auto d-flex align-items-end">
<button type="submit" name="update_video_pass" class="btn btn-success">ACTUALIZAR CONTRASEÑA</button>
</div>
<div class="col-12 mt-2">
<small class="text-secondary">Esta contraseña será solicitada a los usuarios que intenten activar su cámara en la web.</small>
</div>
</form>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="card p-4 text-center">

View File

@ -11,12 +11,6 @@ $projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? 'assets/pasted-20260215-1646
$whatsapp_link = "https://chat.whatsapp.com/DkG96pTzAFO3hvLqmzwmTY";
$whatsapp_number = '+5359177041';
$facebook_link = "https://www.facebook.com/profile.php?id=61587890927489";
// Fetch video room password
$db = db();
$stmt = $db->prepare("SELECT setting_value FROM settings WHERE setting_key = 'video_room_password'");
$stmt->execute();
$video_room_pass = $stmt->fetchColumn() ?: "lili123";
?>
<!doctype html>
<html lang="es">
@ -708,8 +702,8 @@ $video_room_pass = $stmt->fetchColumn() ?: "lili123";
<?php endif; ?>
</section>
<!-- Interaction Center: Live Chat & Video Calls -->
<section class="interaction-center" style="width: 100%; max-width: 850px; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; z-index: 10;">
<!-- Interaction Center: Live Chat -->
<section class="interaction-center" style="width: 100%; max-width: 850px; display: grid; grid-template-columns: 1fr; gap: 2rem; z-index: 10;">
<!-- Live Web Chat -->
<div class="glass-card chat-window" style="height: 500px; display: flex; flex-direction: column;">
<h3 style="font-size: 1.2rem; margin-bottom: 1rem; color: var(--primary-color);">
@ -727,27 +721,6 @@ $video_room_pass = $stmt->fetchColumn() ?: "lili123";
</button>
</div>
</div>
<!-- Live Video Call Window (Jitsi Integration) -->
<div class="glass-card video-window" style="height: 500px; display: flex; flex-direction: column; position: relative; overflow: hidden;">
<h3 style="font-size: 1.2rem; margin-bottom: 1rem; color: var(--accent-color); padding-left: 5px;">
<i class="bi bi-camera-video-fill"></i> VIDEO EN VIVO
</h3>
<div id="video-container" style="flex: 1; background: rgba(0,0,0,0.4); border-radius: 16px; position: relative; overflow: hidden;">
<!-- Jitsi Iframe will be loaded here -->
<div id="jitsi-placeholder" style="width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem;">
<i class="bi bi-person-video3" style="font-size: 3rem; margin-bottom: 1rem; opacity: 0.5;"></i>
<p style="font-size: 0.9rem; margin-bottom: 1.5rem;">Únete a la sala de video para que otros usuarios te vean en vivo.</p>
<button onclick="startVideo()" class="send-whatsapp-btn" style="width: auto; padding: 0.8rem 1.5rem; background: var(--primary-color);">
ACTIVAR MI CÁMARA
</button>
<p style="font-size: 0.7rem; opacity: 0.5; margin-top: 1rem;">Integrado con la comunidad Lili Records</p>
</div>
</div>
<div style="position: absolute; top: 1rem; right: 1rem; z-index: 5;">
<span style="background: red; color: white; font-size: 0.6rem; padding: 2px 6px; border-radius: 4px; font-weight: bold; animation: pulse 1s infinite;">LIVE</span>
</div>
</div>
</section>
</div>
@ -1035,48 +1008,6 @@ $video_room_pass = $stmt->fetchColumn() ?: "lili123";
updateMetadata();
setInterval(updateMetadata, 30000);
// --- Video Call Functionality ---
function startVideo() {
const roomPassword = '<?= $video_room_pass ?>';
const userPass = prompt("Introduce la contraseña de la sala (Solicítala en el grupo de WhatsApp):");
if (userPass !== roomPassword) {
if (userPass !== null) alert("Contraseña incorrecta. Solo miembros autorizados pueden unirse.");
return;
}
const container = document.getElementById('video-container');
const placeholder = document.getElementById('jitsi-placeholder');
placeholder.style.display = 'none';
// Load Jitsi External API
const script = document.createElement('script');
script.src = "https://meet.jit.si/external_api.js";
script.onload = () => {
const domain = "meet.jit.si";
const options = {
roomName: "LiliRecordsLive_Sala_Privada_2026",
width: "100%",
height: "100%",
parentNode: container,
configOverwrite: {
startWithAudioMuted: true,
startWithVideoMuted: false,
prejoinPageEnabled: false
},
interfaceConfigOverwrite: {
TOOLBAR_BUTTONS: [
'microphone', 'camera', 'closedcaptions', 'desktop', 'fullscreen',
'fodeviceselection', 'hangup', 'profile', 'chat', 'settings', 'raisehand',
'videoquality', 'filmstrip', 'tileview', 'videobackgroundblur'
],
}
};
const api = new JitsiMeetExternalAPI(domain, options);
};
document.head.appendChild(script);
}
// Handle possible audio interruptions
audio.addEventListener('error', function(e) {
console.error('Audio error:', e);