T.ME/BIBIL_0DAY
CasperSecurity


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/.cursor-server/data/User/History/-523c73d0/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/.cursor-server/data/User/History/-523c73d0/wpeo.php
<?php
// Test VIP Playlist Loading
require_once 'config/database.php';

try {
    $pdo = getDBConnection();
    
    echo "<h2>๐Ÿงช VIP Playlist Test</h2>\n";
    
    // Test the VIP API endpoint directly
    $stmt = $pdo->prepare("
        SELECT 
            mt.id,
            mt.title,
            mt.audio_url,
            mt.created_at,
            mt.playlist_order,
            u.name as artist_name,
            u.id as user_id,
            (SELECT COUNT(*) FROM track_plays WHERE track_id = mt.id) as play_count,
            (SELECT COUNT(*) FROM track_likes WHERE track_id = mt.id) as like_count
        FROM music_tracks mt
        JOIN users u ON mt.user_id = u.id
        WHERE mt.status = 'complete' 
        AND mt.audio_url IS NOT NULL 
        AND mt.is_vip_sample = 1
        ORDER BY mt.playlist_order ASC, mt.created_at DESC
        LIMIT 10
    ");
    $stmt->execute();
    $tracks = $stmt->fetchAll();
    
    echo "<h3>๐ŸŽต VIP Tracks Found:</h3>\n";
    echo "<ul>\n";
    foreach ($tracks as $track) {
        $status = '';
        if ($track['title'] === 'Adagio for Strings') {
            $status = ' <strong style="color: green;">โœ… FOUND</strong>';
        }
        echo "<li>ID {$track['id']}: '{$track['title']}' by {$track['artist_name']} (Order: {$track['playlist_order']}){$status}</li>\n";
    }
    echo "</ul>\n";
    
    // Test the actual API endpoint
    echo "<h3>๐Ÿ”— API Endpoint Test:</h3>\n";
    echo "<p>Testing: <code>/api/get_vip_sample_tracks.php?per_page=10</code></p>\n";
    
    // Simulate the API response
    $response = [
        'success' => true,
        'tracks' => $tracks,
        'playlist_info' => [
            'name' => 'SoundStudioPro VIP Samples',
            'description' => 'Handpicked premium tracks showcasing the best of AI music generation',
            'type' => 'vip_sample'
        ]
    ];
    
    echo "<pre>" . json_encode($response, JSON_PRETTY_PRINT) . "</pre>\n";
    
    // Check for any issues
    echo "<h3>๐Ÿ” Potential Issues:</h3>\n";
    
    $adagio_tracks = array_filter($tracks, function($t) { return $t['title'] === 'Adagio for Strings'; });
    if (empty($adagio_tracks)) {
        echo "<p style='color: red;'>โŒ 'Adagio for Strings' not found in VIP playlist!</p>\n";
    } else {
        echo "<p style='color: green;'>โœ… 'Adagio for Strings' found in VIP playlist</p>\n";
        foreach ($adagio_tracks as $track) {
            echo "<p>Track ID: {$track['id']}, Artist: {$track['artist_name']}, Order: {$track['playlist_order']}</p>\n";
        }
    }
    
    // Check for duplicate titles
    $titles = array_column($tracks, 'title');
    $duplicates = array_diff_assoc($titles, array_unique($titles));
    if (!empty($duplicates)) {
        echo "<p style='color: orange;'>โš ๏ธ Duplicate titles found: " . implode(', ', array_unique($duplicates)) . "</p>\n";
    } else {
        echo "<p style='color: green;'>โœ… No duplicate titles found</p>\n";
    }
    
    // Check for null/empty audio URLs
    $null_audio = array_filter($tracks, function($t) { return empty($t['audio_url']); });
    if (!empty($null_audio)) {
        echo "<p style='color: red;'>โŒ Tracks with null audio URLs found!</p>\n";
    } else {
        echo "<p style='color: green;'>โœ… All tracks have valid audio URLs</p>\n";
    }
    
    echo "<h3>๐ŸŽฎ Manual Test:</h3>\n";
    echo "<p>To test the global player:</p>\n";
    echo "<ol>\n";
    echo "<li>Go to the homepage</li>\n";
    echo "<li>Open browser console (F12)</li>\n";
    echo "<li>Click play on the global player</li>\n";
    echo "<li>Check console for any error messages</li>\n";
    echo "<li>If it fails, try: <code>window.refreshCurrentPlaylist()</code> in console</li>\n";
    echo "</ol>\n";
    
} catch (Exception $e) {
    echo "<p style='color: red;'>โŒ Error: " . $e->getMessage() . "</p>\n";
}
?> 

CasperSecurity Mini