![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/soundstudiopro.com/private_html/includes/ |
</div>
</main>
<!-- Enhanced Global Music Player -->
<?php include 'global_player.php'; ?>
<!-- Fallback for page-specific functions -->
<script>
// Ensure these functions exist globally to prevent errors on pages without them
if (typeof window.setPagePlaylist !== 'function') {
window.setPagePlaylist = function() {
console.log('đĩ setPagePlaylist: No page-specific playlist defined');
};
}
if (typeof window.recordTrackPlay !== 'function') {
window.recordTrackPlay = function(trackId) {
console.log('đĩ recordTrackPlay: Fallback - track', trackId);
};
}
if (typeof window.buildPlaylistFromPage !== 'function') {
window.buildPlaylistFromPage = function() {
console.log('đĩ buildPlaylistFromPage: No page-specific playlist builder');
return [];
};
}
</script>
<?php
// Include translation system if not already included
if (!function_exists('t')) {
require_once __DIR__ . '/translations.php';
}
?>
<!-- Footer -->
<footer class="footer" id="siteFooter">
<button class="footer-toggle" id="footerToggle">
<span class="footer-toggle__label"><?= t('footer.quick_links') ?></span>
<i class="fas fa-chevron-up"></i>
</button>
<div class="container">
<div class="footer-content">
<div class="footer-section">
<h3>SoundStudioPro</h3>
<p><?= t('footer.description') ?></p>
</div>
<div class="footer-section">
<h3><?= t('footer.features') ?></h3>
<a href="/#features"><?= t('footer.ai_music') ?></a>
<a href="/#features"><?= t('footer.lyrics') ?></a>
<a href="/radio/"><?= t('footer.radio_licensing') ?></a>
</div>
<div class="footer-section">
<h3><?= t('footer.support') ?></h3>
<a href="/about.php"><?= t('footer.about') ?></a>
<a href="/contact.php"><?= t('footer.contact') ?></a>
<a href="/#pricing"><?= t('footer.pricing') ?></a>
<a href="/event-pricing.php"><?= t('footer.event_pricing') ?></a>
<a href="/sound-studio-pro.php">Sound Studio Pro Overview</a>
<a href="/admin.php"><?= t('nav.admin') ?></a>
<a href="/auth/login.php"><?= t('user.login') ?></a>
<a href="/auth/register.php"><?= t('user.sign_up') ?></a>
</div>
<div class="footer-section">
<h3><?= t('footer.resources') ?></h3>
<a href="/free-ai-music-generator.php"><?= t('footer.resources.free_ai_music') ?></a>
<a href="/ai-music-software.php"><?= t('footer.resources.ai_music_software') ?></a>
<a href="/beat-maker-software.php"><?= t('footer.resources.beat_maker') ?></a>
<a href="/music-production-software.php"><?= t('footer.resources.music_production') ?></a>
<a href="/royalty-free-music.php"><?= t('footer.resources.royalty_free') ?></a>
</div>
<div class="footer-section">
<h3><?= t('footer.legal') ?></h3>
<a href="/terms.php"><?= t('footer.terms') ?></a>
<a href="/privacy.php"><?= t('footer.privacy') ?></a>
</div>
</div>
<div class="footer-bottom">
<p>© 2025 SoundStudioPro. <?= t('footer.copyright') ?></p>
</div>
</div>
</footer>
<style>
.footer {
position: relative;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.footer.footer-collapsed .footer-content,
.footer.footer-collapsed .footer-bottom {
max-height: 0;
opacity: 0;
overflow: hidden;
}
.footer.footer-collapsed {
padding-top: 3rem;
}
.footer-toggle {
position: absolute;
top: -30px;
right: 20px;
background: rgba(10, 10, 10, 0.9);
border: 1px solid rgba(255, 255, 255, 0.1);
color: white;
padding: 0.4rem 0.9rem;
border-radius: 999px;
font-size: 0.9rem;
display: flex;
align-items: center;
gap: 0.4rem;
cursor: pointer;
z-index: 10;
}
.footer-collapsed .footer-toggle i {
transform: rotate(180deg);
}
/* Footer */
.footer {
background: #0a0a0a;
color: white;
padding: 6rem 0 3rem;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-content {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
gap: 4rem;
margin-bottom: 4rem;
}
.footer-section h3 {
font-size: 2rem;
font-weight: 600;
margin-bottom: 2rem;
color: #667eea;
}
.footer-section p,
.footer-section a {
font-size: 1.4rem;
color: #a0aec0;
text-decoration: none;
line-height: 1.6;
display: block;
margin-bottom: 1rem;
transition: color 0.3s ease;
}
.footer-section a:hover {
color: #667eea;
}
.footer-bottom {
border-top: 1px solid rgba(255, 255, 255, 0.1);
padding-top: 3rem;
text-align: center;
font-size: 1.4rem;
color: #718096;
}
@media (max-width: 768px) {
.footer {
padding-bottom: 2rem;
}
.footer-toggle {
position: static;
margin: 0 auto 1rem auto;
justify-content: center;
}
}
</style>
<script>
(function() {
const footer = document.getElementById('siteFooter');
const toggle = document.getElementById('footerToggle');
if (!footer || !toggle) return;
toggle.addEventListener('click', () => {
footer.classList.toggle('footer-collapsed');
});
// Auto-collapse on mobile
if (window.innerWidth < 768) {
footer.classList.add('footer-collapsed');
}
})();
</script>
<script>
// Global Notification System - Available on all pages
// Load translations for notifications
const globalNotificationTranslations = <?= json_encode([
'success' => [
['đ', t('notification.success.success'), t('notification.success.success_subtitle')],
['đ', t('notification.success.awesome'), t('notification.success.awesome_subtitle')],
['đ', t('notification.success.boom'), t('notification.success.boom_subtitle')],
['â', t('notification.success.perfect'), t('notification.success.perfect_subtitle')],
['đĩ', t('notification.success.sweet'), t('notification.success.sweet_subtitle')],
['đĨ', t('notification.success.fire'), t('notification.success.fire_subtitle')],
['đ', t('notification.success.diamond'), t('notification.success.diamond_subtitle')],
['đ', t('notification.success.stellar'), t('notification.success.stellar_subtitle')],
['đĒ', t('notification.success.bravo'), t('notification.success.bravo_subtitle')],
['đ', t('notification.success.magic'), t('notification.success.magic_subtitle')]
],
'error' => [
['â', t('notification.error.oops'), t('notification.error.oops_subtitle')],
['đ
', t('notification.error.uh_oh'), t('notification.error.uh_oh_subtitle')],
['đ¤', t('notification.error.hmm'), t('notification.error.hmm_subtitle')],
['đą', t('notification.error.yikes'), t('notification.error.yikes_subtitle')]
],
'try_again' => t('notification.error.try_again'),
'check_details' => t('notification.error.check_details'),
'please_try_again' => t('notification.please_try_again')
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?>;
window.showNotification = function(message, type = 'info') {
let displayMessage = message;
let displaySubtitle = '';
if (type === 'success') {
const successMessages = globalNotificationTranslations.success;
const randomSuccess = successMessages[Math.floor(Math.random() * successMessages.length)];
displayMessage = randomSuccess[0] + ' ' + randomSuccess[1];
displaySubtitle = randomSuccess[2];
} else if (type === 'error') {
// Always show the actual error message for errors
// The message from API contains important details we need to show
displayMessage = message;
// Add a helpful subtitle for specific error types
if (message.includes('Database') || message.includes('Invalid') || message.includes(':')) {
displaySubtitle = globalNotificationTranslations.try_again;
} else if (message.length > 50) {
displaySubtitle = globalNotificationTranslations.check_details;
} else {
displaySubtitle = globalNotificationTranslations.please_try_again;
}
}
const notification = document.createElement('div');
notification.className = `global-notification notification-${type}`;
// Extract emoji if present, otherwise use default icon
const firstWord = displayMessage.split(' ')[0];
const hasEmoji = /[\u{1F300}-\u{1F9FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]/u.test(firstWord);
const emojiOrIcon = hasEmoji ? firstWord : (type === 'error' ? 'â' : type === 'success' ? 'â
' : 'âšī¸');
notification.innerHTML = `
<div style="display: flex; align-items: center; gap: 1.5rem;">
<div style="font-size: 3rem;">
${emojiOrIcon}
</div>
<div>
<div style="font-size: ${displayMessage.length > 60 ? '1.6rem' : '2rem'}; font-weight: 700; margin-bottom: 0.5rem; word-wrap: break-word;">${displayMessage}</div>
<div style="font-size: 1.4rem; opacity: 0.8;">
${displaySubtitle}
</div>
</div>
</div>
`;
// Random colors for notifications
const notificationColors = [
'linear-gradient(135deg, #48bb78, #38a169)', // Green
'linear-gradient(135deg, #667eea, #764ba2)', // Purple
'linear-gradient(135deg, #f093fb, #f5576c)', // Pink
'linear-gradient(135deg, #4facfe, #00f2fe)', // Blue
'linear-gradient(135deg, #43e97b, #38f9d7)', // Mint
'linear-gradient(135deg, #fa709a, #fee140)', // Sunset
'linear-gradient(135deg, #a8edea, #fed6e3)', // Soft
'linear-gradient(135deg, #ffecd2, #fcb69f)' // Warm
];
const randomColor = notificationColors[Math.floor(Math.random() * notificationColors.length)];
notification.style.cssText = `
position: fixed;
top: 20px;
right: 20px;
padding: 2.5rem 3.5rem;
border-radius: 20px;
color: white;
font-weight: 600;
z-index: 10000;
transform: translateX(100%) scale(0.8);
transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
max-width: 450px;
box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
backdrop-filter: blur(25px);
border: 2px solid rgba(255, 255, 255, 0.3);
background: ${type === 'success' ? randomColor : type === 'error' ? 'linear-gradient(135deg, #f56565, #e53e3e)' : 'linear-gradient(135deg, #667eea, #764ba2)'};
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
`;
document.body.appendChild(notification);
// Animate in with bounce effect
setTimeout(() => {
notification.style.transform = 'translateX(0) scale(1)';
}, 100);
// Add some sparkles to success notifications
if (type === 'success') {
setTimeout(() => {
createGlobalSparkles(notification);
}, 500);
}
// Remove after 4 seconds
setTimeout(() => {
notification.style.transform = 'translateX(100%) scale(0.8)';
setTimeout(() => notification.remove(), 400);
}, 4000);
};
// Global sparkles function
function createGlobalSparkles(element) {
const rect = element.getBoundingClientRect();
const sparkleSets = [
['â¨', 'â', 'đĢ', 'đ', 'âĄ', 'đ', 'đŽ', 'đ'], // Sparkly
['đ', 'đ', 'đ', 'đ', 'đ', 'đĒ', 'đ¨', 'đ'], // Party
['đ', 'âī¸', 'đ', 'đ', 'đē', 'đ¸', 'đŧ', 'đģ'], // Nature
['đĩ', 'đļ', 'đ¸', 'đš', 'đē', 'đģ', 'đĨ', 'đ¤'] // Music
];
const currentSparkleSet = sparkleSets[Math.floor(Math.random() * sparkleSets.length)];
const numSparkles = Math.floor(Math.random() * 6) + 4;
for (let i = 0; i < numSparkles; i++) {
const sparkle = document.createElement('div');
sparkle.innerHTML = currentSparkleSet[Math.floor(Math.random() * currentSparkleSet.length)];
sparkle.style.position = 'fixed';
sparkle.style.left = rect.left + Math.random() * rect.width + 'px';
sparkle.style.top = rect.top + Math.random() * rect.height + 'px';
sparkle.style.fontSize = (16 + Math.random() * 20) + 'px';
sparkle.style.pointerEvents = 'none';
sparkle.style.zIndex = '9998';
sparkle.style.opacity = '0';
sparkle.style.transition = 'all 1s ease-out';
document.body.appendChild(sparkle);
const randomDelay = Math.random() * 200;
const randomDistance = 30 + Math.random() * 70;
const randomAngle = Math.random() * 360;
setTimeout(() => {
sparkle.style.opacity = '1';
sparkle.style.transform = `translate(${Math.cos(randomAngle * Math.PI / 180) * randomDistance}px, ${Math.sin(randomAngle * Math.PI / 180) * randomDistance}px) rotate(${Math.random() * 360}deg)`;
setTimeout(() => {
sparkle.style.opacity = '0';
setTimeout(() => sparkle.remove(), 1000);
}, 1000);
}, randomDelay);
}
}
// Return to admin function
async function returnToAdmin(event) {
event.preventDefault();
if (confirm('Return to admin mode?')) {
window.location.href = '/admin_return.php';
}
}
// Add smooth scrolling for navigation
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const target = document.querySelector(this.getAttribute('href'));
if (target) {
target.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
});
});
// AJAX Navigation System REMOVED - Using normal page navigation
// Load track monitor script - Optimized: Deferred loading
const trackMonitorScript = document.createElement('script');
trackMonitorScript.src = '/js/track_monitor.js';
trackMonitorScript.defer = true;
trackMonitorScript.onload = function() {
console.log('đĩ Track monitor script loaded');
};
document.head.appendChild(trackMonitorScript);
// Add active state to navigation
document.querySelectorAll('.nav-link').forEach(link => {
link.addEventListener('click', function() {
document.querySelectorAll('.nav-link').forEach(l => l.classList.remove('active'));
this.classList.add('active');
});
});
// Mobile Menu Functionality - FIXED: No duplicate document click listeners
const mobileMenu = {
init() {
this.setupEventListeners();
},
setupEventListeners() {
const toggle = document.getElementById('mobileMenuToggle');
const close = document.getElementById('mobileMenuClose');
const menu = document.getElementById('mobileMenu');
if (toggle) {
toggle.addEventListener('click', () => {
this.openMenu();
});
}
if (close) {
close.addEventListener('click', () => {
this.closeMenu();
});
}
// Close menu when navigating - use specific event listeners instead of document
document.querySelectorAll('.mobile-nav-link').forEach(link => {
link.addEventListener('click', () => {
this.closeMenu();
});
});
// Close menu on escape key
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape' && menu && menu.classList.contains('active')) {
this.closeMenu();
}
});
// Close menu when navigating
document.querySelectorAll('.mobile-nav-link').forEach(link => {
link.addEventListener('click', () => {
this.closeMenu();
});
});
},
openMenu() {
const menu = document.getElementById('mobileMenu');
if (menu) {
menu.classList.add('active');
document.body.style.overflow = 'hidden';
}
},
closeMenu() {
const menu = document.getElementById('mobileMenu');
if (menu) {
menu.classList.remove('active');
document.body.style.overflow = '';
}
}
};
// Initialize mobile menu
document.addEventListener('DOMContentLoaded', () => {
mobileMenu.init();
});
// Handle logout with AJAX navigation
window.handleLogout = function() {
console.log('đĩ Handling logout via AJAX...');
// Show loading state
const logoutBtns = document.querySelectorAll('.logout-btn, .mobile-logout-btn');
logoutBtns.forEach(btn => {
const originalText = btn.innerHTML;
btn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Logging out...';
btn.disabled = true;
// Reset after a delay if something goes wrong
setTimeout(() => {
btn.innerHTML = originalText;
btn.disabled = false;
}, 5000);
});
// Call logout via AJAX
fetch('/auth/logout.php?ajax=1', {
method: 'GET',
headers: {
'X-Requested-With': 'XMLHttpRequest'
}
})
.then(response => response.json())
.then(data => {
if (data.success) {
console.log('đĩ Logout successful, navigating to login...');
// After logout, use regular navigation since user is no longer logged in
window.location.href = data.redirect;
} else {
console.error('đĩ Logout failed:', data.message);
// Reset buttons
logoutBtns.forEach(btn => {
btn.innerHTML = '<i class="fas fa-sign-out-alt"></i> Logout';
btn.disabled = false;
});
}
})
.catch(error => {
console.error('đĩ Logout error:', error);
// Reset buttons
logoutBtns.forEach(btn => {
btn.innerHTML = '<i class="fas fa-sign-out-alt"></i> Logout';
btn.disabled = false;
});
// Fallback to regular logout
window.location.href = '/auth/logout.php';
});
};
// Handle return to admin
window.returnToAdmin = function() {
console.log('đĩ Returning to admin...');
// Show loading state
const returnBtns = document.querySelectorAll('[onclick="returnToAdmin()"]');
returnBtns.forEach(btn => {
const originalText = btn.innerHTML;
btn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Returning...';
btn.disabled = true;
// Reset after a delay if something goes wrong
setTimeout(() => {
btn.innerHTML = originalText;
btn.disabled = false;
}, 5000);
});
// Call return to admin via AJAX
fetch('https://soundstudiopro.com/admin_api.php?action=return_to_admin', {
method: 'GET',
headers: {
'X-Requested-With': 'XMLHttpRequest'
},
credentials: 'same-origin'
})
.then(response => response.json())
.then(data => {
if (data.success) {
console.log('đĩ Return to admin successful, navigating...');
window.location.href = '/admin.php';
} else {
console.error('đĩ Return to admin failed:', data.error);
// Reset buttons
returnBtns.forEach(btn => {
btn.innerHTML = '<i class="fas fa-user-shield"></i> Return to Admin';
btn.disabled = false;
});
alert('Error returning to admin: ' + data.error);
}
})
.catch(error => {
console.error('đĩ Return to admin error:', error);
// Reset buttons
returnBtns.forEach(btn => {
btn.innerHTML = '<i class="fas fa-user-shield"></i> Return to Admin';
btn.disabled = false;
});
alert('Error returning to admin. Please try again.');
});
};
// Simple Navigation Helper (replaces AJAX navigation)
const simpleNavigation = {
// Navigate to a page normally
navigateTo(page) {
console.log("đ Navigating to:", page);
window.location.href = page;
},
// Navigate to artist profile
navigateToArtistProfile(artistId) {
console.log("đ Navigating to artist profile:", artistId);
window.location.href = `/artist_profile.php?id=${artistId}`;
},
// Navigate to track
navigateToTrack(trackId) {
console.log("đ Navigating to track:", trackId);
window.location.href = `/track.php?id=${trackId}`;
},
// Navigate to user profile
navigateToUserProfile(userId) {
console.log("đ Navigating to user profile:", userId);
window.location.href = `/user_profile.php?id=${userId}`;
}
};
// Make navigation functions globally available
window.navigateTo = simpleNavigation.navigateTo;
window.navigateToArtistProfile = simpleNavigation.navigateToArtistProfile;
window.navigateToTrack = simpleNavigation.navigateToTrack;
window.navigateToUserProfile = simpleNavigation.navigateToUserProfile;
// Initialize simple navigation
document.addEventListener("DOMContentLoaded", function() {
console.log("đ Simple navigation system loaded");
// Remove any ajax-nav classes from links
document.querySelectorAll(".ajax-nav").forEach(link => {
link.classList.remove("ajax-nav");
console.log("đ Removed ajax-nav class from:", link.href);
});
});
// Global playTrack function - available on all pages
window.playTrack = function(audioUrl, title, artist) {
console.log('đĩ Global playTrack called:', { audioUrl, title, artist });
// Validate audio URL
if (!audioUrl || audioUrl === 'NULL' || audioUrl === 'null') {
console.error('đĩ INVALID AUDIO URL:', audioUrl);
return;
}
// Use the enhanced global player first
if (typeof window.enhancedGlobalPlayer !== 'undefined' && typeof window.enhancedGlobalPlayer.playTrack === 'function') {
console.log('đĩ Using enhancedGlobalPlayer.playTrack');
try {
window.enhancedGlobalPlayer.playTrack(audioUrl, title, artist);
return;
} catch (error) {
console.error('đĩ enhancedGlobalPlayer.playTrack failed:', error);
}
}
// Fallback to basic audio (no auto-play)
console.log('đĩ Using basic audio fallback (no auto-play)');
try {
const audio = new Audio(audioUrl);
audio.volume = 0.5;
// Don't auto-play - let user control
console.log('đĩ Audio ready - user must click play');
} catch (error) {
console.error('đĩ Error creating audio element:', error);
}
};
</script>
</body>
</html>