563 lines
19 KiB
PHP
563 lines
19 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
require_once __DIR__ . '/includes/tracker.php';
|
|
track_visitor();
|
|
|
|
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Lili Records Radio - La mejor música en vivo.';
|
|
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? 'assets/images/featured.jpg';
|
|
|
|
// WhatsApp info
|
|
$whatsapp_link = "https://chat.whatsapp.com/DkG96pTzAFO3hvLqmzwmTY";
|
|
?>
|
|
<!doctype html>
|
|
<html lang="es">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Lili Records Radio</title>
|
|
|
|
<!-- Meta tags SEO -->
|
|
<meta name="description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
|
<meta property="og:title" content="Lili Records Radio" />
|
|
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
|
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
|
<meta property="twitter:card" content="summary_large_image" />
|
|
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
|
|
|
|
<style>
|
|
:root {
|
|
--accent-color: #00e676; /* WhatsApp Green */
|
|
--primary-color: #38bdf8; /* Sky Blue */
|
|
--secondary-color: #f472b6; /* Pink */
|
|
--vibrant-green: #22c55e;
|
|
--bg-overlay: rgba(15, 23, 42, 0.4);
|
|
--glass-bg: rgba(15, 23, 42, 0.4);
|
|
--glass-border: rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
body, html {
|
|
margin: 0;
|
|
padding: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
font-family: 'Inter', sans-serif;
|
|
color: #ffffff;
|
|
background-color: #0f172a;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.background {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), url('assets/pasted-20260214-210950-4cc9dc9e.png?v=<?php echo time(); ?>');
|
|
background-size: cover;
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
z-index: -1;
|
|
}
|
|
|
|
.background-blob {
|
|
display: none;
|
|
}
|
|
|
|
.background-blob-2 {
|
|
display: none;
|
|
}
|
|
|
|
@keyframes move {
|
|
from { transform: translate(0, 0); }
|
|
to { transform: translate(100px, 100px); }
|
|
}
|
|
|
|
.app-container {
|
|
display: flex;
|
|
width: 100%;
|
|
height: 100vh;
|
|
align-items: center;
|
|
padding: 2rem;
|
|
box-sizing: border-box;
|
|
position: relative;
|
|
}
|
|
|
|
/* Left Side: Player */
|
|
.player-section {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
max-width: 520px;
|
|
z-index: 10;
|
|
}
|
|
|
|
.glass-card {
|
|
background: var(--glass-bg);
|
|
backdrop-filter: blur(16px);
|
|
-webkit-backdrop-filter: blur(16px);
|
|
border: 1px solid var(--glass-border);
|
|
border-radius: 32px;
|
|
padding: 2.5rem;
|
|
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.brand h1 {
|
|
font-size: 3rem;
|
|
font-weight: 800;
|
|
margin: 0 0 0.5rem;
|
|
background: linear-gradient(to right, #fff, var(--primary-color), var(--secondary-color));
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
letter-spacing: -0.05em;
|
|
}
|
|
|
|
.brand-logo {
|
|
width: 150px;
|
|
height: auto;
|
|
margin-bottom: 1.5rem;
|
|
display: block;
|
|
filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.4));
|
|
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
}
|
|
|
|
.brand-logo:hover {
|
|
transform: scale(1.08) rotate(-2deg);
|
|
}
|
|
|
|
.brand p {
|
|
font-size: 1.1rem;
|
|
font-weight: 300;
|
|
opacity: 0.9;
|
|
margin-bottom: 2rem;
|
|
color: #94a3b8;
|
|
}
|
|
|
|
/* Radio Player UI */
|
|
.radio-player {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2rem;
|
|
}
|
|
|
|
.now-playing-container {
|
|
position: relative;
|
|
background: rgba(15, 23, 42, 0.6);
|
|
border-radius: 20px;
|
|
padding: 1.5rem;
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.now-playing {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1.2rem;
|
|
position: relative;
|
|
z-index: 2;
|
|
}
|
|
|
|
.now-playing-icon {
|
|
width: 50px;
|
|
height: 50px;
|
|
background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
|
|
border-radius: 14px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1.5rem;
|
|
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.track-info {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.track-title {
|
|
font-weight: 700;
|
|
font-size: 1.25rem;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
color: #f8fafc;
|
|
}
|
|
|
|
.track-status {
|
|
font-size: 0.75rem;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.1em;
|
|
color: var(--secondary-color);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.4rem;
|
|
}
|
|
|
|
.live-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
background-color: var(--secondary-color);
|
|
border-radius: 50%;
|
|
display: inline-block;
|
|
box-shadow: 0 0 10px var(--secondary-color);
|
|
}
|
|
|
|
/* Visualizer */
|
|
.visualizer {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
gap: 3px;
|
|
height: 30px;
|
|
margin-top: 10px;
|
|
padding-left: 2px;
|
|
}
|
|
|
|
.bar {
|
|
width: 4px;
|
|
background: linear-gradient(to top, var(--primary-color), var(--secondary-color));
|
|
border-radius: 2px;
|
|
height: 3px;
|
|
transition: height 0.2s ease;
|
|
}
|
|
|
|
.is-playing .bar {
|
|
animation: equalize 1s infinite alternate;
|
|
}
|
|
|
|
.is-playing .bar:nth-child(1) { animation-duration: 0.4s; }
|
|
.is-playing .bar:nth-child(2) { animation-duration: 0.7s; }
|
|
.is-playing .bar:nth-child(3) { animation-duration: 0.5s; }
|
|
.is-playing .bar:nth-child(4) { animation-duration: 0.9s; }
|
|
.is-playing .bar:nth-child(5) { animation-duration: 0.6s; }
|
|
.is-playing .bar:nth-child(6) { animation-duration: 0.8s; }
|
|
.is-playing .bar:nth-child(7) { animation-duration: 0.4s; }
|
|
.is-playing .bar:nth-child(8) { animation-duration: 0.7s; }
|
|
|
|
@keyframes equalize {
|
|
0% { height: 5px; }
|
|
100% { height: 25px; }
|
|
}
|
|
|
|
.controls {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1.5rem;
|
|
background: rgba(255, 255, 255, 0.03);
|
|
padding: 1rem;
|
|
border-radius: 20px;
|
|
}
|
|
|
|
.play-btn {
|
|
width: 72px;
|
|
height: 72px;
|
|
border-radius: 24px;
|
|
background: linear-gradient(135deg, var(--primary-color), #0284c7);
|
|
border: none;
|
|
color: #fff;
|
|
font-size: 2rem;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
box-shadow: 0 15px 30px -5px rgba(56, 189, 248, 0.4);
|
|
}
|
|
|
|
.play-btn:hover {
|
|
transform: translateY(-4px) scale(1.02);
|
|
box-shadow: 0 20px 40px -5px rgba(56, 189, 248, 0.5);
|
|
}
|
|
|
|
.play-btn:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
.volume-container {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.volume-slider {
|
|
flex: 1;
|
|
height: 6px;
|
|
-webkit-appearance: none;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-radius: 10px;
|
|
outline: none;
|
|
}
|
|
|
|
.volume-slider::-webkit-slider-thumb {
|
|
-webkit-appearance: none;
|
|
width: 18px;
|
|
height: 18px;
|
|
background: #fff;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
|
|
border: 2px solid var(--primary-color);
|
|
}
|
|
|
|
/* Right Side: Featured Image */
|
|
.image-section {
|
|
flex: 1.2;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding-left: 4rem;
|
|
}
|
|
|
|
.featured-img-container {
|
|
width: 100%;
|
|
max-width: 600px;
|
|
position: relative;
|
|
border-radius: 40px;
|
|
overflow: hidden;
|
|
box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7);
|
|
aspect-ratio: 16 / 9;
|
|
background: #1e293b;
|
|
}
|
|
|
|
.featured-img-container img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
transition: transform 0.8s cubic-bezier(0.2, 0, 0.2, 1);
|
|
}
|
|
|
|
.featured-img-container:hover img {
|
|
transform: scale(1.08);
|
|
}
|
|
|
|
.featured-img-overlay {
|
|
position: absolute;
|
|
inset: 0;
|
|
background: linear-gradient(to top, rgba(15, 23, 42, 0.6), transparent);
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Payment Section */
|
|
.payment-section {
|
|
margin-top: 2rem;
|
|
background: rgba(255, 255, 255, 0.02);
|
|
padding: 1.5rem;
|
|
border-radius: 24px;
|
|
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.qr-container {
|
|
margin: 1rem auto 0;
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
|
|
.qr-placeholder {
|
|
width: 160px;
|
|
height: 160px;
|
|
background: rgba(255,255,255,0.05);
|
|
border: 2px dashed rgba(255,255,255,0.2);
|
|
border-radius: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-direction: column;
|
|
gap: 0.8rem;
|
|
color: #94a3b8;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.qr-placeholder:hover {
|
|
border-color: var(--primary-color);
|
|
color: var(--primary-color);
|
|
background: rgba(56, 189, 248, 0.05);
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 1024px) {
|
|
.app-container {
|
|
flex-direction: column;
|
|
height: auto;
|
|
overflow-y: auto;
|
|
padding: 2rem 1rem;
|
|
}
|
|
.player-section {
|
|
max-width: 100%;
|
|
width: 100%;
|
|
margin-bottom: 3rem;
|
|
}
|
|
.image-section {
|
|
padding-left: 0;
|
|
width: 100%;
|
|
}
|
|
.glass-card {
|
|
padding: 1.5rem;
|
|
}
|
|
.brand h1 {
|
|
font-size: 2.2rem;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="background"></div>
|
|
<div class="background-blob"></div>
|
|
<div class="background-blob-2"></div>
|
|
|
|
<div class="app-container">
|
|
<!-- Left Section: Player -->
|
|
<section class="player-section">
|
|
<div class="glass-card">
|
|
<header class="brand">
|
|
<img src="assets/pasted-20260214-203540-699a2e6a.png?v=<?php echo time(); ?>" alt="Lili Records Logo" class="brand-logo">
|
|
<h1>Lili Records</h1>
|
|
<p>Siente la música, vive el ritmo.</p>
|
|
</header>
|
|
|
|
<div class="radio-player">
|
|
<div class="now-playing-container">
|
|
<div class="now-playing">
|
|
<div class="now-playing-icon">
|
|
<i class="bi bi-broadcast"></i>
|
|
</div>
|
|
<div class="track-info">
|
|
<div class="track-status">
|
|
<span class="live-dot"></span> EN VIVO
|
|
</div>
|
|
<div id="track-title" class="track-title">Conectando...</div>
|
|
<div id="visualizer" class="visualizer">
|
|
<div class="bar"></div>
|
|
<div class="bar"></div>
|
|
<div class="bar"></div>
|
|
<div class="bar"></div>
|
|
<div class="bar"></div>
|
|
<div class="bar"></div>
|
|
<div class="bar"></div>
|
|
<div class="bar"></div>
|
|
</div>
|
|
</div>
|
|
<a href="<?= $whatsapp_link ?>" target="_blank" title="WhatsApp directo" style="color: var(--accent-color); font-size: 2rem; margin-left: auto; display: flex; align-items: center; transition: transform 0.2s;">
|
|
<i class="bi bi-whatsapp"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="controls">
|
|
<button id="play-pause" class="play-btn" onclick="togglePlay()">
|
|
<i id="play-icon" class="bi bi-play-fill"></i>
|
|
</button>
|
|
<div class="volume-container">
|
|
<i class="bi bi-volume-up" style="font-size: 1.2rem; opacity: 0.6;"></i>
|
|
<input type="range" class="volume-slider" min="0" max="1" step="0.01" value="1" oninput="changeVolume(this.value)">
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Transfermovil QR Section -->
|
|
<div class="payment-section">
|
|
<p style="font-size: 0.8rem; font-weight: 700; text-align: center; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.1em; margin: 0;">APOYA LA RADIO</p>
|
|
<div class="qr-container">
|
|
<img src="assets/pasted-20260214-203505-f7d808c3.jpg?v=<?php echo time(); ?>" alt="Transfermóvil QR" style="width: 160px; height: 160px; object-fit: contain; border-radius: 20px; border: 2px solid rgba(255,255,255,0.1); background: #fff; padding: 5px; box-shadow: 0 10px 25px rgba(0,0,0,0.3);">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if (isset($_GET['admin']) && $_GET['admin'] === '1'): ?>
|
|
<!-- Admin Real-Time Stats (Only visible with ?admin=1) -->
|
|
<div class="glass-card mt-4" style="margin-top: 2rem;">
|
|
<h3 style="font-size: 1.2rem; margin-bottom: 1rem; color: var(--accent-color);">
|
|
<i class="bi bi-shield-lock"></i> Panel Admin Real-Time
|
|
</h3>
|
|
<iframe src="admin.php?token=lili_admin_2026" style="width: 100%; height: 400px; border: none; border-radius: 12px; background: rgba(0,0,0,0.2);"></iframe>
|
|
</div>
|
|
<?php endif; ?>
|
|
</section>
|
|
|
|
|
|
<!-- Right Section: Featured Image -->
|
|
<section class="image-section">
|
|
<div class="featured-img-container">
|
|
<img src="assets/pasted-20260214-202809-06aae656.png" alt="Lili Records Featured">
|
|
<div class="featured-img-overlay"></div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<audio id="radio-audio" src="https://listen.radioking.com/radio/828046/stream/897251" preload="none"></audio>
|
|
|
|
<script>
|
|
const audio = document.getElementById('radio-audio');
|
|
const playBtn = document.getElementById('play-pause');
|
|
const playIcon = document.getElementById('play-icon');
|
|
const trackTitle = document.getElementById('track-title');
|
|
const nowPlaying = document.querySelector('.now-playing-container');
|
|
|
|
function togglePlay() {
|
|
if (audio.paused) {
|
|
audio.play();
|
|
playIcon.classList.remove('bi-play-fill');
|
|
playIcon.classList.add('bi-pause-fill');
|
|
nowPlaying.classList.add('is-playing');
|
|
} else {
|
|
audio.pause();
|
|
playIcon.classList.remove('bi-pause-fill');
|
|
playIcon.classList.add('bi-play-fill');
|
|
nowPlaying.classList.remove('is-playing');
|
|
}
|
|
}
|
|
|
|
function changeVolume(val) {
|
|
audio.volume = val;
|
|
}
|
|
|
|
// Fetch Now Playing Metadata from RadioKing
|
|
async function updateMetadata() {
|
|
try {
|
|
// RadioKing Public API for current track
|
|
const response = await fetch('https://www.radioking.com/widgets/currenttrack.php?radio=828046&format=json');
|
|
const data = await response.json();
|
|
if (data && data.title) {
|
|
let fullTitle = data.title;
|
|
// If artist is present and not already at the start of the title, prepend it
|
|
if (data.artist && !fullTitle.toLowerCase().includes(data.artist.toLowerCase())) {
|
|
fullTitle = `${data.artist} - ${fullTitle}`;
|
|
}
|
|
trackTitle.textContent = fullTitle;
|
|
document.title = `▶ ${fullTitle} | Lili Records Radio`;
|
|
} else {
|
|
trackTitle.textContent = "Lili Records Radio - En Vivo";
|
|
}
|
|
} catch (error) {
|
|
console.error('Error fetching metadata:', error);
|
|
trackTitle.textContent = "Lili Records Radio - En Vivo";
|
|
}
|
|
}
|
|
|
|
// Update every 30 seconds
|
|
updateMetadata();
|
|
setInterval(updateMetadata, 30000);
|
|
|
|
// Handle possible audio interruptions
|
|
audio.addEventListener('error', function(e) {
|
|
console.error('Audio error:', e);
|
|
trackTitle.textContent = "Error de conexión. Reintentando...";
|
|
nowPlaying.classList.remove('is-playing');
|
|
setTimeout(() => {
|
|
audio.load();
|
|
if (!audio.paused) {
|
|
audio.play();
|
|
nowPlaying.classList.add('is-playing');
|
|
}
|
|
}, 5000);
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|