Auto commit: 2026-02-24T03:17:54.602Z
This commit is contained in:
parent
47cd9b186b
commit
6b0e285541
@ -45,7 +45,7 @@ if ($method === 'POST') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo json_encode(['success' => true, 'bonus_awarded' => $bonus]);
|
echo json_encode(['success' => true, 'bonus_awarded' => $bonus, 'was_priority' => ($req && $req['is_priority'] == 1)]);
|
||||||
} elseif ($action === 'delete') {
|
} elseif ($action === 'delete') {
|
||||||
$stmt = $db->prepare("DELETE FROM song_requests WHERE id = ?");
|
$stmt = $db->prepare("DELETE FROM song_requests WHERE id = ?");
|
||||||
$stmt->execute([$id]);
|
$stmt->execute([$id]);
|
||||||
|
|||||||
50
index.php
50
index.php
@ -1985,6 +1985,9 @@ $twitter_link = "https://twitter.com/";
|
|||||||
<button id="test-tictac-btn" onclick="testTicTac()" style="display: none; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); color: white; font-size: 0.6rem; padding: 2px 8px; border-radius: 10px; font-weight: 800; cursor: pointer; transition: all 0.3s;" title="Probar sonido Tic-Tac">
|
<button id="test-tictac-btn" onclick="testTicTac()" style="display: none; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); color: white; font-size: 0.6rem; padding: 2px 8px; border-radius: 10px; font-weight: 800; cursor: pointer; transition: all 0.3s;" title="Probar sonido Tic-Tac">
|
||||||
<i class="bi bi-clock"></i> TEST TIC-TAC
|
<i class="bi bi-clock"></i> TEST TIC-TAC
|
||||||
</button>
|
</button>
|
||||||
|
<button id="test-applause-btn" onclick="testApplause()" style="display: none; background: rgba(244, 114, 182, 0.2); border: 1px solid #f472b6; color: #f472b6; font-size: 0.6rem; padding: 2px 8px; border-radius: 10px; font-weight: 800; cursor: pointer; transition: all 0.3s; margin-left: 5px;" title="Probar sonido Aplausos">
|
||||||
|
<i class="bi bi-megaphone"></i> TEST APPLAUSE
|
||||||
|
</button>
|
||||||
<div id="dj-flash-poll-control" style="display: none; margin-bottom: 8px;">
|
<div id="dj-flash-poll-control" style="display: none; margin-bottom: 8px;">
|
||||||
<button onclick="promptFlashPoll()" style="background: rgba(250, 204, 21, 0.2); border: 1px solid #facc15; color: #facc15; font-size: 0.6rem; padding: 2px 8px; border-radius: 10px; font-weight: 800; cursor: pointer; transition: all 0.3s;" title="Lanzar Encuesta Flash">
|
<button onclick="promptFlashPoll()" style="background: rgba(250, 204, 21, 0.2); border: 1px solid #facc15; color: #facc15; font-size: 0.6rem; padding: 2px 8px; border-radius: 10px; font-weight: 800; cursor: pointer; transition: all 0.3s;" title="Lanzar Encuesta Flash">
|
||||||
<i class="bi bi-lightning-fill"></i> PREGUNTA FLASH
|
<i class="bi bi-lightning-fill"></i> PREGUNTA FLASH
|
||||||
@ -3708,9 +3711,11 @@ $twitter_link = "https://twitter.com/";
|
|||||||
vipAlert.style.display = ((isGuestDj || isAdmin) && hasPriority) ? 'block' : 'none';
|
vipAlert.style.display = ((isGuestDj || isAdmin) && hasPriority) ? 'block' : 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show/hide Test Tic-Tac button
|
// Show/hide Test buttons
|
||||||
const tictacBtn = document.getElementById('test-tictac-btn');
|
const tictacBtn = document.getElementById('test-tictac-btn');
|
||||||
if (tictacBtn) tictacBtn.style.display = (isGuestDj || isAdmin) ? 'block' : 'none';
|
if (tictacBtn) tictacBtn.style.display = (isGuestDj || isAdmin) ? 'block' : 'none';
|
||||||
|
const applauseBtn = document.getElementById('test-applause-btn');
|
||||||
|
if (applauseBtn) applauseBtn.style.display = (isGuestDj || isAdmin) ? 'block' : 'none';
|
||||||
|
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
const list = document.getElementById('song-requests-list');
|
const list = document.getElementById('song-requests-list');
|
||||||
@ -3804,6 +3809,10 @@ $twitter_link = "https://twitter.com/";
|
|||||||
});
|
});
|
||||||
const result = await response.json();
|
const result = await response.json();
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
|
if (result.was_priority) {
|
||||||
|
applauseAudio.volume = 0.5;
|
||||||
|
applauseAudio.play();
|
||||||
|
}
|
||||||
if (result.bonus_awarded) {
|
if (result.bonus_awarded) {
|
||||||
confetti({
|
confetti({
|
||||||
particleCount: 150,
|
particleCount: 150,
|
||||||
@ -4643,23 +4652,30 @@ $twitter_link = "https://twitter.com/";
|
|||||||
setInterval(updateVipTimers, 1000);
|
setInterval(updateVipTimers, 1000);
|
||||||
|
|
||||||
const ticTacAudio = new Audio('https://assets.mixkit.co/active_storage/sfx/560/560-preview.mp3');
|
const ticTacAudio = new Audio('https://assets.mixkit.co/active_storage/sfx/560/560-preview.mp3');
|
||||||
ticTacAudio.volume = 0.3;
|
const applauseAudio = new Audio('https://assets.mixkit.co/active_storage/sfx/467/467-preview.mp3'); // Crowd Cheer
|
||||||
|
|
||||||
function testTicTac() {
|
function testTicTac() {
|
||||||
ticTacAudio.currentTime = 0;
|
const btn = document.getElementById('test-tictac-btn');
|
||||||
ticTacAudio.play().then(() => {
|
ticTacAudio.volume = 0.5;
|
||||||
const btn = document.getElementById('test-tictac-btn');
|
ticTacAudio.play();
|
||||||
const original = btn.innerHTML;
|
btn.style.background = '#facc15';
|
||||||
btn.innerHTML = '<i class="bi bi-volume-up-fill"></i> SONANDO...';
|
btn.style.color = '#000';
|
||||||
btn.style.color = '#facc15';
|
setTimeout(() => {
|
||||||
setTimeout(() => {
|
btn.style.background = '';
|
||||||
btn.innerHTML = original;
|
btn.style.color = '';
|
||||||
btn.style.color = '';
|
}, 2000);
|
||||||
}, 2000);
|
}
|
||||||
}).catch(e => {
|
|
||||||
console.error("Error al reproducir el tic-tac:", e);
|
function testApplause() {
|
||||||
alert("No se pudo reproducir el sonido. Asegúrate de haber interactuado con la página primero.");
|
const btn = document.getElementById('test-applause-btn');
|
||||||
});
|
applauseAudio.volume = 0.4;
|
||||||
|
applauseAudio.play();
|
||||||
|
btn.style.background = '#f472b6';
|
||||||
|
btn.style.color = '#fff';
|
||||||
|
setTimeout(() => {
|
||||||
|
btn.style.background = '';
|
||||||
|
btn.style.color = '';
|
||||||
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateVipTimers() {
|
function updateVipTimers() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user