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/domains/soundstudiopro.com/private_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/soundstudiopro.com/private_html/fix_track_titles.php
<?php
// Fix Track Titles Script
// This script allows admins to view and fix track titles

session_start();

// Check if user is logged in and is admin
if (!isset($_SESSION['user_id']) || !isset($_SESSION['is_admin']) || !$_SESSION['is_admin']) {
    header('Location: /auth/login.php');
    exit;
}

require_once 'config/database.php';
$pdo = getDBConnection();

// Handle title updates
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action'])) {
    if ($_POST['action'] === 'update_title') {
        $track_id = $_POST['track_id'];
        $new_title = trim($_POST['new_title']);
        
        if (!empty($new_title)) {
            $stmt = $pdo->prepare("UPDATE music_tracks SET title = ? WHERE id = ?");
            $stmt->execute([$new_title, $track_id]);
            $message = "Track title updated successfully!";
        }
    }
}

// Get all tracks with their current titles
$stmt = $pdo->prepare("
    SELECT 
        mt.id,
        mt.title,
        mt.prompt,
        mt.status,
        mt.created_at,
        u.name as user_name
    FROM music_tracks mt
    LEFT JOIN users u ON mt.user_id = u.id
    ORDER BY mt.created_at DESC
");
$stmt->execute();
$tracks = $stmt->fetchAll();
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Fix Track Titles - SoundStudioPro Admin</title>
    <style>
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #1a202c;
            color: #e2e8f0;
            margin: 0;
            padding: 20px;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
        }
        .header {
            background: linear-gradient(135deg, #667eea, #764ba2);
            padding: 20px;
            border-radius: 10px;
            margin-bottom: 20px;
        }
        .message {
            background: #48bb78;
            color: white;
            padding: 10px;
            border-radius: 5px;
            margin-bottom: 20px;
        }
        .track-grid {
            display: grid;
            gap: 20px;
        }
        .track-card {
            background: #2d3748;
            border-radius: 10px;
            padding: 20px;
            border: 1px solid #4a5568;
        }
        .track-title {
            font-size: 1.2rem;
            font-weight: bold;
            margin-bottom: 10px;
            color: #f7fafc;
        }
        .track-info {
            color: #a0aec0;
            margin-bottom: 15px;
        }
        .track-prompt {
            background: #4a5568;
            padding: 10px;
            border-radius: 5px;
            margin-bottom: 15px;
            font-style: italic;
        }
        .edit-form {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        .edit-form input[type="text"] {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid #4a5568;
            border-radius: 5px;
            background: #2d3748;
            color: #e2e8f0;
        }
        .edit-form button {
            padding: 8px 16px;
            background: #667eea;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }
        .edit-form button:hover {
            background: #5a67d8;
        }
        .status-badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
            font-weight: bold;
        }
        .status-complete { background: #48bb78; color: white; }
        .status-processing { background: #ed8936; color: white; }
        .status-failed { background: #f56565; color: white; }
        .untitled {
            color: #f56565;
            font-style: italic;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>🎵 Fix Track Titles</h1>
            <p>Update track titles for better organization and display</p>
        </div>

        <?php if (isset($message)): ?>
            <div class="message"><?= htmlspecialchars($message) ?></div>
        <?php endif; ?>

        <div class="track-grid">
            <?php foreach ($tracks as $track): ?>
                <div class="track-card">
                    <div class="track-title <?= empty($track['title']) || $track['title'] === 'Untitled Track' ? 'untitled' : '' ?>">
                        <?= htmlspecialchars($track['title'] ?: 'Untitled Track') ?>
                    </div>
                    
                    <div class="track-info">
                        <strong>ID:</strong> <?= $track['id'] ?> | 
                        <strong>Artist:</strong> <?= htmlspecialchars($track['user_name'] ?: 'Unknown') ?> | 
                        <strong>Status:</strong> 
                        <span class="status-badge status-<?= $track['status'] ?>">
                            <?= ucfirst($track['status']) ?>
                        </span> | 
                        <strong>Created:</strong> <?= date('M j, Y H:i', strtotime($track['created_at'])) ?>
                    </div>
                    
                    <?php if (!empty($track['prompt'])): ?>
                        <div class="track-prompt">
                            <strong>Prompt:</strong> <?= htmlspecialchars($track['prompt']) ?>
                        </div>
                    <?php endif; ?>
                    
                    <form class="edit-form" method="POST">
                        <input type="hidden" name="action" value="update_title">
                        <input type="hidden" name="track_id" value="<?= $track['id'] ?>">
                        <input type="text" name="new_title" placeholder="Enter new title..." 
                               value="<?= htmlspecialchars($track['title'] ?: '') ?>" required>
                        <button type="submit">Update Title</button>
                    </form>
                </div>
            <?php endforeach; ?>
        </div>
    </div>
</body>
</html> 

CasperSecurity Mini