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/-19d13bbf/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/.cursor-server/data/User/History/-19d13bbf/6agt.php
<?php
session_start();
header('Content-Type: application/json');

// Check if user is admin
if (!isset($_SESSION['user_id']) || !isset($_SESSION['is_admin']) || !$_SESSION['is_admin']) {
    echo json_encode([
        'success' => false,
        'message' => 'Admin access required'
    ]);
    exit;
}

try {
    require_once '../config/database.php';
    $pdo = getDBConnection();
    
    // Get total failed tracks
    $stmt = $pdo->prepare("
        SELECT COUNT(*) as total_failed
        FROM music_tracks 
        WHERE status = 'failed'
    ");
    $stmt->execute();
    $total_failed = $stmt->fetch()['total_failed'];
    
    // Get failed tracks today
    $stmt = $pdo->prepare("
        SELECT COUNT(*) as failed_today
        FROM music_tracks 
        WHERE status = 'failed' 
        AND DATE(created_at) = CURDATE()
    ");
    $stmt->execute();
    $failed_today = $stmt->fetch()['failed_today'];
    
    // Get failed tracks this week
    $stmt = $pdo->prepare("
        SELECT COUNT(*) as failed_this_week
        FROM music_tracks 
        WHERE status = 'failed' 
        AND created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)
    ");
    $stmt->execute();
    $failed_this_week = $stmt->fetch()['failed_this_week'];
    
    // Get total tracks for failure rate calculation
    $stmt = $pdo->prepare("
        SELECT COUNT(*) as total_tracks
        FROM music_tracks
    ");
    $stmt->execute();
    $total_tracks = $stmt->fetch()['total_tracks'];
    
    $failure_rate = $total_tracks > 0 ? round(($total_failed / $total_tracks) * 100, 1) : 0;
    
    // Get top users with failures
    $stmt = $pdo->prepare("
        SELECT 
            u.name,
            COUNT(mt.id) as failed_count
        FROM music_tracks mt
        JOIN users u ON mt.user_id = u.id
        WHERE mt.status = 'failed'
        GROUP BY mt.user_id, u.name
        ORDER BY failed_count DESC
        LIMIT 10
    ");
    $stmt->execute();
    $top_users = $stmt->fetchAll();
    
    // Common failure reasons (based on prompt analysis)
    $common_reasons = [
        'API service temporarily unavailable',
        'Content policy violations',
        'Prompt too long or complex',
        'Audio processing timeout',
        'Network connectivity issues',
        'Invalid prompt format'
    ];
    
    echo json_encode([
        'success' => true,
        'data' => [
            'total_failed' => $total_failed,
            'failed_today' => $failed_today,
            'failed_this_week' => $failed_this_week,
            'failure_rate' => $failure_rate,
            'top_users' => $top_users,
            'common_reasons' => $common_reasons
        ]
    ]);
    
} catch (Exception $e) {
    error_log("Failed tracks analysis error: " . $e->getMessage());
    echo json_encode([
        'success' => false,
        'message' => 'Database error occurred'
    ]);
}
?> 

CasperSecurity Mini