![]() 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/utils/ |
<?php
/**
* TEST EVERYTHING CHANGES SCRIPT
* Verifies that ALL elements change with the randomizer button
*/
echo "šØ TESTING EVERYTHING CHANGES\n";
echo "============================\n\n";
// Test pages to verify complete coverage
$test_pages = [
'index.php',
'create_music.php',
'artists.php',
'dashboard.php',
'community.php',
'library.php',
'artist_profile.php',
'bands.php',
'pricing.php',
'winamp_player.php',
'player.php'
];
function analyzePageElements($page) {
if (!file_exists($page)) {
echo "ā $page - File not found\n";
return false;
}
$content = file_get_contents($page);
// Count different types of elements
$element_counts = [
'buttons' => preg_match_all('/<button|<input[^>]*type=["\'](submit|button)["\']|<a[^>]*class=["\'][^"\']*btn[^"\']*["\']/', $content),
'cards' => preg_match_all('/<div[^>]*class=["\'][^"\']*(card|artist-card|track-card|stat-card)[^"\']*["\']/', $content),
'forms' => preg_match_all('/<input|<textarea|<select/', $content),
'players' => preg_match_all('/<div[^>]*class=["\'][^"\']*(player|winamp-container|audio-player)[^"\']*["\']/', $content),
'progress' => preg_match_all('/<div[^>]*class=["\'][^"\']*(progress|loading)[^"\']*["\']/', $content),
'text' => preg_match_all('/<h[1-6]|<p|<span|<div[^>]*class=["\'][^"\']*(text|content|title)[^"\']*["\']/', $content),
'backgrounds' => preg_match_all('/<div[^>]*class=["\'][^"\']*(container|wrapper|main|section)[^"\']*["\']/', $content),
'shadows' => preg_match_all('/<div[^>]*class=["\'][^"\']*(shadow|card|btn)[^"\']*["\']/', $content),
'glows' => preg_match_all('/<div[^>]*class=["\'][^"\']*(glow|title|logo)[^"\']*["\']/', $content)
];
// Check for CSS variables usage
$css_vars = [
'var(--primary-gradient)',
'var(--bg-primary)',
'var(--text-primary)',
'var(--bg-card)',
'var(--border-light)',
'var(--shadow-light)',
'var(--glow-primary)'
];
$has_vars = false;
foreach ($css_vars as $var) {
if (strpos($content, $var) !== false) {
$has_vars = true;
break;
}
}
// Check for hardcoded colors
$hardcoded_colors = [
'#667eea', '#764ba2', '#4facfe', '#0a0a0a', '#1a1a1a',
'#ffffff', '#a0aec0', '#718096', '#4a5568'
];
$has_hardcoded = false;
foreach ($hardcoded_colors as $color) {
if (strpos($content, $color) !== false) {
$has_hardcoded = true;
break;
}
}
echo "š $page:\n";
echo " šÆ Elements found:\n";
foreach ($element_counts as $type => $count) {
if ($count > 0) {
echo " ⢠$type: $count\n";
}
}
if ($has_vars && !$has_hardcoded) {
echo " ā
Using CSS variables correctly\n";
echo " šØ Will change with randomizer\n";
return true;
} elseif ($has_vars && $has_hardcoded) {
echo " ā ļø Using CSS variables but has some hardcoded colors\n";
echo " šØ Will partially change with randomizer\n";
return false;
} else {
echo " ā Not using CSS variables\n";
echo " šØ Will NOT change with randomizer\n";
return false;
}
}
// Test each page
$passed = 0;
$total = count($test_pages);
echo "š ANALYZING ELEMENT COVERAGE:\n";
echo "==============================\n\n";
foreach ($test_pages as $page) {
if (analyzePageElements($page)) {
$passed++;
}
echo "\n";
}
echo "š COVERAGE RESULTS:\n";
echo "===================\n";
echo "ā
Pages with complete coverage: $passed/$total\n";
echo "ā Pages needing attention: " . ($total - $passed) . "/$total\n\n";
// Test the comprehensive CSS file
echo "š TESTING COMPREHENSIVE CSS:\n";
echo "=============================\n";
if (file_exists('comprehensive_colors.css')) {
$css_content = file_get_contents('comprehensive_colors.css');
// Count important rules
$important_rules = substr_count($css_content, '!important');
// Count element selectors
$element_selectors = [
'buttons' => substr_count($css_content, '.btn') + substr_count($css_content, 'button'),
'cards' => substr_count($css_content, '.card'),
'forms' => substr_count($css_content, 'input') + substr_count($css_content, 'textarea') + substr_count($css_content, 'select'),
'players' => substr_count($css_content, '.player'),
'progress' => substr_count($css_content, '.progress'),
'text' => substr_count($css_content, 'h1') + substr_count($css_content, 'h2') + substr_count($css_content, 'h3') + substr_count($css_content, 'p'),
'backgrounds' => substr_count($css_content, 'body') + substr_count($css_content, '.container'),
'universal' => substr_count($css_content, '*')
];
echo "ā
comprehensive_colors.css exists\n";
echo "š Contains $important_rules important rules\n";
echo "šÆ Element coverage:\n";
foreach ($element_selectors as $type => $count) {
if ($count > 0) {
echo " ⢠$type: $count selectors\n";
}
}
echo "šØ Will force ALL elements to change!\n";
} else {
echo "ā comprehensive_colors.css not found\n";
}
// Test JavaScript functionality
echo "\nš TESTING JAVASCRIPT FUNCTIONALITY:\n";
echo "====================================\n";
if (file_exists('includes/header.php')) {
$header_content = file_get_contents('includes/header.php');
$js_features = [
'forceApplyToAllElements' => strpos($header_content, 'forceApplyToAllElements') !== false,
'getCurrentTheme' => strpos($header_content, 'getCurrentTheme') !== false,
'querySelectorAll' => strpos($header_content, 'querySelectorAll') !== false,
'forEach' => strpos($header_content, 'forEach') !== false
];
echo "ā
JavaScript enhancements found:\n";
foreach ($js_features as $feature => $found) {
echo " ⢠$feature: " . ($found ? "ā
" : "ā") . "\n";
}
if (array_sum($js_features) === count($js_features)) {
echo "šÆ JavaScript will force ALL elements to change!\n";
} else {
echo "ā ļø Some JavaScript features missing\n";
}
} else {
echo "ā header.php not found\n";
}
echo "\nš FINAL VERIFICATION:\n";
echo "=====================\n";
echo "1. Visit any page on your site\n";
echo "2. Look for the šØ button on the right side\n";
echo "3. Click the button and watch EVERYTHING change\n";
echo "4. Test on different pages to verify complete coverage\n\n";
echo "šµ EXPECTED RESULTS:\n";
echo "===================\n";
echo "ā
ALL buttons will change colors\n";
echo "ā
ALL cards will change backgrounds\n";
echo "ā
ALL forms will change styling\n";
echo "ā
ALL players will change appearance\n";
echo "ā
ALL text will change colors\n";
echo "ā
ALL backgrounds will change\n";
echo "ā
ALL shadows and glows will change\n";
echo "ā
ALL elements will have smooth transitions\n\n";
if ($passed === $total) {
echo "š EVERYTHING WILL CHANGE WITH THE RANDOMIZER!\n";
echo "⨠Your Feng Shui color system is COMPLETE!\n";
} else {
echo "ā ļø Some pages may need additional attention\n";
echo "š§ The comprehensive CSS will force most changes\n";
}
echo "\nšØ TEST THE RANDOMIZER NOW!\n";
echo "==========================\n";
echo "Click the šØ button and watch EVERYTHING transform! āØ\n";
?>