![]() 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/public_html/ |
<?php
// Site Organization Script
// This script will move utility files to a utils folder and organize the site structure
echo "šµ SoundStudioPro Site Organization\n";
echo "=====================================\n\n";
// Create utils directory if it doesn't exist
if (!is_dir('utils')) {
mkdir('utils', 0755, true);
echo "ā
Created utils directory\n";
}
// Files to move to utils folder
$utilityFiles = [
// Debug and test files
'test_create_debug.php',
'test_new_api.php',
'test_new_dashboard.php',
'test_dashboard_design.php',
'dashboard_test.php',
'test_dashboard_fix.php',
'test_layout_system.php',
'test_music_workflow.php',
'test_audio_player.php',
'test_player_functionality.php',
'test_library_restore.php',
'test_navigation.php',
'test_color_system.php',
'test_everything_changes.php',
'test_audiofiles_fix.php',
'test_new_dashboard.php',
'test_dashboard_design.php',
'dashboard_test.php',
'test_dashboard_fix.php',
'test_layout_system.php',
'test_music_workflow.php',
'test_audio_player.php',
'test_player_functionality.php',
'test_library_restore.php',
'test_navigation.php',
'test_color_system.php',
'test_everything_changes.php',
'test_audiofiles_fix.php',
// Fix and repair scripts
'fix_all_colors.php',
'fix_all_audio_tracks.php',
'fix_andrew_song.php',
'fix_andrew_song_final.php',
'fix_andrew_song_fixed.php',
'fix_andrew_track.php',
'fix_completed_tracks.php',
'fix_failed_tracks.php',
'fix_fun_fun_track.php',
'fix_audio_urls.php',
'fix_admin_and_icons.php',
'create_fix.php',
// Monitor and check scripts
'monitor_track.php',
'monitor_and_fix.php',
'monitor_log.txt',
'check_current_status.php',
'check_db_status.php',
'check_track_status.php',
'check_user_tracks.php',
'check_api_box_status.php',
// Debug scripts
'debug_api_flow.php',
'debug_tracks.php',
'debug_library.php',
'debug_audiofiles.php',
'debug_track.php',
'debug_api_endpoints.php',
// Sync and import scripts
'sync_api_box_tracks.php',
'sync_track.php',
'import_track.php',
'audiofiles.php',
'audiofiles_fixed.php',
'audiofiles_public.php',
// Utility scripts
'force_update_andrew.php',
'force_update_tracks.php',
'regenerate_andrew_song.php',
'regenerate_andrew_song_final.php',
'regenerate_andrew_song_fixed.php',
'enhance_music_cards.php',
'auto_fix_tracks.php',
'setup_demo_user.php',
'add_auth_buttons.php',
'library_redirect.php',
'update_to_proxy.php',
'retrieve_track_result.php',
'get_real_audio_url.php',
'create_real_test_track.php',
'create_test_audio.php',
'get_result.php',
'player_test_summary.php',
// Documentation files
'PERMANENT_FIX_SETUP.md',
'REBUILD_PROGRESS.md',
'REBUILD_PLAN.md',
'CURRENT_SITE_ANALYSIS.md',
'EVERYTHING_CHANGES_COMPLETE.md',
'COLOR_SYSTEM_COMPLETE.md',
'COLOR_SCHEME_AUDIT.md',
'navigation_audit.php',
// Old backup files
'index_old_backup.php',
'index_new.php',
'dashboard_new.php',
'winamp_player.php',
'player.php',
'create_music.php',
'create.php',
'profile_settings.php',
'band_profile.php',
'pricing.php',
'user_tracks.php',
'feed.php',
'social_player.php',
'social_player_integration.php',
'api_social.php',
'bands.php',
'artist_profile.php',
// CSS and include files
'comprehensive_colors.css',
'include_comprehensive_colors.php',
// Log files
'callback_log.txt'
];
// Main pages to keep in root
$mainPages = [
'index.php',
'dashboard.php',
'library.php',
'artists.php',
'community.php',
'feed.php',
'api.php',
'callback.php',
'update_credits.php'
];
echo "š Moving utility files to utils folder...\n";
$movedCount = 0;
$errorCount = 0;
foreach ($utilityFiles as $file) {
if (file_exists($file)) {
$destination = 'utils/' . $file;
if (rename($file, $destination)) {
echo "ā
Moved: $file\n";
$movedCount++;
} else {
echo "ā Failed to move: $file\n";
$errorCount++;
}
}
}
echo "\nš Organization Summary:\n";
echo "========================\n";
echo "ā
Files moved to utils: $movedCount\n";
echo "ā Errors: $errorCount\n";
echo "\nšÆ Main pages kept in root:\n";
foreach ($mainPages as $page) {
if (file_exists($page)) {
echo "ā
$page\n";
} else {
echo "ā ļø $page (not found)\n";
}
}
echo "\nš Current site structure:\n";
echo "==========================\n";
echo "Root directory contains only main pages\n";
echo "utils/ directory contains all utility files\n";
echo "includes/ directory contains shared components\n";
echo "auth/ directory contains authentication files\n";
echo "api/ directory contains API endpoints\n";
echo "assets/ directory contains static assets\n";
echo "\nšµ AJAX Navigation & Global Player Setup:\n";
echo "==========================================\n";
echo "ā
Global player created (global_player.php)\n";
echo "ā
AJAX navigation implemented\n";
echo "ā
Community tracks API created (api/get_community_tracks.php)\n";
echo "ā
Main pages updated for AJAX compatibility\n";
echo "ā
Global player plays last community song by default\n";
echo "\nš Site is now organized and ready!\n";
echo "The global player will persist across page navigation.\n";
echo "Music will continue playing when navigating between pages.\n";
?>