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/1220b179/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/.cursor-server/data/User/History/1220b179/w5pW.php
<?php
// Setup script for artist profile sample data
require_once 'config/database.php';

$pdo = getDBConnection();

if (!$pdo) {
    die("Database connection failed!");
}

echo "🎵 Setting up artist profile sample data...\n";

try {
    // Create sample users/artists
    $artists = [
        [
            'name' => 'Tiësto',
            'email' => 'tiesto@example.com',
            'password' => password_hash('password123', PASSWORD_DEFAULT),
            'plan' => 'pro',
            'credits' => 1000,
            'bio' => 'Tijs Michiel Verwest, known professionally as Tiësto, is a Dutch DJ and music producer. He is widely regarded as one of the greatest DJs of all time and was named "The Greatest DJ of All Time" by Mixmag. He has performed at major events including the 2004 Athens Olympic Games and has won numerous awards including Grammy nominations.',
            'location' => 'Amsterdam, Netherlands',
            'website' => 'https://tiesto.com',
            'social_links' => json_encode([
                'facebook' => 'https://facebook.com/tiesto',
                'twitter' => 'https://twitter.com/tiesto',
                'instagram' => 'https://instagram.com/tiesto',
                'youtube' => 'https://youtube.com/tiesto',
                'soundcloud' => 'https://soundcloud.com/tiesto',
                'spotify' => 'https://open.spotify.com/artist/tiesto'
            ])
        ],
        [
            'name' => 'Armin van Buuren',
            'email' => 'armin@example.com',
            'password' => password_hash('password123', PASSWORD_DEFAULT),
            'plan' => 'pro',
            'credits' => 800,
            'bio' => 'Armin van Buuren is a Dutch DJ, record producer and remixer. Since 2001, he has hosted A State of Trance, a weekly radio show, which is broadcast to nearly 40 million listeners in 84 countries on over 100 FM radio stations.',
            'location' => 'Leiden, Netherlands',
            'website' => 'https://arminvanbuuren.com',
            'social_links' => json_encode([
                'facebook' => 'https://facebook.com/arminvanbuuren',
                'twitter' => 'https://twitter.com/arminvanbuuren',
                'instagram' => 'https://instagram.com/arminvanbuuren',
                'youtube' => 'https://youtube.com/arminvanbuuren'
            ])
        ],
        [
            'name' => 'David Guetta',
            'email' => 'david@example.com',
            'password' => password_hash('password123', PASSWORD_DEFAULT),
            'plan' => 'pro',
            'credits' => 1200,
            'bio' => 'Pierre David Guetta is a French DJ, music programmer, record producer, and songwriter. He has sold over 10 million albums and 65 million singles globally. In 2011, Guetta was voted as the number one DJ in the DJ Mag Top 100 DJs poll.',
            'location' => 'Paris, France',
            'website' => 'https://davidguetta.com',
            'social_links' => json_encode([
                'facebook' => 'https://facebook.com/davidguetta',
                'twitter' => 'https://twitter.com/davidguetta',
                'instagram' => 'https://instagram.com/davidguetta',
                'youtube' => 'https://youtube.com/davidguetta'
            ])
        ],
        [
            'name' => 'Martin Garrix',
            'email' => 'martin@example.com',
            'password' => password_hash('password123', PASSWORD_DEFAULT),
            'plan' => 'pro',
            'credits' => 600,
            'bio' => 'Martijn Gerard Garritsen, known professionally as Martin Garrix, is a Dutch DJ and record producer. He was ranked number one on DJ Mag\'s Top 100 DJs list for three consecutive years (2016, 2017, and 2018).',
            'location' => 'Amstelveen, Netherlands',
            'website' => 'https://martingarrix.com',
            'social_links' => json_encode([
                'facebook' => 'https://facebook.com/martingarrix',
                'twitter' => 'https://twitter.com/martingarrix',
                'instagram' => 'https://instagram.com/martingarrix',
                'youtube' => 'https://youtube.com/martingarrix'
            ])
        ],
        [
            'name' => 'Swedish House Mafia',
            'email' => 'shm@example.com',
            'password' => password_hash('password123', PASSWORD_DEFAULT),
            'plan' => 'pro',
            'credits' => 1500,
            'bio' => 'Swedish House Mafia is a Swedish house music supergroup consisting of Axwell, Steve Angello, and Sebastian Ingrosso. The group officially formed in late 2008, separated in late 2012, and reunited in 2018.',
            'location' => 'Stockholm, Sweden',
            'website' => 'https://swedishhousemafia.com',
            'social_links' => json_encode([
                'facebook' => 'https://facebook.com/swedishhousemafia',
                'twitter' => 'https://twitter.com/swedishhousemafia',
                'instagram' => 'https://instagram.com/swedishhousemafia',
                'youtube' => 'https://youtube.com/swedishhousemafia'
            ])
        ]
    ];

    // Insert artists
    foreach ($artists as $artist) {
        // Check if user already exists
        $stmt = $pdo->prepare("SELECT id FROM users WHERE email = ?");
        $stmt->execute([$artist['email']]);
        $existing = $stmt->fetch();

        if (!$existing) {
            // Insert user
            $stmt = $pdo->prepare("
                INSERT INTO users (name, email, password, plan, credits, created_at) 
                VALUES (?, ?, ?, ?, ?, DATE_SUB(NOW(), INTERVAL FLOOR(RAND() * 365) DAY))
            ");
            $stmt->execute([
                $artist['name'],
                $artist['email'],
                $artist['password'],
                $artist['plan'],
                $artist['credits']
            ]);
            
            $userId = $pdo->lastInsertId();
            echo "✅ Created artist: {$artist['name']} (ID: $userId)\n";

            // Insert profile data
            $stmt = $pdo->prepare("
                INSERT INTO user_profiles (user_id, bio, location, website, social_links) 
                VALUES (?, ?, ?, ?, ?)
            ");
            $stmt->execute([
                $userId,
                $artist['bio'],
                $artist['location'],
                $artist['website'],
                $artist['social_links']
            ]);

            // Create sample tracks for each artist
            $trackTitles = [
                'Tiësto' => ['Adagio for Strings', 'Traffic', 'Lethal Industry', 'Flight 643', 'Suburban Train'],
                'Armin van Buuren' => ['This Is What It Feels Like', 'Blah Blah Blah', 'In and Out of Love', 'Ping Pong', 'Communication'],
                'David Guetta' => ['Titanium', 'When Love Takes Over', 'Sexy Bitch', 'Turn Me On', 'Memories'],
                'Martin Garrix' => ['Animals', 'In the Name of Love', 'Scared to Be Lonely', 'There for You', 'Ocean'],
                'Swedish House Mafia' => ['Don\'t You Worry Child', 'Save the World', 'One', 'Miami 2 Ibiza', 'Greyhound']
            ];

            $artistTracks = $trackTitles[$artist['name']] ?? ['Track 1', 'Track 2', 'Track 3'];
            
            foreach ($artistTracks as $index => $title) {
                $taskId = 'task_' . $userId . '_' . $index;
                $duration = rand(180, 300); // 3-5 minutes
                $plays = rand(1000, 50000);
                $likes = rand(100, 5000);
                
                // Insert track
                $stmt = $pdo->prepare("
                    INSERT INTO music_tracks (user_id, task_id, title, prompt, music_type, duration, status, audio_url, created_at) 
                    VALUES (?, ?, ?, ?, 'music', ?, 'complete', 'https://example.com/audio.mp3', DATE_SUB(NOW(), INTERVAL ? DAY))
                ");
                $stmt->execute([
                    $userId,
                    $taskId,
                    $title,
                    "Create an amazing {$artist['name']} style track called '{$title}'",
                    $duration,
                    rand(1, 365) // Random days ago
                ]);
                
                $trackId = $pdo->lastInsertId();
                
                // Add some plays
                for ($i = 0; $i < $plays; $i++) {
                    $stmt = $pdo->prepare("
                        INSERT INTO track_plays (track_id, ip_address, created_at) 
                        VALUES (?, ?, DATE_SUB(NOW(), INTERVAL ? SECOND))
                    ");
                    $stmt->execute([
                        $trackId,
                        '192.168.' . rand(1, 255) . '.' . rand(1, 255),
                        rand(0, 86400 * 30) // Random time in last 30 days
                    ]);
                }
                
                // Add some likes
                for ($i = 0; $i < $likes; $i++) {
                    $stmt = $pdo->prepare("
                        INSERT INTO user_likes (user_id, track_id, created_at) 
                        VALUES (?, ?, DATE_SUB(NOW(), INTERVAL ? SECOND))
                    ");
                    $stmt->execute([
                        rand(1, 5), // Random user
                        $trackId,
                        rand(0, 86400 * 30) // Random time in last 30 days
                    ]);
                }
                
                // Add some comments
                $comments = [
                    "Amazing track! 🔥",
                    "This is incredible!",
                    "Love this vibe!",
                    "Perfect for the club!",
                    "Can't stop listening!",
                    "Masterpiece!",
                    "This is fire! 🔥",
                    "Absolutely love it!",
                    "Incredible production!",
                    "This is going to be huge!"
                ];
                
                for ($i = 0; $i < rand(5, 20); $i++) {
                    $stmt = $pdo->prepare("
                        INSERT INTO user_comments (user_id, track_id, comment, created_at) 
                        VALUES (?, ?, ?, DATE_SUB(NOW(), INTERVAL ? SECOND))
                    ");
                    $stmt->execute([
                        rand(1, 5), // Random user
                        $trackId,
                        $comments[array_rand($comments)],
                        rand(0, 86400 * 30) // Random time in last 30 days
                    ]);
                }
            }
            
            echo "✅ Created " . count($artistTracks) . " tracks for {$artist['name']}\n";
        } else {
            echo "⏭️ Artist {$artist['name']} already exists\n";
        }
    }

    // Create some follow relationships
    $follows = [
        [1, 2], [1, 3], [1, 4], [1, 5], // Tiësto follows everyone
        [2, 1], [2, 3], [2, 4], // Armin follows some
        [3, 1], [3, 2], [3, 5], // David follows some
        [4, 1], [4, 2], [4, 3], // Martin follows some
        [5, 1], [5, 2], [5, 3], [5, 4] // SHM follows everyone
    ];

    foreach ($follows as $follow) {
        $stmt = $pdo->prepare("
            INSERT IGNORE INTO user_follows (follower_id, following_id, created_at) 
            VALUES (?, ?, DATE_SUB(NOW(), INTERVAL ? DAY))
        ");
        $stmt->execute([
            $follow[0],
            $follow[1],
            rand(1, 365) // Random days ago
        ]);
    }

    echo "✅ Created follow relationships\n";

    // Update track statistics
    $pdo->exec("
        UPDATE music_tracks mt 
        SET plays = (
            SELECT COUNT(*) 
            FROM track_plays tp 
            WHERE tp.track_id = mt.id
        )
    ");

    echo "✅ Updated track play counts\n";

    echo "\n🎉 Artist profile setup complete!\n";
    echo "You can now visit: /artist_profile.php?id=1 (Tiësto)\n";
    echo "Or try other IDs: 2 (Armin), 3 (David), 4 (Martin), 5 (SHM)\n";

} catch (Exception $e) {
    echo "❌ Error: " . $e->getMessage() . "\n";
}
?> 

CasperSecurity Mini